/* ============================================
   ENTRY SCREEN STYLES
   ============================================ */

#stage-entry {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; /* Changed from center to allow scrolling */
    padding: var(--spacing-lg);
    padding-top: 80px; /* Add top padding to maintain original vertical position */
    overflow-y: auto; /* Allow scrolling for longer content */
}

.entry-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    max-width: 1400px;
    width: 100%;
    animation: entryFadeIn var(--transition-slow) ease-out;
}

/* Camera Section */
.camera-section {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    animation: slideInLeft var(--transition-slow) ease-out;
}

.camera-preview-container {
    position: relative;
    background: var(--color-bg-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 16 / 9;
    box-shadow: var(--shadow-lg);
    border: 2px solid transparent;
    transition: border-color var(--transition-base);
}

.camera-preview-container:hover {
    border-color: var(--color-accent-primary);
}

.camera-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1); /* Mirror effect */
    display: none;
}

.camera-preview.active {
    display: block;
}

.camera-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    background: var(--color-bg-elevated);
}

.camera-placeholder.hidden {
    display: none;
}

.camera-icon {
    width: 80px;
    height: 80px;
    color: var(--color-text-tertiary);
    opacity: 0.5;
}

.camera-message {
    color: var(--color-text-secondary);
    font-size: 1rem;
}

/* Media Controls */
.media-controls {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
    animation: slideInLeft var(--transition-slow) 0.2s ease-out;
}

.control-btn {
    width: 56px;
    height: 56px;
    background: var(--color-bg-surface);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.control-btn:hover {
    background: var(--color-bg-hover);
    transform: scale(1.05);
}

.control-btn:active {
    transform: scale(0.95);
}

.control-btn svg {
    width: 24px;
    height: 24px;
    transition: all var(--transition-base);
}

/* Icon States */
.control-btn .icon-video-off,
.control-btn .icon-audio-off {
    display: none;
    position: absolute;
}

.control-btn.muted .icon-video-on,
.control-btn.muted .icon-audio-on {
    display: none;
}

.control-btn.muted .icon-video-off,
.control-btn.muted .icon-audio-off {
    display: block;
}

/* Active State */
.control-btn:not(.muted) {
    background: var(--color-accent-primary);
    color: var(--color-bg-deep);
    box-shadow: 0 0 20px var(--color-accent-glow);
}

.control-btn:not(.muted):hover {
    background: var(--color-accent-hover);
}

/* Muted State */
.control-btn.muted {
    background: var(--color-danger);
    color: white;
}

.control-btn.muted:hover {
    background: #ff5577;
}

/* Input Section */
.input-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    animation: slideInRight var(--transition-slow) 0.1s ease-out;
}

.input-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

/* Heading */
.entry-heading {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.heading-line {
    display: block;
    animation: fadeInUp var(--transition-slow) ease-out;
}

.heading-line:nth-child(2) {
    animation-delay: 0.1s;
}

/* Language Selector - Old styles (kept for compatibility) */
.language-selector {
    display: none; /* Hidden by default - using new footer buttons instead */
}

.language-label {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    cursor: pointer;
}

.language-label svg {
    width: 20px;
    height: 20px;
    color: var(--color-accent-primary);
}

.language-dropdown {
    padding: var(--spacing-xs) var(--spacing-sm);
    background: var(--color-bg-elevated);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--color-text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    transition: all var(--transition-base);
}

.language-dropdown:hover {
    border-color: var(--color-accent-primary);
    background: var(--color-bg-surface);
}

.language-dropdown:focus {
    border-color: var(--color-accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.language-dropdown option {
    background: var(--color-bg-elevated);
    color: var(--color-text-primary);
}

/* Input Wrapper */
.input-wrapper {
    background: var(--color-bg-surface);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    transition: all var(--transition-base);
    animation: fadeInUp var(--transition-slow) 0.2s ease-out;
}

.input-wrapper:focus-within {
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.08);
}

/* Image Preview */
.image-preview-container {
    margin-bottom: var(--spacing-sm);
}

.image-preview {
    position: relative;
    display: inline-block;
    border-radius: var(--radius-sm);
    overflow: hidden;
    max-width: 200px;
}

.image-preview img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 150px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.remove-image-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    padding: 0;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
    backdrop-filter: blur(4px);
}

.remove-image-btn svg {
    width: 14px;
    height: 14px;
    color: white;
}

.remove-image-btn:hover {
    background: rgba(220, 38, 38, 0.9);
    transform: scale(1.1);
}

.topic-input {
    width: 100%;
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--color-text-primary);
    min-height: 100px;
    max-height: 300px;
    resize: none;
    overflow-y: auto;
}

