/* ============================================
   SESSION SCREEN STYLES - Google Meet Style
   ============================================ */

#stage-session {
    background: linear-gradient(135deg, #6b8aae 0%, #5a7a9e 50%, #4a6a8e 100%);
}

.session-container {
    width: 100%;
    height: 100vh;
    display: flex;
    position: relative;
}

/* ============================================
   SESSION HEADER - Hidden (Google Meet style)
   ============================================ */

.session-header {
    display: none;
}

/* ============================================
   MAIN CONTENT AREA
   ============================================ */

.session-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: margin-right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.session-main.chat-open {
    margin-right: 360px;
}

/* Meeting Info Overlay (Bottom Left) - Aligned with controls */
.meeting-info-overlay {
    position: fixed;
    bottom: var(--spacing-sm);
    left: var(--spacing-lg);
    z-index: 10;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 72px;
}

.meeting-time {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 2px;
}

.meeting-title {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* ============================================
   VIDEO AREA
   ============================================ */

.video-area {
    flex: 1;
    background: transparent;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md) var(--spacing-lg);
    padding-bottom: 110px;
}

/* AI Participant - Almost Full Screen */
.ai-participant {
    width: 100%;
    height: 100%;
    max-height: calc(100vh - 200px);
    background: rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.ai-avatar {
    width: 180px;
    height: 180px;
    background: white;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all var(--transition-base);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    padding: var(--spacing-md);
}

.ai-avatar.speaking {
    animation: speakingPulse 0.8s ease-in-out infinite;
    box-shadow: 0 8px 48px rgba(0, 217, 255, 0.4);
}

.avatar-icon {
    width: 80px;
    height: 80px;
    color: #333;
}

/* Audio Indicator */
.audio-indicator {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    display: none;
    gap: 4px;
    align-items: flex-end;
    height: 24px;
}

.ai-avatar.speaking .audio-indicator {
    display: flex;
}

.indicator-bar {
    width: 4px;
    background: var(--color-accent-primary);
    border-radius: var(--radius-full);
    height: 4px;
}

.ai-avatar.speaking .indicator-bar:nth-child(1) {
    animation: audioBar 0.6s ease-in-out infinite;
}

.ai-avatar.speaking .indicator-bar:nth-child(2) {
    animation: audioBar 0.6s ease-in-out 0.2s infinite;
}

.ai-avatar.speaking .indicator-bar:nth-child(3) {
    animation: audioBar 0.6s ease-in-out 0.4s infinite;
}

.participant-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    position: absolute;
    bottom: var(--spacing-lg);
}

/* User Video (Picture-in-Picture) - Overlaid on AI rectangle */
.user-video-pip {
    position: absolute;
    bottom: var(--spacing-lg);
    right: var(--spacing-lg);
    width: 220px;
    aspect-ratio: 16 / 9;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    transition: all var(--transition-base);
    border: 2px solid rgba(255, 255, 255, 0.2);
    z-index: 10;
}

.user-video-pip:hover {
    transform: scale(1.05);
}

.pip-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
    display: none;
    border-radius: 12px;
}

.pip-video.active {
    display: block;
}

.pip-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 12px;
}

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

.pip-initials {
    font-size: 2rem;
    font-weight: 600;
    color: #888;
}

/* User Name Label on PiP */
.pip-name-label {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    backdrop-filter: blur(4px);
}

/* ============================================
   CHAT PANEL
   ============================================ */

.chat-panel {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    width: 360px;
    background: white;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -4px 0 16px rgba(0, 0, 0, 0.2);
    z-index: 150;
    border-top-left-radius: 16px;
    border-bottom-left-radius: 16px;
    overflow: hidden;
}

.chat-panel.open {
    transform: translateX(0);
}

.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-lg) var(--spacing-lg);
    border-bottom: 1px solid #e8eaed;
    background: white;
    min-height: 72px;
}

.chat-header h3 {
    font-size: 1rem;
    font-weight: 500;
    color: #3c4043;
}

