*, *::before, *::after { box-sizing: border-box; }

:root {
    --navy-500: #1F1E30;
    --navy-300: #313041;
    --navy-400: #4a4960;
    --lemon-500: #D8F275;
    --lemon-300: #E2F49E;
    --lemon-200: #EDF5CC;
    --gray-100: #E6E6E5;
    --gray-50: #F7F7F5;
    --gray-350: #B8B8B6;
    --gray-600: #5a5a59;
    --white: #ffffff;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--gray-50);
    color: var(--navy-500);
    margin: 0;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* === TOP NAVIGATION === */
.site-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    background: var(--navy-500);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--lemon-500);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
}

.nav-logo-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
}

.nav-links {
    display: flex;
    gap: 24px;
}

.nav-links a {
    color: var(--white);
    text-decoration: none;
    font-size: 0.9rem;
    opacity: 0.9;
    transition: opacity 0.2s;
}

.nav-links a:hover {
    opacity: 1;
    color: var(--lemon-500);
}

@media (max-width: 500px) {
    .site-nav {
        padding: 10px 12px;
    }
    .nav-logo {
        font-size: 0.95rem;
    }
    .nav-links {
        gap: 12px;
    }
    .nav-links a {
        font-size: 0.8rem;
    }
}

/* === GENERATOR VIEW === */
.generator-view {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px;
}

.generator-view.hidden { display: none; }

.generator-header {
    text-align: center;
    margin-bottom: 16px;
    background: var(--navy-500);
    padding: 24px;
    border-radius: 16px;
    color: white;
}

.generator-header h1 {
    font-size: 2rem;
    margin: 0 0 8px 0;
    color: var(--lemon-500);
}

.generator-header p {
    color: var(--gray-100);
    margin: 0 0 8px 0;
}

.generator-header small {
    opacity: 0.7;
    font-size: 0.85rem;
}

.generator-header small a {
    color: var(--lemon-500);
    text-decoration: none;
}

.disclaimer {
    background: var(--lemon-200);
    border: 1px solid var(--lemon-500);
    padding: 12px 16px;
    margin-bottom: 24px;
    border-radius: 16px;
    font-size: 0.9rem;
    color: var(--navy-500);
    text-align: center;
}

.disclaimer a {
    color: var(--navy-500);
    font-weight: 600;
}

.generator-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 900px) {
    .generator-grid { grid-template-columns: 1fr; }
}

.panel {
    background: var(--white);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0px -1px 2px 0px rgba(31, 30, 48, 0.12), 0px 1px 2px 0px rgba(31, 30, 48, 0.12);
}

.panel h3 {
    margin: 0 0 16px 0;
    font-size: 1rem;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Form elements */
label {
    display: block;
    font-size: 0.85rem;
    color: var(--gray-600);
    margin-bottom: 6px;
}

select, input[type="text"] {
    width: 100%;
    background: var(--gray-50);
    border: 1px solid var(--gray-100);
    color: var(--navy-500);
    padding: 10px 12px;
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.95rem;
    margin-bottom: 16px;
}

select:focus, input:focus {
    outline: none;
    border-color: var(--lemon-500);
}

.avatar-option {
    cursor: pointer;
    border-radius: 12px;
    padding: 8px;
    text-align: center;
    transition: all 0.2s;
    border: 2px solid transparent;
    background: var(--gray-50);
}

.avatar-option:hover {
    border-color: var(--lemon-500);
}

.avatar-option.selected {
    border-color: var(--lemon-500);
    background: var(--lemon-200);
}

.avatar-option img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 6px;
}

.avatar-option span {
    font-size: 0.75rem;
    color: var(--gray-600);
    display: block;
}

/* Scenario cards */
.scenario-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.scenario-card {
    background: var(--gray-50);
    border: 2px solid var(--gray-100);
    border-radius: 16px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.scenario-card:hover {
    border-color: var(--lemon-500);
}

.scenario-card.selected {
    border-color: var(--lemon-500);
    background: var(--lemon-200);
}

.scenario-card h4 {
    margin: 0 0 8px 0;
    font-size: 1rem;
    color: var(--navy-500);
}

.scenario-card p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--gray-600);
}