.topic-input:focus,
.topic-input:focus-visible {
    outline: none !important;
    border: none !important;
}

.topic-input::placeholder {
    color: var(--color-text-tertiary);
}

.input-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--spacing-sm);
    gap: var(--spacing-sm);
}

.input-footer-left {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.footer-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    background: transparent;
    color: var(--color-text-secondary);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-base);
    font-size: 0.875rem;
    font-weight: 500;
}

.footer-action-btn svg {
    width: 18px;
    height: 18px;
    stroke-width: 2;
}

.footer-action-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--color-text-primary);
}

.footer-action-btn:active {
    background: rgba(255, 255, 255, 0.12);
    transform: scale(0.95);
}

.language-text {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.char-count {
    font-size: 0.875rem;
    color: var(--color-text-tertiary);
    font-family: var(--font-mono);
    white-space: nowrap;
}

/* Join Button */
.join-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: 1.125rem;
    font-weight: 600;
    background: var(--color-bg-surface);
    color: var(--color-text-secondary);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    animation: fadeInUp var(--transition-slow) 0.3s ease-out;
}

.join-btn:disabled {
    cursor: not-allowed;
}

.join-btn:not(:disabled) {
    background: var(--gradient-accent);
    color: var(--color-bg-deep);
    box-shadow: 0 4px 16px var(--color-accent-glow);
    animation: buttonActivate var(--transition-bounce) ease-out;
}

.join-btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--color-accent-glow);
}

.join-btn:not(:disabled):active {
    transform: translateY(0);
}

.btn-icon {
    width: 20px;
    height: 20px;
    transition: transform var(--transition-base);
}

.join-btn:not(:disabled):hover .btn-icon {
    transform: translateX(4px);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .entry-container {
        grid-template-columns: 1fr;
        max-width: 600px;
        gap: var(--spacing-lg);
    }
    
    .entry-heading {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    #stage-entry {
        padding: var(--spacing-md);
    }
    
    .entry-heading {
        font-size: 2rem;
    }
    
    .topic-input {
        font-size: 1rem;
        min-height: 100px;
    }
    
    .join-btn {
        font-size: 1rem;
        padding: var(--spacing-sm) var(--spacing-lg);
    }
}

/* Sessions Panel Button (Top Right) */
.sessions-panel-btn {
    position: absolute;
    top: var(--spacing-lg);
    right: var(--spacing-lg);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-md);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--color-text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
    z-index: 10;
}

.sessions-panel-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(102, 126, 234, 0.5);
    transform: translateY(-2px);
}

.sessions-panel-btn svg {
    width: 18px;
    height: 18px;
}

/* Sessions Side Panel */
.sessions-side-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    pointer-events: none;
    z-index: 1000;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.sessions-side-panel.open {
    pointer-events: auto;
    opacity: 1;
}

.sessions-panel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.sessions-side-panel.open .sessions-panel-overlay {
    opacity: 1;
}

.sessions-panel-content {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 400px;
    max-width: 90vw;
    background: var(--color-bg-primary);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.3);
    transform: translateX(100%);
    transition: transform var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

.sessions-side-panel.open .sessions-panel-content {
    transform: translateX(0);
}

/* Panel Header */
.sessions-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.sessions-panel-title {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0;
}

.sessions-panel-title svg {
    width: 20px;
    height: 20px;
    color: var(--color-primary);
}

.sessions-panel-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-base);
}

.sessions-panel-close:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.sessions-panel-close svg {
    width: 18px;
    height: 18px;
    color: var(--color-text-secondary);
}

/* Panel Body */
.sessions-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: var(--spacing-md);
}

/* Session Card in Panel */
.session-card {
    position: relative; /* CRITICAL: For badge positioning */
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 12px 16px; /* Reduced from var(--spacing-md) for thinner cards */
    margin-bottom: var(--spacing-md);
    cursor: pointer;
    transition: all var(--transition-base);
}

.session-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(102, 126, 234, 0.5);
    transform: translateX(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.session-card-header {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.session-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.session-meta {
    flex: 1;
}

.session-topic {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-text-primary);
    line-height: 1.4;
    margin-bottom: var(--spacing-xs);
}

.session-date {
    font-size: 0.75rem;
    color: var(--color-text-tertiary);
    font-family: var(--font-mono);
}

/* Session stats section removed for thinner cards */

/* Session Loading/Empty States */
.sessions-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-xl);
    color: var(--color-text-tertiary);
    font-size: 0.875rem;
    min-height: 200px;
}

