/* Base styles extracted from styles.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Light theme variables (default) */
    --bg-color: #FAFAF7;
    --text-color: #333;
    --heading-color: #1a1a1a;
    --subtitle-color: #666;
    --white-box-bg: white;
    --white-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    --back-link-color: #666;
    --back-link-hover-color: #1a1a1a;
    --back-link-hover-bg: rgba(0, 0, 0, 0.05);
    --border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    /* Dark theme variables */
    --bg-color: #1a1a1a;
    --text-color: #e0e0e0;
    --heading-color: #f5f5f5;
    --subtitle-color: #aaa;
    --white-box-bg: #2d2d2d;
    --white-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    --back-link-color: #aaa;
    --back-link-hover-color: #fff;
    --back-link-hover-bg: rgba(255, 255, 255, 0.1);
    --border-color: rgba(255, 255, 255, 0.1);
}

body {
    font-family: 'Noto Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.5;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    background: var(--bg-color);
    color: var(--text-color);
    position: relative;
    z-index: 0;
    overflow-x: hidden; /* Prevent horizontal scroll when sidebar opens */
    transition: background-color 0.3s ease, color 0.3s ease;
    /* Use dvh for better mobile handling */
    min-height: 100dvh;
    /* Fallback for browsers that don't support dvh */
    min-height: 100vh;
    /* Account for mobile browser UI */
    padding-bottom: env(safe-area-inset-bottom);
}

/* Container */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease;
    background: transparent; /* Make sure container background is transparent */
}

/* Header */
header {
    margin-bottom: 3rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--heading-color);
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

h2 {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--heading-color);
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

.subtitle {
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--subtitle-color);
    margin-top: 0.5rem;
    transition: color 0.3s ease;
}

/* Back Navigation */
.back-nav {
    margin-bottom: 1rem;
    position: relative;
    z-index: 3;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--back-link-color);
    font-size: 0.95rem;
    padding: 0.5rem 2rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.back-link:hover {
    color: var(--back-link-hover-color);
    background: var(--back-link-hover-bg);
}

/* Media query for mobile screens - shift back button down */
@media (max-width: 768px) {
    .back-nav {
        margin-left: 2.5rem;
        margin-top: -0.8rem;
    }
}

/* White box container */
.white-box {
    background: var(--white-box-bg);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--white-box-shadow);
    margin-bottom: 2.5rem;
    position: relative;
    z-index: 2;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Collapsible Section */
.objectives-header {
    cursor: pointer;
}

.collapsible {
    position: relative;
    padding-right: 2rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
}

.collapsible::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat center;
    transition: transform 0.3s ease;
}

[data-theme="dark"] .collapsible::after {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23aaa' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat center;
}

.objectives-header.active .collapsible::after {
    transform: translateY(-50%) rotate(-180deg);
}

.objectives-description {
    color: var(--subtitle-color);
    font-size: 0.95rem;
    line-height: 1.5;
    transition: color 0.3s ease;
}

.collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    margin-top: 0;
    padding-top: 0;
}

.collapsible-content.active {
    max-height: 500px;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
}

/* Practice Scenario Section */
.practice-scenario {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    transition: border-color 0.3s ease;
}

.practice-scenario .pill-label {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--heading-color);
    transition: color 0.3s ease;
}

/* Main content container */
.main-content {
    position: relative;
    z-index: 1;
    min-height: 100vh;
}

.login-container {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--white-box-bg);
    border-radius: 8px;
    box-shadow: var(--white-box-shadow);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Disable animations on mobile to prevent phone heating */
@media (max-width: 768px) {
    /* Only disable background animations and heavy effects */
    body {
        animation: none !important;
        background-image: linear-gradient(135deg, rgba(255, 255, 0, 0.01), rgba(255, 105, 180, 0.01), rgba(0, 255, 255, 0.01)) !important;
    }
    
    /* Keep essential animations but optimize them */
    .theme-toggle,
    .nav-card,
    .language-select {
        transition-duration: 0.2s !important;
    }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    /* Only disable non-essential animations */
    body {
        animation: none !important;
    }
    
    /* Keep essential transitions for usability */
    .theme-toggle,
    .nav-card,
    .language-select {
        transition-duration: 0.2s !important;
    }
} 

.scenario-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin: 1rem 0;
}

.scenario-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1rem 0;
}

.typing-text {
    font-size: 0.95rem;
    color: #666;
    font-style: italic;
    cursor: pointer;
}

.typing-text:hover {
    opacity: 0.7;
}

.nav-btn {
    background: none;
    border: none;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #666;
    font-size: 0.9rem;
    padding: 0;
    margin-top: 1px;
}

.nav-btn:hover {
    opacity: 0.7;
}

.use-scenario-btn {
    background: none;
    color: #4a90e2;
    border: none;
    padding: 0.25rem 0.75rem;
    cursor: pointer;
    font-size: 0.9rem;
    transition: opacity 0.2s ease;
}

.use-scenario-btn:hover {
    opacity: 0.8;
} 

.play-button {
    background-color: #4a90e2;
    border: 1px solid #4a90e2;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.play-button.paused {
    background-color: #f3f4f6;
    border-color: #d1d5db;
}