/* Style buttons */
.style-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.style-btn {
    flex: 1;
    padding: 12px;
    border: 2px solid var(--gray-100);
    background: var(--gray-50);
    color: var(--navy-500);
    border-radius: 12px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.style-btn:hover {
    border-color: var(--lemon-500);
}

.style-btn.selected {
    border-color: var(--lemon-500);
    background: var(--lemon-200);
}

.style-btn.supportive.selected { border-color: #22c55e; background: rgba(34, 197, 94, 0.2); }
.style-btn.defensive.selected { border-color: #eab308; background: rgba(234, 179, 8, 0.2); }
.style-btn.aggressive.selected { border-color: #ef4444; background: rgba(239, 68, 68, 0.2); }

/* Example presets */
.examples-section {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-100);
}

.examples-section h3 {
    margin-bottom: 12px;
}

.example-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.example-chip {
    background: var(--navy-500);
    color: white;
    padding: 7px 13px;
    border-radius: 10px;
    font-size: 0.85rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    font-weight: 500;
}

.example-chip:hover {
    background: var(--navy-300);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Scenario categories */
.scenario-categories {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
}

.scenario-category {
    background: var(--gray-50);
    border-radius: 12px;
    padding: 12px;
}

.scenario-category h4 {
    margin: 0;
    color: var(--navy-500);
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.scenario-category h4::before {
    content: '▼';
    font-size: 0.7rem;
    transition: transform 0.2s;
}

.scenario-category.collapsed h4::before {
    transform: rotate(-90deg);
}

.scenario-category.collapsed h4 {
    margin-bottom: 0;
}

.scenario-category:not(.collapsed) h4 {
    margin-bottom: 12px;
}

.scenario-category .example-chips {
    justify-content: flex-start;
}

.scenario-category.collapsed .example-chips {
    display: none;
}

/* Mission info */
.mission-info {
    background: var(--gray-50);
    border-radius: 16px;
    padding: 16px;
    margin-top: 16px;
}

.mission-info h4 {
    margin: 0 0 8px 0;
    color: var(--navy-500);
}

.mission-info p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--gray-600);
}

.checkpoints-list {
    margin-top: 12px;
    padding-left: 20px;
}

.checkpoints-list li {
    font-size: 0.85rem;
    color: var(--gray-600);
    margin-bottom: 4px;
}

/* Main input panel */
.main-input-panel {
    margin-bottom: 12px;
}

.main-input-panel label {
    font-size: 1.1rem;
    color: var(--navy-500);
    margin-bottom: 12px;
}

.scenario-input {
    width: 100%;
    min-height: 140px;
    background: var(--gray-50);
    border: 2px solid var(--gray-100);
    color: var(--navy-500);
    padding: 16px;
    border-radius: 16px;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.5;
    resize: vertical;
    margin-bottom: 16px;
}

.scenario-input:focus {
    outline: none;
    border-color: var(--lemon-500);
}

.scenario-input::placeholder {
    color: var(--gray-600);
}

.input-row {
    display: flex;
    gap: 16px;
    align-items: flex-end;
}

.input-group {
    flex: 1;
}

.input-group label {
    font-size: 0.85rem;
    color: var(--gray-600);
}

.input-group select {
    margin-bottom: 0;
}

.generate-btn {
    padding: 12px 32px;
    font-size: 1rem;
    font-weight: 600;
    background: var(--lemon-500);
    color: var(--navy-500);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.generate-btn:hover {
    background: var(--lemon-300);
    transform: translateY(-2px);
}

.generate-btn:disabled {
    background: var(--gray-100);
    color: var(--gray-600);
    cursor: not-allowed;
    transform: none;
}

/* Scenario preview */
.scenario-preview {
    border: 2px solid var(--lemon-500);
    animation: fadeIn 0.3s ease;
}

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

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

.preview-header h3 {
    margin: 0;
    color: var(--navy-500);
    font-size: 1.2rem;
}

.small-btn {
    padding: 6px 12px;
    font-size: 0.85rem;
    background: var(--navy-500);
    color: #e2e8f0;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.small-btn:hover {
    background: var(--navy-300);
}

.preview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.preview-item {
    background: var(--gray-50);
    padding: 12px;
    border-radius: 12px;
}

.preview-label {
    display: block;
    font-size: 0.8rem;
    color: var(--gray-600);
    margin-bottom: 4px;
}

.preview-value {
    color: var(--navy-500);
    font-size: 0.95rem;
}

.style-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: capitalize;
}

.style-badge.supportive { background: rgba(34, 197, 94, 0.2); color: #22c55e; }
.style-badge.defensive { background: rgba(234, 179, 8, 0.2); color: #eab308; }
.style-badge.aggressive { background: rgba(239, 68, 68, 0.2); color: #ef4444; }

.preview-section {
    background: var(--gray-50);
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 16px;
}

.criteria-list {
    margin: 8px 0 0 0;
    padding-left: 20px;
}

.criteria-list li {
    color: var(--gray-600);
    font-size: 0.9rem;
    margin-bottom: 4px;
}

/* Start button */
.start-mission-btn {
    width: 100%;
    padding: 16px;
    font-size: 1.1rem;
    font-weight: 600;
    background: var(--lemon-500);
    color: var(--navy-500);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    margin-top: 8px;
    transition: all 0.2s;
}

.start-mission-btn:hover {
    background: var(--lemon-300);
    transform: translateY(-2px);
}

.start-mission-btn:disabled {
    background: var(--gray-100);
    color: var(--gray-600);
    cursor: not-allowed;
    transform: none;
}

@media (max-width: 600px) {
    .input-row { 
        flex-direction: column; 
        align-items: center;
    }
    .input-row .input-group {
        width: 100%;
    }
    .input-row .generate-btn {
        width: 100%;
        max-width: 300px;
    }
    .preview-grid { grid-template-columns: 1fr; }
}

/* Avatar panel */
.avatar-panel {
    margin-bottom: 12px;
}

.avatar-panel h3 {
    text-align: center;
    margin-bottom: 12px;
}

/* Desktop: avatars left, preview right */
.avatar-panel-content {
    display: flex;
    gap: 24px;
    align-items: center;
}

/* Avatar grid */
.avatar-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    justify-items: center;
    flex: 1;
    margin-bottom: 16px;
}

@media (max-width: 768px) {
    .avatar-panel-content {
        flex-direction: column;
    }
    .avatar-grid {
        grid-template-columns: repeat(5, 1fr);
        max-width: 300px;
    }
    .selected-avatar-preview {
        max-width: 200px;
    }
}

@media (max-width: 400px) {
    .avatar-grid {
        grid-template-columns: repeat(4, 1fr);
        max-width: 240px;
    }
}

.avatar-thumb {
    width: 100%;
    max-width: 120px;
    aspect-ratio: 1;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.2s;
    object-fit: cover;
    opacity: 0.7;
}

.avatar-thumb:hover {
    opacity: 1;
    transform: scale(1.1);
}

.avatar-thumb.selected {
    border-color: var(--lemon-500);
    opacity: 1;
    box-shadow: 0 0 20px rgba(216, 242, 117, 0.5);
}

.selected-avatar-preview {
    position: relative;
    width: 100%;
    max-width: 300px;
    flex: 1;
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
}

.preview-avatar {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    z-index: 1;
}

.preview-background {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: 2;
    pointer-events: none;
}

.preview-name-badge {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    color: white;
    z-index: 3;
}

/* Spinner */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* === SUMMARY POPUP === */
.summary-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.summary-popup {
    background: var(--white);
    border-radius: 24px;
    max-width: 540px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px;
    animation: popIn 0.3s ease;
    box-shadow: 0px 8px 24px rgba(31, 30, 48, 0.2);
}

@keyframes popIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.summary-header {
    text-align: center;
    margin-bottom: 24px;
}

.summary-header h2 {
    margin: 0 0 16px 0;
    font-size: 1.5rem;
    color: var(--navy-500);
}

.summary-rating {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    background: var(--navy-500);
    padding: 16px 32px;
    border-radius: 16px;
}

.rating-score {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--white);
}

.rating-label {
    font-size: 0.9rem;
    opacity: 0.9;
    color: var(--white);
}

.summary-section {
    background: var(--gray-50);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
}

.summary-section h3 {
    margin: 0 0 12px 0;
    font-size: 1rem;
    color: var(--navy-500);
}

.summary-section ul {
    margin: 0;
    padding-left: 20px;
}

.summary-section li {
    color: var(--gray-600);
    margin-bottom: 6px;
    font-size: 0.95rem;
}

.summary-tip {
    border-left: 3px solid var(--lemon-500);
}

.summary-tip p {
    margin: 0;
    color: var(--gray-600);
    font-size: 0.95rem;
}

.waitlist-section {
    background: var(--lemon-200);
    border: 1px solid var(--lemon-500);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.waitlist-section h3 {
    margin: 0 0 8px 0;
    color: var(--navy-500);
}

.waitlist-section > p {
    margin: 0 0 16px 0;
    color: var(--gray-600);
    font-size: 0.9rem;
}

.waitlist-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.waitlist-form input {
    width: 100%;
    max-width: 300px;
    padding: 12px 16px;
    border: 1px solid var(--gray-100);
    border-radius: 8px;
    background: white;
    outline: none;
    font-size: 1rem;
    text-align: center;
}

.waitlist-form button {
    padding: 12px 24px;
    background: var(--lemon-500);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.waitlist-form button:hover {
    transform: translateY(-1px);
}

.waitlist-success {
    color: #22c55e;
    font-weight: 500;
}

.summary-actions {
    display: flex;
    gap: 12px;
}

.btn-secondary, .btn-primary {
    flex: 1;
    padding: 14px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
}

.btn-secondary {
    background: var(--gray-100);
    border: none;
    color: var(--navy-500);
}

.btn-secondary:hover {
    background: var(--gray-50);
}

.btn-primary {
    background: var(--lemon-500);
    border: none;
    color: var(--navy-500);
}

.btn-primary:hover {
    background: var(--lemon-300);
}

/* === FOOTER === */
.site-footer {
    text-align: center;
    padding: 20px;
    color: var(--gray-600);
    font-size: 0.85rem;
}

.site-footer a {
    color: var(--navy-500);
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

/* === PRIVACY POPUP === */
.privacy-content {
    text-align: left;
}

.privacy-content h3 {
    color: var(--navy-500);
    margin: 20px 0 10px 0;
    font-size: 1.1rem;
}

.privacy-content h3:first-child {
    margin-top: 0;
}

.privacy-content p {
    color: var(--gray-600);
    margin: 0 0 12px 0;
    font-size: 0.95rem;
    line-height: 1.6;
}

.privacy-content ul {
    margin: 0 0 12px 0;
    padding-left: 20px;
}

.privacy-content li {
    color: var(--gray-600);
    font-size: 0.95rem;
    margin-bottom: 6px;
    line-height: 1.5;
}

.privacy-content a {
    color: var(--navy-500);
    transform: translateY(-2px);
}

/* Video overlay tip - unified for coaching tips and session info */
.video-overlay-tip {
    position: absolute;
    bottom: 12px;
    left: 12px;
    right: 12px;
    z-index: 10;
    padding: 10px 16px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    font-size: 0.8rem;
    color: white;
    display: none;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s;
}

.video-overlay-tip.visible {
    display: flex;
    opacity: 1;
}

.video-overlay-tip.praise {
    background: rgba(34, 197, 94, 0.85);
}

.video-overlay-tip.suggestion {
    background: rgba(251, 191, 36, 0.85);
    color: #1e293b;
}

.video-overlay-tip.reward {
    background: rgba(99, 102, 241, 0.85);
}

.video-overlay-tip.observation {
    background: rgba(0, 0, 0, 0.75);
}

.video-overlay-tip .tip-icon {
    flex-shrink: 0;
}

#tipText {
    font-size: 0.85rem;
    line-height: 1.3;
}

@keyframes tipSlideUp {
    from { 
        opacity: 0; 
        transform: translateX(-50%) translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateX(-50%) translateY(0); 
    }
}

@keyframes tipFadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* === SESSION VIEW === */
.session-view {
    display: none;
    height: 100vh;
}

.session-view.active {
    display: flex;
}

.session-sidebar {
    width: 320px;
    background: var(--white);
    padding: 20px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--gray-100);
    box-shadow: 0px 2px 4px 0px rgba(31, 30, 48, 0.24);
}

.session-sidebar h3 {
    margin: 0 0 12px 0;
    font-size: 0.9rem;
    color: var(--gray-600);
    text-transform: uppercase;
}

.current-mission {
    background: var(--gray-50);
    border-radius: 16px;
    padding: 12px;
    margin-bottom: 16px;
}

.current-mission h4 {
    margin: 0 0 6px 0;
    color: var(--navy-500);
}

.current-mission p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--gray-600);
}

.checkpoint-tracker {
    flex: 1;
}

.checkpoint-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 0.9rem;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.checkpoint-item.completed {
    opacity: 1;
}

.checkpoint-item.completed span {
    text-decoration: line-through;
    color: #22c55e;
}

.checkpoint-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.checkpoint-item.completed .checkpoint-icon {
    background: #22c55e;
    border-color: #22c55e;
}

.checkpoint-item.completed .checkpoint-icon::after {
    content: '✓';
    color: white;
    font-size: 12px;
    font-weight: bold;
}

@keyframes checkpointComplete {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); background: rgba(34, 197, 94, 0.2); }
    100% { transform: scale(1); }
}


.stop-btn {
    background: #ef4444;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    margin-top: auto;
}

.stop-btn:hover {
    background: #dc2626;
}

.session-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
}