.loading-spinner-small {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.session-empty {
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--color-text-tertiary);
    font-size: 0.875rem;
}

@media (max-width: 768px) {
    .sessions-panel-btn {
        top: var(--spacing-sm);
        right: var(--spacing-sm);
        padding: var(--spacing-xs) var(--spacing-sm);
        font-size: 0.8125rem;
    }
    
    .sessions-panel-btn span {
        display: none;
    }
    
    .sessions-panel-content {
        width: 100%;
        max-width: 100%;
    }
}

/* ============================================
   SESSION BADGES - ASYNC LESSON GENERATION
   Aurora Neutrals + Electric Accents Design
   ============================================ */

.session-badges {
    position: absolute;
    top: -8px;
    right: -8px;
    display: flex;
    gap: 6px;
    z-index: 10;
}

.badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* NEW Badge */
.badge-new {
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%);
    color: white;
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 4px 12px rgba(255, 107, 107, 0.5);
    }
}

/* GENERATING Badge */
.badge-generating {
    background: linear-gradient(135deg, #7877C6 0%, #4C8BF5 100%);
    color: white;
    animation: badgeShimmer 2s linear infinite;
    background-size: 200% 100%;
}

@keyframes badgeShimmer {
    0% {
        background-position: 200% center;
    }
    100% {
        background-position: -200% center;
    }
}

/* Badge Spinner */
.badge-spinner {
    width: 10px;
    height: 10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: badgeSpinnerRotate 0.8s linear infinite;
}

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

/* ERROR Badge */
.badge-error {
    background: #EF4444;
    color: white;
    animation: badgeShake 0.5s ease-out;
}

@keyframes badgeShake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-4px);
    }
    75% {
        transform: translateX(4px);
    }
}

/* ============================================
   SESSION CARD STATUS STATES
   ============================================ */

/* Generating Session Card */
.session-card.session-generating {
    opacity: 0.9;
    border: 1px solid rgba(120, 119, 198, 0.3);
    position: relative;
}

.session-card.session-generating::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: var(--radius-md);
    padding: 2px;
    background: linear-gradient(135deg, #7877C6, #4C8BF5, #7877C6);
    background-size: 200% 100%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: borderFlow 3s linear infinite;
    pointer-events: none;
}

@keyframes borderFlow {
    to {
        background-position: -200% 0;
    }
}

.session-card.session-generating:hover {
    border-color: rgba(120, 119, 198, 0.5);
    transform: translateX(-2px);
}

/* Error Session Card */
.session-card.session-error {
    border-color: rgba(239, 68, 68, 0.3);
    opacity: 0.85;
}

.session-card.session-error:hover {
    border-color: rgba(239, 68, 68, 0.5);
}

/* Ready Session Card (Recent) */
.session-card.session-ready {
    /* Default styling */
}

/* ============================================
   LESSONS GRID SECTION (Below Entry Container)
   ============================================ */

.lessons-grid-section {
    max-width: 1400px;
    width: 100%;
    margin-top: var(--spacing-xl);
    animation: fadeInUp var(--transition-slow) ease-out 0.3s backwards;
}

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

.lessons-grid-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-lg);
    padding: 0 var(--spacing-sm);
}

.lessons-grid-title {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0;
}

.lessons-grid-title svg {
    width: 28px;
    height: 28px;
    color: var(--color-primary);
}

.refresh-sessions-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    padding: var(--spacing-sm);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
}

.refresh-sessions-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: rotate(90deg);
}

.refresh-sessions-btn svg {
    width: 20px;
    height: 20px;
}

/* Lessons Grid Container */
.lessons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    padding: 0 var(--spacing-sm);
}

/* Responsive grid columns */
@media (min-width: 1200px) {
    .lessons-grid {
        grid-template-columns: repeat(4, 1fr); /* 4 cards per row on large screens */
    }
}

@media (min-width: 900px) and (max-width: 1199px) {
    .lessons-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 cards per row on medium screens */
    }
}

@media (min-width: 600px) and (max-width: 899px) {
    .lessons-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 cards per row on tablets */
    }
}

@media (max-width: 599px) {
    .lessons-grid {
        grid-template-columns: 1fr; /* 1 card per row on mobile */
    }
}