.chat-close {
    width: 32px;
    height: 32px;
    background: transparent;
    color: #5f6368;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
}

.chat-close:hover {
    background: #f1f3f4;
    color: #202124;
}

.chat-close svg {
    width: 18px;
    height: 18px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    background: #f8f9fa;
}

/* Chat Messages */
.chat-message {
    display: flex;
    animation: fadeInUp var(--transition-base) ease-out;
}

.chat-message.user {
    justify-content: flex-end;
}

.chat-message.ai {
    justify-content: flex-start;
}

.message-content {
    display: flex;
    gap: var(--spacing-xs);
    max-width: 80%;
}

.chat-message.user .message-content {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 32px;
    height: 32px;
    background: #e8f0fe;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: #1967d2;
    flex-shrink: 0;
}

.chat-message.ai .message-avatar {
    background: #e8f0fe;
    color: #1967d2;
}

.message-bubble {
    background: white;
    border-radius: 18px;
    padding: 10px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.chat-message.user .message-bubble {
    background: #d3e3fd;
    color: #041e49;
}

.message-bubble p {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.5;
    word-wrap: break-word;
    color: #3c4043;
}

.chat-message.user .message-bubble p {
    color: #041e49;
}

.message-time {
    font-size: 0.75rem;
    opacity: 0.6;
    align-self: flex-end;
    color: #5f6368;
}

.chat-input-area {
    padding: var(--spacing-md);
    border-top: 1px solid #e8eaed;
    background: white;
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: var(--spacing-sm);
    margin-bottom: var(--spacing-xs);
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--color-text-tertiary);
    border-radius: 50%;
}

.typing-indicator span:nth-child(1) {
    animation: typingDot 1.4s ease-in-out infinite;
}

.typing-indicator span:nth-child(2) {
    animation: typingDot 1.4s ease-in-out 0.2s infinite;
}

.typing-indicator span:nth-child(3) {
    animation: typingDot 1.4s ease-in-out 0.4s infinite;
}

/* VOICE INTEGRATION: Session Screen Mic Button States */

/* Default muted state (red icon with strike-through) - not clickable */
.session-control-btn.muted.voice-disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* Muted but ready at breakpoint (red icon pulsing with strike-through) - clickable */
.session-control-btn.muted.pulse-voice {
    animation: mutedPulse 2s ease-in-out infinite;
    background: rgba(234, 67, 53, 0.2); /* Red background for muted state */
    opacity: 1;
    pointer-events: auto;
    cursor: pointer;
}

/* Recording state (normal mic icon, no strike-through, red color) - user is speaking */
.session-control-btn.recording-voice {
    animation: recordingPulse 1.5s ease-in-out infinite;
    background: rgba(234, 67, 53, 0.3); /* Red background for recording */
    color: #ea4335; /* Red icon color */
}

/* Loading state (processing STT) */
.session-control-btn.mic-loading {
    animation: loadingPulse 1s ease-in-out infinite;
    background: rgba(66, 133, 244, 0.3); /* Blue background for loading */
    opacity: 0.7;
    cursor: wait;
    pointer-events: none;
}

/* Animations */
@keyframes mutedPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(234, 67, 53, 0.7);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(234, 67, 53, 0);
        transform: scale(1.05);
    }
}

@keyframes recordingPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(234, 67, 53, 0.7);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(234, 67, 53, 0);
        transform: scale(1.05);
    }
}

@keyframes loadingPulse {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.02);
    }
}

.chat-input-wrapper {
    display: flex;
    gap: var(--spacing-sm);
    align-items: flex-end;
}

/* VOICE INTEGRATION: Removed chat mic button styles (using control bar mic instead) */

.chat-input {
    flex: 1;
    background: #f1f3f4;
    border: 1px solid transparent;
    border-radius: 24px;
    padding: 12px 16px;
    color: #3c4043;
    font-size: 0.875rem;
    max-height: 100px;
    transition: all var(--transition-base);
}

.chat-input:focus {
    border-color: #1a73e8;
    background: white;
    outline: none;
}