.video-container {
    width: 100%;
    max-width: 512px;
    aspect-ratio: 1;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

.mic-permission-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    cursor: pointer;
}

.mic-permission-content {
    text-align: center;
    color: white;
    padding: 32px;
    max-width: 320px;
}

.mic-permission-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.mic-permission-content h3 {
    margin: 0 0 8px 0;
    font-size: 1.25rem;
}

.mic-permission-content p {
    margin: 0 0 20px 0;
    opacity: 0.8;
    font-size: 0.9rem;
}

.mic-help {
    margin-top: 16px;
    font-size: 0.75rem;
    opacity: 0.6;
    line-height: 1.4;
}

video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.status-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: #334155;
}

.status-listening { background: #22c55e; color: #000; }
.status-thinking { background: #eab308; color: #000; }
.status-speaking { background: #3b82f6; color: white; }

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--navy-500);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
    border-radius: 20px;
}

.loading-overlay.hidden { display: none; }

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--gray-600);
    border-top-color: var(--lemon-500);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-overlay p {
    margin-top: 16px;
    color: var(--white);
    font-size: 1rem;
}

.mic-indicator {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    background: #334155;
    transition: all 0.3s ease;
}

.mic-indicator.mic-on { background: #22c55e; color: #000; }
.mic-indicator.mic-off { background: #64748b; color: #fff; }

.mic-icon { width: 16px; height: 16px; }
.mic-indicator.mic-off .mic-icon { opacity: 0.5; }

/* Mobile */
@media (max-width: 768px) {
    .summary-popup {
        padding: 16px;
        max-height: 95vh;
    }
    .summary-header {
        margin-bottom: 12px;
    }
    .summary-header h2 {
        font-size: 1.2rem;
        margin-bottom: 8px;
    }
    .summary-rating {
        padding: 10px 20px;
    }
    .rating-score {
        font-size: 1.8rem;
    }
    .summary-section {
        padding: 12px;
        margin-bottom: 10px;
    }
    .summary-section h3 {
        margin-bottom: 8px;
        font-size: 0.9rem;
    }
    .summary-section li {
        font-size: 0.85rem;
        margin-bottom: 4px;
    }
    .session-view.active { 
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--gray-100);
        overflow-y: auto;
    }
    .session-sidebar { 
        order: 2;
        width: 100%; 
        border: none;
        box-shadow: none;
        background: transparent;
        padding: 16px;
        flex: none;
    }
    .session-main {
        order: 1;
        flex: 0 0 auto;
        padding: 0;
    }
    .video-container { 
        max-width: 100%; 
        width: 100%;
        border-radius: 0;
    }
    .current-mission {
        background: var(--white);
    }
    .checkpoint-tracker {
        background: var(--white);
        border-radius: 16px;
        padding: 12px;
    }
    .checkpoint-item {
        padding: 10px 0;
        border-bottom: 1px solid var(--gray-50);
    }
    .checkpoint-item:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }
    .checkpoint-item:first-child {
        padding-top: 0;
    }
    .stop-btn {
        width: 100%;
        margin-top: 16px;
        border-radius: 12px;
    }
    .video-overlay-tip {
        max-width: calc(100% - 20px);
        font-size: 0.75rem;
    }
}