.play-button.paused:hover {
    background-color: #e5e7eb;
} 

/* Feedback Overlay */
.feedback-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
    z-index: 1000;
    overflow-y: auto; /* Allow scrolling on overlay */
}

.feedback-overlay.active {
    display: flex;
}

.feedback-form {
    background: var(--white-box-bg);
    border-radius: 12px;
    padding: 24px;
    width: 90%;
    max-width: 500px;
    min-height: 500px; /* Set minimum height for desktop */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    position: relative;
    margin: auto; /* Center the form */
    margin-top: 20px; /* Add some space at the top */
    max-height: calc(100vh - 40px); /* Subtract padding */
    overflow-y: auto; /* Allow scrolling within form */
    display: flex;
    flex-direction: column;
    font-family: 'Noto Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.feedback-form form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-height: min-content; /* Ensure form takes minimum required height */
}

/* Add smooth scrolling to the form */
.feedback-form {
    scroll-behavior: smooth;
}

/* Ensure the close button stays fixed at the top */
.close-feedback {
    position: absolute;
    right: 16px;
    top: 16px;
    z-index: 2;
}

/* Add padding to account for fixed close button */
.feedback-form {
    padding-top: 48px;
}

/* Ensure screenshot preview doesn't overflow */
.screenshot-preview {
    max-height: 300px;
    overflow-y: auto;
}

[data-theme="dark"] .feedback-form {
    background: #2d2d2d;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

@keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.feedback-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.feedback-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--heading-color);
    font-family: 'Noto Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-weight: 600;
}

.feedback-form textarea {
    width: 100%;
    min-height: 200px; /* Increase default textarea height */
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 20px;
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
    background: var(--white-box-bg);
    color: var(--text-color);
}

.feedback-form textarea:focus {
    outline: none;
    border-color: #2196F3;
}

.submit-feedback {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    font-family: 'Noto Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    transition: all 0.2s ease;
    min-width: 120px;
}

.submit-feedback:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.submit-feedback:disabled {
    background: #cccccc;
    color: #666666;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.6;
}

.submit-feedback:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Style for the feedback link in sidebar */
.feedback-link {
    display: flex !important;
    align-items: center;
    gap: 8px;
}

.feedback-link i {
    font-size: 1.1rem;
} 

/* Style for the feedback type radio buttons container */
.feedback-type {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.feedback-type label {
    padding: 8px 16px;
    background: #f8f9fa;
    color: #6c757d;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.feedback-type label:hover {
    background: #e9ecef;
    border-color: #dee2e6;
    transform: translateY(-1px);
}

.feedback-type input[type="radio"] {
    margin: 0;
    accent-color: #667eea;
}

.feedback-type input[type="radio"]:checked + label,
.feedback-type label:has(input[type="radio"]:checked) {
    background: #f0f4ff;
    border-color: #667eea;
    color: #667eea;
}

/* Close button styling */
.close-feedback {
    background: none;
    border: none;
    font-size: 24px;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    position: absolute;
    right: 16px;
    top: 16px;
}

.close-feedback:hover {
    background-color: rgba(0, 0, 0, 0.1);
    transform: rotate(90deg);
}

[data-theme="dark"] .close-feedback:hover {
    background-color: rgba(255, 255, 255, 0.1);
} 

/* Screenshot option styling */
.screenshot-option {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.screenshot-btn {
    background: #f8f9fa;
    color: #6c757d;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Noto Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.screenshot-btn:hover {
    background: #e9ecef;
    border-color: #dee2e6;
    transform: translateY(-1px);
}

.screenshot-btn i {
    font-size: 1.1em;
}



.screenshot-preview {
    position: relative;
    width: 100%;
    max-width: 300px;
    border-radius: 8px;
    overflow: visible; /* Changed from auto to allow full height */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin: 10px 0;
}

.screenshot-preview img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    max-height: none; /* Remove any height restrictions */
}

.remove-screenshot {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    color: #666;
    transition: all 0.2s ease;
}

.remove-screenshot:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

[data-theme="dark"] .screenshot-btn {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: #adb5bd;
}

[data-theme="dark"] .screenshot-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .remove-screenshot {
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
}

[data-theme="dark"] .remove-screenshot:hover {
    background: rgba(0, 0, 0, 0.7);
} 

/* Ensure the form content is scrollable but screenshot can extend */
.feedback-form {
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.feedback-form form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Add spacing around the screenshot section */
.screenshot-option {
    margin: 10px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
} 

/* Mobile adjustments for feedback form */
@media (max-width: 768px) {
    .feedback-form {
        width: 95%;
        max-width: none;
        max-height: calc(100vh - 20px); /* Use more of the screen height */
        margin-top: 10px;
        padding: 20px;
    }
    
    .feedback-overlay {
        padding: 10px;
        align-items: stretch; /* Stretch to full height */
    }
    
    .feedback-form textarea {
        min-height: 300px; /* Much taller textarea on mobile to use available space */
        flex-grow: 1; /* Allow textarea to grow and fill available space */
    }
} 