.send-btn {
    width: 40px;
    height: 40px;
    background: #1a73e8;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
}

.send-btn:hover {
    background: #1765cc;
    transform: scale(1.05);
}

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

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

/* ============================================
   SCREEN SHARING LAYOUT
   ============================================ */

/* Screen Sharing Container */
.screenshare-layout {
    width: 100%;
    height: 100%;
    display: flex;
    gap: var(--spacing-md);
    opacity: 1;
    animation: fadeInSlideLeft 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.screenshare-layout.hidden {
    display: none;
}

/* Normal Layout */
.normal-layout {
    width: 100%;
    height: 100%;
    display: flex;
    opacity: 1;
    animation: fadeInScale 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.normal-layout.hidden {
    display: none;
}

/* Animations */
@keyframes fadeInSlideLeft {
    0% {
        opacity: 0;
        transform: translateX(30px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeInSlideUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInSlideRight {
    0% {
        opacity: 0;
        transform: translateX(-20px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Main Shared Screen Area */
.screenshare-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 12px;
    overflow: hidden;
    animation: fadeInSlideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.1s backwards;
}

.shared-screen {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    overflow: hidden;
}

/* Canvas zoom wrapper - this gets zoomed/translated, not the SVG directly */
.canvas-zoom-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-origin: center center;
    transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.screen-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
    color: rgba(255, 255, 255, 0.5);
}

.screen-placeholder svg {
    opacity: 0.5;
}

.screen-placeholder p {
    font-size: 1.25rem;
    font-weight: 500;
    margin: 0;
}

/* Participants Sidebar */
.participants-sidebar {
    width: 360px;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    flex-shrink: 0;
    animation: fadeInSlideRight 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.15s backwards;
}

.sidebar-participant {
    flex: 1;
    min-height: 0;
    animation: fadeInSlideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

.sidebar-participant:first-child {
    animation-delay: 0.2s;
}

.sidebar-participant:last-child {
    animation-delay: 0.25s;
}

.sidebar-video {
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

/* Sidebar Labels */
.sidebar-label {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    backdrop-filter: blur(4px);
}

/* AI Avatar (Small for Sidebar) */
.ai-avatar-small {
    width: 120px;
    height: 120px;
    background: white;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.avatar-icon-small {
    width: 80px;
    height: 80px;
    color: #1967d2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-icon-small svg {
    width: 100%;
    height: 100%;
}

/* Audio Indicator (Small) */
.audio-indicator-small {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: #1967d2;
    padding: 6px 12px;
    border-radius: 20px;
    display: none;
    gap: 3px;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.audio-indicator-small.active {
    display: flex;
}

.audio-indicator-small .indicator-bar {
    width: 3px;
    height: 12px;
    background: white;
    border-radius: 2px;
    animation: audioWave 0.8s ease-in-out infinite;
}

/* User Video in Sidebar */
.sidebar-user-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
    display: none;
}

.sidebar-user-video.active {
    display: block;
}

.sidebar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
}

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

.sidebar-initials {
    font-size: 3rem;
    font-weight: 600;
    color: white;
}

/* ============================================
   CONTROL BAR - Google Meet Style
   ============================================ */

.control-bar {
    position: fixed;
    bottom: var(--spacing-sm);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0;
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    z-index: 100;
    width: auto;
}

.controls-center {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.controls-left {
    display: flex;
    gap: 12px;
    align-items: center;
    padding-right: 12px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.controls-right {
    display: none;
}

.session-control-btn {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all var(--transition-base);
    color: white;
    border: none;
}

.session-control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

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

.session-control-btn svg {
    width: 22px;
    height: 22px;
}

/* Right side controls - different styling */
.controls-right .session-control-btn {
    background: rgba(60, 64, 67, 0.85);
    backdrop-filter: blur(8px);
}

.controls-right .session-control-btn:hover {
    background: rgba(80, 84, 87, 0.95);
}

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

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

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

/* Active State */
.session-control-btn:not(.muted):not(.danger) {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.session-control-btn:not(.muted):not(.danger):hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Muted State */
.session-control-btn.muted {
    background: #ea4335;
    color: white;
}

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

/* Danger Button (End Call) - Prominent */
.session-control-btn.danger {
    background: #ea4335;
    color: white;
    width: 56px;
    height: 56px;
}

.session-control-btn.danger:hover {
    background: #ff5242;
    transform: scale(1.15);
}

.session-control-btn.danger svg {
    width: 26px;
    height: 26px;
}

/* Unread Badge */
.unread-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    background: var(--color-danger);
    color: white;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    animation: scaleIn var(--transition-base) ease-out;
}

/* ============================================
   END CALL MODAL
   ============================================ */

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

.modal.hidden {
    display: none;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    animation: modalFadeIn var(--transition-base) ease-out;
}

.modal-content {
    position: relative;
    background: var(--color-bg-surface);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    max-width: 400px;
    width: 90%;
    box-shadow: var(--shadow-lg);
    animation: modalScaleIn var(--transition-base) ease-out;
}

.modal-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-sm);
}

.modal-content p {
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-lg);
}

.modal-actions {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: flex-end;
}

.modal-btn {
    padding: var(--spacing-sm) var(--spacing-lg);
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: all var(--transition-base);
}

.modal-btn.secondary {
    background: var(--color-bg-elevated);
    color: var(--color-text-primary);
}

.modal-btn.secondary:hover {
    background: var(--color-bg-hover);
}

.modal-btn.danger {
    background: var(--color-danger);
    color: white;
}

.modal-btn.danger:hover {
    background: #ff5577;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
    .user-video-pip {
        width: 180px;
    }
    
    .chat-panel {
        width: 320px;
    }
}

@media (max-width: 768px) {
    .session-header {
        padding: var(--spacing-sm) var(--spacing-md);
    }
    
    .session-info {
        display: none;
    }
    
    .ai-avatar {
        width: 150px;
        height: 150px;
    }
    
    .avatar-icon {
        width: 70px;
        height: 70px;
    }
    
    .user-video-pip {
        width: 120px;
        bottom: var(--spacing-md);
        left: var(--spacing-md);
    }
    
    .chat-panel {
        position: absolute;
        top: 0;
        right: 0;
        width: 100%;
        height: 100%;
        z-index: 100;
    }
    
    .control-bar {
        padding: var(--spacing-sm);
        height: 70px;
    }
    
    .session-control-btn {
        width: 48px;
        height: 48px;
    }
}

/* ============================================
   GEOMETRY CANVAS & BLACKBOARD LAYERS
   ============================================ */

.meets-canvas-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: transparent;
}

/* Geometry SVG Canvas Styling - Matches tutor-v2 */
#meets-geometry-canvas {
    width: 100%;
    height: 100%;
    display: block;
    background: #ffffff;
    border-radius: 0;
    cursor: crosshair;
    position: relative;
}

#meets-geometry-canvas.panning {
    cursor: grab;
}

#meets-geometry-canvas.panning:active {
    cursor: grabbing;
}

/* Ensure SVG text elements don't inherit incorrect sizing */
#meets-geometry-canvas text {
    font-family: Arial, sans-serif;
}

/* Grid lines - matching tutor-v2 exactly */
#meets-geometry-canvas .grid-line {
    stroke: #e5e7eb;
    stroke-width: 0.02;
}

#meets-geometry-canvas .grid-line-major {
    stroke: #d1d5db;
    stroke-width: 0.03;
}