/* === CONTENT PAGES (FAQ, Scenarios, Personas, etc.) === */
.page-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 24px 16px;
}

.page-header {
    margin-bottom: 32px;
}

.page-header h1 {
    font-size: 2rem;
    color: var(--navy-500);
    margin: 16px 0 0 0;
}

.back-link {
    color: var(--gray-600);
    text-decoration: none;
    font-size: 0.9rem;
}

.back-link:hover {
    color: var(--navy-500);
}

.page-intro, .page-meta {
    color: var(--navy-400);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 32px;
}

.page-meta {
    font-size: 0.85rem;
}

.page-content h2 {
    color: var(--navy-500);
    font-size: 1.4rem;
    margin: 40px 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--lemon-500);
}

.page-content h2:first-child {
    margin-top: 0;
}

/* FAQ Styles */
.faq-section {
    margin-bottom: 40px;
}

.faq-item {
    background: var(--white);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 12px;
}

.faq-item h3 {
    margin: 0 0 12px 0;
    font-size: 1.1rem;
    color: var(--navy-500);
}

.faq-item p {
    margin: 0 0 12px 0;
    color: var(--navy-400);
    line-height: 1.6;
}

.faq-item p:last-child {
    margin-bottom: 0;
}

.faq-item ul {
    margin: 12px 0;
    padding-left: 20px;
    color: var(--navy-400);
}

