:root {
    --bg-color: #f8fafc; /* Premium light grey/white */
    --board-bg: rgba(255, 255, 255, 0.85); /* Frosted white glass */
    --text-color: #0f172a; /* Deep slate for high contrast */
    --input-bg: rgba(255, 255, 255, 0.9);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body, html {
    height: 100%;
    font-family: 'Poppins', sans-serif;
    background: radial-gradient(circle at center, #ffffff 0%, #e2e8f0 100%);
    color: var(--text-color);
    overflow: hidden; 
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Initial Landing View */
.landing-container {
    text-align: center;
    z-index: 10;
    padding: 2rem;
    transition: opacity 1s ease, transform 1s ease;
}
.landing-container h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #a78bfa, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 600;
}
.landing-container p {
    font-size: clamp(1rem, 2vw, 1.2rem);
    margin-bottom: 2rem;
    color: #475569;
}
.start-btn {
    padding: 15px 45px;
    font-size: 1.2rem;
    border: none;
    border-radius: 50px;
    background: linear-gradient(45deg, #8b5cf6, #3b82f6);
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
    transition: transform 0.3s, box-shadow 0.3s;
    font-weight: 600;
}
.start-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.6);
}

/* Whiteboard View */
.whiteboard-container {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0; /* Full screen cinematic edge */
    background: var(--board-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 1.5s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    overflow: hidden;
    box-shadow: inset 0 0 50px rgba(0,0,0,0.02);
    border: none;
}
.whiteboard-container.active {
    opacity: 1;
    pointer-events: auto;
}
.whiteboard-container::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: 
        linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.8;
    z-index: 1;
}

/* Flowers Animation */
.flower {
    position: absolute;
    top: -50px;
    font-size: 1.8rem;
    user-select: none;
    animation: fall linear infinite;
    z-index: 5;
}
@keyframes fall { to { transform: translateY(110vh) rotate(360deg); } }

/* Typewriter Text - Intro Sequence */
.intro-sequence {
    z-index: 10;
    text-align: center;
    transition: opacity 1.5s, transform 1.5s;
    max-width: 90%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
}
.vandana-text {
    font-family: 'Tiro Devanagari Sanskrit', serif;
    font-size: clamp(1.2rem, 2.5vw, 2rem);
    line-height: 1.6;
    color: #1e293b;
    white-space: pre-wrap; 
    text-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.skip-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,0.8);
    border: 1px solid rgba(0,0,0,0.05);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    z-index: 30;
    display: none;
    color: #475569;
    font-weight: bold;
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.skip-btn:hover { background: rgba(255,255,255,1); color: #0f172a; }

/* Chat Interface */
.chat-interface {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: opacity 1.5s ease;
}
.chat-interface.active {
    opacity: 1;
    pointer-events: auto;
}
.chat-area {
    flex-grow: 1;
    overflow-y: auto;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    scroll-behavior: smooth;
}

@keyframes messageEntry {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.message-container {
    width: 95%;
    max-width: 1600px; /* Takes up full width gracefully */
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
}
.mentor-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1.2rem;
    flex-shrink: 0;
}
img.mentor-icon {
    object-fit: cover;
    background-color: #fff;
    border: 2px solid var(--primary);
}
.message-content {
    background: #ffffff;
    padding: 24px 32px;
    border-radius: 0 24px 24px 24px; /* Premium asymmetric tail */
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.04), 0 2px 10px rgba(15, 23, 42, 0.02);
    font-size: 1.15rem;
    color: #334155;
    line-height: 1.8;
    border: 1px solid rgba(255,255,255,0.8);
    font-weight: 400;
    letter-spacing: 0.2px;
}

/* Bottom Fixed Input & Footer */
.bottom-section {
    width: 100%;
    background: transparent;
    padding: 20px 20px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.input-wrapper {
    position: relative;
    width: 95%;
    max-width: 1600px; /* Matches the chat interface full width */
    background: var(--input-bg);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    border: 1px solid rgba(0,0,0,0.05);
    padding: 10px 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
}
.input-wrapper textarea {
    width: 100%;
    border: none;
    background: transparent;
    resize: none;
    font-family: inherit;
    font-size: 1.05rem;
    color: #0f172a;
    padding: 5px;
    outline: none;
    max-height: 150px;
}
.send-btn {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-left: 10px;
}
.fixed-footer {
    margin-top: 10px;
    font-size: 0.8rem;
    color: #94a3b8;
    text-align: center;
}

/* Settings UI */
.top-bar {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 50;
}
.icon-btn {
    background: rgba(255,255,255,0.9);
    border: 1px solid #cbd5e1;
    color: #334155;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s;
}
.icon-btn:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(5px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.modal-content {
    background: #fff;
    border-radius: 20px;
    padding: 30px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    transform: translateY(20px);
    transition: transform 0.3s;
    color: #1e293b;
}
.modal-overlay.active .modal-content {
    transform: translateY(0);
}
.modal-content h2 {
    margin-bottom: 20px;
    font-size: 1.5rem;
    color: var(--primary);
}
.form-group {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}
.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: #64748b;
}
.form-group select {
    padding: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    color: #1e293b;
    outline: none;
}
.form-group select:focus {
    border-color: var(--primary);
}
.modal-close-btn {
    margin-top: 20px;
    width: 100%;
}

/* Responsive Mobile Adjustments */
@media (max-width: 768px) {
    .message-container, .input-wrapper {
        width: 100%;
        padding: 0 5px;
    }
    .chat-area {
        padding: 20px 10px;
    }
    .message-content {
        font-size: 1rem;
        padding: 12px 15px;
    }
    .mentor-icon {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}

/* Cinematic Movie Intro Overlay */
.movie-intro {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: #020617; /* Deep cinematic black */
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 1.5s ease;
}
.logo-intro {
    width: 150px;
    height: 150px;
    opacity: 0;
    transform: translateY(0);
    transition: all 1.5s cubic-bezier(0.25, 1, 0.5, 1);
    border-radius: 50%;
    margin-bottom: 20px;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.2);
    object-fit: cover;
    background-color: white;
}
.logo-intro.scroll-up {
    transform: translateY(-40px) scale(0.9);
}
.logo-intro.scroll-top {
    transform: translateY(-38vh) scale(0.65);
    box-shadow: 0 0 50px rgba(255, 255, 255, 0.4);
}
.introducing-word {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 300;
    color: #fff;
    opacity: 0;
    transform: scale(0.1);
    transition: all 2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    letter-spacing: 5px;
    text-transform: uppercase;
}
.smart-classroom-text {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: #94a3b8;
    opacity: 0;
    margin-top: 10px;
    transition: opacity 1s ease;
    letter-spacing: 2px;
}
.amba-group {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.1);
    opacity: 0;
    transition: all 3.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    align-items: center;
}
.amba-word {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(5rem, 20vw, 15rem);
    font-weight: 900;
    letter-spacing: -2px;
    background: linear-gradient(135deg, #a855f7, #ec4899, #ef4444); /* Gorgeous, fiery premium gradient */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 10px 60px rgba(236, 72, 153, 0.6); /* Vibrant 3D glow */
    text-transform: uppercase;
    line-height: 1;
}
.amba-tagline {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1rem, 3vw, 2.5rem);
    font-weight: 300;
    color: #e2e8f0;
    letter-spacing: 15px; /* Cinematic wide spacing */
    text-transform: uppercase;
    margin-top: 10px;
    opacity: 0; /* Fades in later via JS */
    transition: opacity 1.5s ease;
}