/* Axis styling to match tutor-v2 */
#meets-geometry-canvas .axis-line {
    stroke: #a1a3a5;  /* Much lighter gray - was #6b7280 */
    stroke-width: 0.025;  /* Much thinner - was 0.05 */
}

#meets-geometry-canvas .axis-arrow {
    fill: #a1a3a5;  /* Match lighter axis color - was #6b7280 */
}

#meets-geometry-canvas .axis-label {
    fill: #a1a3a5;
    font-size: 0.22px;  /* Reduced from 0.5px to prevent zooming issues */
}

/* Grid pattern background for canvas (optional) */
#meets-geometry-canvas.with-grid {
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
    background-position: center center;
}

.meets-blackboard-overlay {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 400px;
    max-height: calc(100% - 40px);
    background: rgba(30, 30, 30, 0.95);
    border-radius: 12px;
    padding: 20px;
    overflow-y: auto;
    z-index: 2;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    display: none; /* Hidden until content added */
    color: white;
    font-family: 'Architects Daughter', cursive;
}

.meets-blackboard-overlay::-webkit-scrollbar {
    width: 8px;
}

.meets-blackboard-overlay::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.meets-blackboard-overlay::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.meets-blackboard-overlay::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* ============================================
   LOGOUT BUTTON
   ============================================ */

.logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    cursor: pointer;
    transition: all var(--transition-base);
    margin-right: var(--spacing-sm);
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    transform: scale(1.05);
}

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

/* Diagnostic Container */
.diagnostic-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    width: 90%;
    max-width: 700px;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

.diagnostic-container.hidden {
    display: none;
}

/* ============================================
   LEADING QUESTION BANNER
   ============================================ */

.leading-question-banner {
    position: absolute;
    bottom: 64px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    
    /* Premium Glassmorphic Card - Dark for contrast */
    background: linear-gradient(135deg, rgba(12, 16, 28, 0.75), rgba(16, 22, 36, 0.75));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.04);
    
    /* Sizing */
    width: min(760px, 92%);
    padding: 18px 26px;
    
    /* Layout */
    display: flex;
    align-items: center;
    gap: 14px;
    
    /* Animations */
    animation: slideUpBanner 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transition: all 0.3s ease;
}

.leading-question-banner.hidden {
    display: none;
}

.leading-question-banner.exit {
    animation: slideDownBanner 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.banner-icon {
    font-size: 1.6rem;
    flex-shrink: 0;
    filter: drop-shadow(0 4px 10px rgba(255, 255, 0, 0.25));
}

.banner-text {
    flex: 1;
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.5;
    text-align: left;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

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

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

/* Responsive */
@media (max-width: 768px) {
    .leading-question-banner {
        width: calc(100% - 32px);
        padding: 14px 18px;
        bottom: 48px;
    }
    
    .banner-text {
        font-size: 1.05rem;
    }
}

/* ============================================
   TUTOR STATUS INDICATOR
   ============================================ */

.tutor-status {
    margin-top: 12px;
    padding: 10px 14px;
    background: rgba(15, 23, 42, 0.75);
    border-radius: 999px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.tutor-status.hidden {
    display: none;
}

.status-icon {
    font-size: 1.2rem;
    animation: statusPulse 1.5s ease-in-out infinite;
}

.status-text {
    font-size: 0.75rem;
    color: white;
    font-weight: 500;
    white-space: nowrap;
}

/* Different colors for different stages */
.tutor-status.parsing .status-icon {
    filter: hue-rotate(200deg); /* Blue */
}

.tutor-status.evaluating .status-icon {
    filter: hue-rotate(280deg); /* Purple */
}

.tutor-status.audio .status-icon {
    filter: hue-rotate(30deg); /* Orange */
}

.tutor-status.actions .status-icon {
    filter: hue-rotate(100deg); /* Green */
}

@keyframes statusPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

/* Center the status BELOW the AI avatar only */
#sidebar-ai .sidebar-video {
    flex-direction: column;
    padding: 16px 12px;
}

#sidebar-ai #tutor-status-indicator {
    align-self: center;
    margin-top: 14px;
}

/* ============================================
   MICROPHONE TOOLTIP
   ============================================ */

.mic-button-container {
    position: relative;
    display: inline-block;
}

.mic-tooltip {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.875rem;
    white-space: nowrap;
    
    /* Fade in/out animation */
    opacity: 1;
    transition: opacity 0.2s ease;
}

.mic-tooltip.hidden {
    display: none;
}

/* Arrow pointing down to button */
.mic-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.85);
}

.tooltip-text {
    display: block;
}