.faq-item li {
    margin-bottom: 6px;
    line-height: 1.5;
}

.faq-cta, .scenarios-cta, .personas-cta {
    background: var(--navy-500);
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    margin-top: 40px;
}

.faq-cta p, .scenarios-cta p, .personas-cta p {
    color: var(--white);
    margin: 0 0 16px 0;
    font-size: 1.1rem;
}

.faq-cta h2, .scenarios-cta h2 {
    color: var(--lemon-500);
    margin: 0 0 8px 0;
}

/* Global button styles for content pages */
.faq-cta .btn-primary,
.scenarios-cta .btn-primary,
.personas-cta .btn-primary,
.scenario-cta .btn-primary,
.persona-cta .btn-primary {
    display: inline-block;
    padding: 14px 28px;
    background: var(--lemon-500);
    color: var(--navy-500);
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s;
}

.faq-cta .btn-primary:hover,
.scenarios-cta .btn-primary:hover,
.personas-cta .btn-primary:hover,
.scenario-cta .btn-primary:hover,
.persona-cta .btn-primary:hover {
    background: var(--lemon-300);
}

/* Scenario Styles */
.scenario-category-section {
    margin-bottom: 48px;
}

.scenario-category-section > p {
    color: var(--gray-600);
    margin: 0 0 20px 0;
}