/* Session Card in Grid (reuse existing styles) */
.lessons-grid .session-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 12px 16px; /* Reduced padding for thinner cards */
    cursor: pointer;
    transition: all var(--transition-base);
    margin-bottom: 0; /* Override panel margin */
}

.lessons-grid .session-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(102, 126, 234, 0.5);
    transform: translateY(-4px); /* Lift up instead of slide left */
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* Empty/Loading States for Grid */
.lessons-grid .sessions-loading,
.lessons-grid .session-empty {
    grid-column: 1 / -1; /* Span all columns */
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--color-text-tertiary);
}

/* ============================================
   TOAST ANIMATIONS
   ============================================ */

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* ============================================
   LIMITATIONS MODAL - PREMIUM DESIGN
   ============================================ */

.limitations-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.limitations-modal.hidden {
    display: none;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease-out;
}

.modal-container {
    position: relative;
    max-width: 640px;
    width: 90%;
    max-height: 85vh;
    background: linear-gradient(135deg, rgba(30, 30, 40, 0.98) 0%, rgba(20, 20, 30, 0.98) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
    padding: 0;
    animation: modalScaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px 32px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-icon {
    font-size: 4rem;
    margin-bottom: 12px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    animation: iconFloat 3s ease-in-out infinite;
}

.modal-header h2 {
    color: white;
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.modal-content {
    padding: 32px 32px 96px;
    overflow-y: auto;
    max-height: calc(85vh - 280px);
    background: linear-gradient(135deg, #1a1a28 0%, #16161f 100%);
}

.modal-content h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 16px 0;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    padding-bottom: 8px;
}

.modal-content h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
}

.modal-content h3:not(:first-child) {
    margin-top: 32px;
}

.modal-content ul {
    list-style: none;
    padding: 0;
    margin: 0 0 8px 0;
}

.modal-content li {
    padding: 12px 16px;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #f0f0f0;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.modal-content li:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(4px);
}

.capabilities-list li {
    border-left-color: #4ade80;
    background: rgba(74, 222, 128, 0.08);
}

.capabilities-list li:hover {
    background: rgba(74, 222, 128, 0.15);
}

.limitations-list li {
    border-left-color: #fbbf24;
    background: rgba(251, 191, 36, 0.08);
}

.limitations-list li:hover {
    background: rgba(251, 191, 36, 0.15);
}

.limitations-list li:last-child {
    margin-bottom: 28px;
}

.roadmap-list li {
    border-left-color: #818cf8;
    background: rgba(129, 140, 248, 0.08);
}

.roadmap-list li:hover {
    background: rgba(129, 140, 248, 0.15);
}

.modal-footer {
    padding: 24px 32px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, #1a1a28 0%, #16161f 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-btn {
    width: 100%;
    padding: 16px 32px;
    border: none;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.modal-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.modal-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.modal-primary:hover::before {
    left: 100%;
}

.modal-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.modal-primary:active {
    transform: translateY(0);
}

.fix-note {
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    text-align: center;
}

.modal-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.modal-checkbox:hover {
    color: rgba(255, 255, 255, 0.8);
}

.modal-checkbox input[type="checkbox"] {
    cursor: pointer;
    width: 18px;
    height: 18px;
    accent-color: #667eea;
}

.modal-checkbox span {
    user-select: none;
}

/* Scrollbar styling for modal content */
.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

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

@keyframes modalScaleIn {
    from {
        opacity: 0;
        transform: scale(0.85) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes iconFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .modal-container {
        max-height: 90vh;
    }
    
    .modal-header {
        padding: 32px 24px;
    }
    
    .modal-header h2 {
        font-size: 1.5rem;
    }
    
    .modal-content {
        padding: 24px;
    }
    
    .modal-footer {
        padding: 20px 24px 24px;
    }
}

/* ============================================
   Limitations Modal - Specificity Overrides
   (Ensure styles win over generic .modal-* rules
   defined in meets-session.css)
   ============================================ */
.limitations-modal .modal-content {
    background: linear-gradient(135deg, #1a1a28 0%, #16161f 100%) !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    width: 100% !important;
    max-width: none !important;
    padding: 32px !important;
}

.limitations-modal .modal-container {
    width: min(640px, 90%) !important;
    max-width: 640px !important;
    height: auto !important;
}

.limitations-modal .modal-content h3 {
    color: #ffffff !important;
    margin: 0 0 16px 0 !important;
}

.limitations-modal .modal-content p {
    color: #e0e0e0 !important;
}

.limitations-modal .modal-footer .modal-btn {
    width: 100% !important;
}

