/* ==========================================================================
   Teacher Presenter & Automated Laser Cursor Styling
   For CBSE Class 5 Maths OBS Screen Recording Studio
   ========================================================================== */

/* 1. Virtual Laser Pointer / Teacher Cursor */
#teacher-virtual-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 28px;
    height: 28px;
    pointer-events: none;
    z-index: 999999;
    transform: translate(-50%, -50%);
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
    display: none;
}

#teacher-virtual-cursor.active {
    display: block;
}

.laser-core {
    width: 14px;
    height: 14px;
    background: radial-gradient(circle, #ff2a5f 0%, #ff0044 60%, rgba(255, 0, 68, 0) 100%);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 12px #ff0055, 0 0 24px #ff0055, 0 0 36px rgba(255, 0, 85, 0.6);
    animation: laserGlow 1.4s infinite alternate ease-in-out;
}

.laser-ring {
    width: 28px;
    height: 28px;
    border: 2px solid rgba(255, 180, 0, 0.85);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 10px rgba(255, 180, 0, 0.6);
    animation: ringPulse 1.8s infinite ease-out;
}

/* Cursor Ripple for Clicks */
.cursor-click-ripple {
    position: fixed;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 3px solid #ffb300;
    background: rgba(255, 200, 0, 0.25);
    pointer-events: none;
    z-index: 999998;
    transform: translate(-50%, -50%);
    animation: rippleExpand 0.7s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
}

@keyframes laserGlow {
    0% { transform: translate(-50%, -50%) scale(0.9); opacity: 0.9; }
    100% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; filter: brightness(1.2); }
}

@keyframes ringPulse {
    0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.9; }
    50% { transform: translate(-50%, -50%) scale(1.3); opacity: 0.4; }
    100% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.9; }
}

@keyframes rippleExpand {
    0% { width: 10px; height: 10px; opacity: 1; }
    100% { width: 90px; height: 90px; opacity: 0; }
}

/* 2. Target Spotlight with Smooth Dynamic Zoom-In & Zoom-Out */
.teacher-spotlight {
    position: relative;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s ease, border-color 0.4s ease !important;
    transform: scale(1.06) !important;
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.95), 0 25px 55px -10px rgba(0, 0, 0, 0.85) !important;
    border-color: #38bdf8 !important;
    border-radius: 18px;
    z-index: 45;
}

/* SVG Panel Focus Highlight & Glow */
g.teacher-spotlight {
    transition: filter 0.5s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1) !important;
    filter: drop-shadow(0 0 20px rgba(56, 189, 248, 0.95)) brightness(1.1) !important;
}

/* Smooth zoom-out return on all interactive containers */
main > section, div[id^="card-"], table, .grid > div {
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s ease, border-color 0.4s ease;
}

/* 3. Floating Studio Controller Bar - Compact Bottom-Right */
#teacher-studio-bar {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 14px;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 999990;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(56, 189, 248, 0.2);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #f8fafc;
    transition: all 0.3s ease;
}

#teacher-studio-bar.minimized {
    transform: translateY(120%);
    opacity: 0;
    pointer-events: none;
}

.studio-btn {
    background: #1e293b;
    border: 1px solid #334155;
    color: #e2e8f0;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
    user-select: none;
}

.studio-btn:hover {
    background: #334155;
    color: #ffffff;
    border-color: #38bdf8;
    transform: translateY(-1px);
}

.studio-btn.primary {
    background: linear-gradient(135deg, #0284c7, #2563eb);
    border: none;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.studio-btn.primary:hover {
    background: linear-gradient(135deg, #0369a1, #1d4ed8);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.5);
}

.studio-btn.active {
    background: #16a34a;
    border-color: #22c55e;
    color: white;
}

/* 4. Teleprompter Subtitles: HIDDEN by default so no script shows on screen */
#teacher-teleprompter {
    display: none !important; /* Never cover the screen with script text */
}

/* Toggle hint button when bar is hidden */
#teacher-reopen-btn {
    position: fixed;
    bottom: 12px;
    right: 12px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: #38bdf8;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
    z-index: 999989;
    display: none;
}


/* HIDE GURUKUL PRESENTER FROM CHAPTER 2 ONWARDS */
#teacher-studio-bar, #teacher-reopen-btn, #btn-header-start-studio, [id*='start-studio'] {
    display: none !important;
}