.scenario-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.scenario-card {
    background: var(--white);
    border-radius: 12px;
    padding: 20px;
    text-decoration: none;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.scenario-card:hover {
    border-color: var(--lemon-500);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.scenario-card h3 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    color: var(--navy-500);
}

.scenario-card p {
    margin: 0 0 12px 0;
    color: var(--navy-400);
    font-size: 0.9rem;
    line-height: 1.5;
}

.scenario-tags {
    font-size: 0.75rem;
    color: var(--gray-350);
}

/* Persona Styles */
.persona-section {
    margin-bottom: 48px;
}

.persona-section > p {
    color: var(--navy-400);
    margin: 0 0 20px 0;
}

.persona-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.persona-card {
    background: var(--white);
    border-radius: 12px;
    padding: 24px;
    border-left: 4px solid var(--gray-100);
}

.persona-card.supportive { border-left-color: #22c55e; }
.persona-card.defensive { border-left-color: #eab308; }
.persona-card.aggressive { border-left-color: #ef4444; }

.persona-card h3 {
    margin: 0 0 12px 0;
    font-size: 1.15rem;
    color: var(--navy-500);
}

.persona-desc {
    color: var(--navy-400);
    margin: 0 0 16px 0;
    line-height: 1.5;
}

.persona-behaviors h4, .persona-practice h4 {
    margin: 16px 0 8px 0;
    font-size: 0.85rem;
    color: var(--navy-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.persona-behaviors ul {
    margin: 0;
    padding-left: 18px;
    color: var(--navy-400);
    font-size: 0.9rem;
}

.persona-behaviors li {
    margin-bottom: 4px;
}

.persona-practice p {
    margin: 0;
    color: var(--navy-400);
    font-size: 0.9rem;
}

.persona-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.persona-item {
    background: var(--white);
    border-radius: 12px;
    padding: 20px;
}

.persona-item h3 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    color: var(--navy-500);
}

.persona-item p {
    margin: 0 0 12px 0;
    color: var(--navy-400);
    line-height: 1.5;
}

.persona-item p:last-child {
    margin-bottom: 0;
}

.persona-prompt {
    background: var(--gray-50);
    border-radius: 8px;
    padding: 12px;
    font-size: 0.9rem;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.tip-card {
    background: var(--white);
    border-radius: 12px;
    padding: 20px;
}

.tip-card h4 {
    margin: 0 0 8px 0;
    color: var(--navy-500);
    font-size: 1rem;
}

.tip-card p {
    margin: 0;
    color: var(--navy-400);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Legal Pages */
.legal-section {
    margin-bottom: 32px;
}

.legal-section h2 {
    border-bottom: none;
    font-size: 1.2rem;
    margin: 32px 0 12px 0;
}

.legal-section p {
    color: var(--navy-400);
    line-height: 1.6;
    margin: 0 0 12px 0;
}

.legal-section ul {
    margin: 12px 0;
    padding-left: 20px;
    color: var(--navy-400);
}

.legal-section li {
    margin-bottom: 6px;
    line-height: 1.5;
}

.legal-section a {
    color: var(--navy-500);
}

/* Responsive for content pages */
@media (max-width: 600px) {
    .page-container {
        padding: 16px 12px;
    }
    
    .page-header h1 {
        font-size: 1.6rem;
    }
    
    .scenario-grid, .persona-grid, .tips-grid {
        grid-template-columns: 1fr;
    }
}

/* === DETAIL PAGES === */
.scenario-detail-section, .persona-detail-section {
    margin-bottom: 40px;
}

.scenario-detail-section h2, .persona-detail-section h2 {
    color: var(--navy-500);
    font-size: 1.3rem;
    margin: 0 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--lemon-500);
}

.detail-list {
    margin: 0;
    padding-left: 20px;
    color: var(--navy-400);
}

.detail-list li {
    margin-bottom: 10px;
    line-height: 1.5;
}

.detail-list.checkmark {
    list-style: none;
    padding-left: 0;
}

.detail-list.checkmark li {
    padding-left: 28px;
    position: relative;
}

.detail-list.checkmark li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #22c55e;
    font-weight: bold;
}

/* Phrase cards */
.phrase-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.phrase-card {
    background: var(--white);
    border-radius: 12px;
    padding: 16px 20px;
    color: var(--navy-400);
    line-height: 1.5;
    border-left: 3px solid var(--lemon-500);
}

.phrase-card .quote-mark {
    color: var(--lemon-500);
    font-size: 1.5rem;
    font-weight: bold;
    margin-right: 4px;
}

/* Objections */
.objection-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.objection-item {
    background: var(--white);
    border-radius: 12px;
    padding: 20px;
}

.objection-text {
    color: var(--navy-500);
    font-weight: 600;
    margin-bottom: 8px;
    font-style: italic;
}

.objection-response {
    color: var(--navy-400);
    padding-left: 16px;
    border-left: 2px solid var(--lemon-500);
}

/* Tips list for persona detail */
.tips-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tip-item {
    background: var(--white);
    border-radius: 12px;
    padding: 16px 20px;
    color: var(--navy-400);
    line-height: 1.5;
}

/* CTAs on detail pages */
.scenario-cta, .persona-cta {
    background: var(--navy-500);
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    margin: 48px 0 32px 0;
}

.scenario-cta h2, .persona-cta h2 {
    color: var(--lemon-500);
    margin: 0 0 12px 0;
    border: none;
    padding: 0;
}

.scenario-cta p, .persona-cta p {
    color: var(--white);
    margin: 0 0 20px 0;
    opacity: 0.9;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
}

/* Related section */
.scenario-detail-section.related, .persona-detail-section.related {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--gray-100);
}

.scenario-detail-section.related h2, .persona-detail-section.related h2 {
    border-bottom: none;
}

/* Card link text */
.card-link {
    display: block;
    margin-top: 12px;
    font-size: 0.85rem;
    color: var(--navy-500);
    font-weight: 500;
}

/* Make persona cards clickable */
a.persona-card {
    text-decoration: none;
    display: block;
    transition: all 0.2s;
}

a.persona-card:hover {
    border-color: var(--lemon-500);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
