/* ============================================
   MockBee - AI Interview Stylesheet
   Theme: Vintage Parchment / Premium Executive
   ============================================ */

:root {
    /* 60% White */
    --cream-bg: #FFFFFF;
    --cream-light: #FFFFFF;
    --white: #ffffff;
    --parchment: #FFFFFF;

    /* 30% Warm Gray */
    --cream-dark: #E9E4E2;
    --parchment-dark: #E9E4E2;

    /* 10% Accent */
    --gold: #D8C4B6;
    --gold-light: #E2D1C8;
    --gold-dark: #B09E93;

    /* Contrast */
    --navy: #1A1A1A;
    --navy-dark: #000000;
    --text-dark: #1A1A1A;
    --text-medium: #4A4A4A;

    --font-heading: 'Satoshi', sans-serif;
    --font-body: 'Satoshi', sans-serif;

    --shadow-warm: 0 10px 30px rgba(100, 70, 20, 0.1);
    --shadow-deep: 0 15px 40px rgba(30, 20, 10, 0.2);
}

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

body {
    font-family: var(--font-body);
    background-color: var(--cream-bg);
    position: relative;
    height: 100vh;
    overflow: hidden;
    color: var(--text-dark);
}

/* ============================================
   LUMINA THEME: Hero Wave Background
   ============================================ */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 600' preserveAspectRatio='xMidYMid slice'><defs><linearGradient id='p1' x1='0%25' y1='0%25' x2='100%25' y2='100%25'><stop offset='0%25' stop-color='%23e9e4e2' stop-opacity='0.8'/><stop offset='100%25' stop-color='%23d8c4b6' stop-opacity='0.2'/></linearGradient><linearGradient id='p2' x1='100%25' y1='0%25' x2='0%25' y2='100%25'><stop offset='0%25' stop-color='%23d8c4b6' stop-opacity='0.6'/><stop offset='100%25' stop-color='%23e9e4e2' stop-opacity='0.3'/></linearGradient><linearGradient id='p3' x1='50%25' y1='100%25' x2='50%25' y2='0%25'><stop offset='0%25' stop-color='%23e9e4e2' stop-opacity='0.9'/><stop offset='100%25' stop-color='%23ffffff' stop-opacity='0.0'/></linearGradient></defs><g><path fill='url(%23p1)' d='M-100,500 C200,600 400,100 800,300 C1100,450 1300,150 1600,200 L1600,1000 L-100,1000 Z'/><path fill='url(%23p2)' d='M-100,300 C300,0 600,600 1000,400 C1300,250 1500,400 1600,100 L1600,1000 L-100,1000 Z'/><path fill='url(%23p3)' d='M-100,400 C250,200 450,700 900,500 C1200,350 1400,550 1600,350 L1600,1000 L-100,1000 Z'/></g></svg>");
    background-size: cover;
    background-position: center bottom;
    z-index: -1;
    pointer-events: none;
    opacity: 0.8;
    animation: bgWaveSweep 20s ease-in-out infinite alternate;
}

@keyframes bgWaveSweep {
    0% {
        transform: scale(1) translateX(0);
    }

    100% {
        transform: scale(1.1) translateX(-30px);
    }
}

body::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
}

.interview-page {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* ============================================
   HEADER: Balanced & Executive
   ============================================ */
.interview-header {
    height: 90px;
    background: var(--cream-bg);
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    align-items: center;
    padding: 0 60px;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    color: var(--navy-dark);
    border-bottom: 1.5px solid var(--cream-dark);
}

.back-link {
    justify-self: start;
    color: var(--navy-dark);
    text-decoration: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1.5px solid var(--cream-dark);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.back-link:hover {
    background: var(--navy-dark);
    color: var(--white);
    transform: scale(1.1);
    border-color: var(--navy-dark);
}

.header-center {
    display: flex;
    justify-content: center;
}

.role-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    width: 100%;
}

.role-icon-container {
    width: 54px;
    height: 54px;
    background: var(--white);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1.5px solid rgba(0, 0, 0, 0.08);
}

.role-mini-icon {
    width: 38px;
    height: 38px;
    object-fit: contain;
}

.role-info {
    text-align: center;
}

.role-info h1 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    margin-bottom: 2px;
    letter-spacing: 1px;
    color: var(--navy-dark);
}

.role-info span {
    font-size: 0.85rem;
    color: var(--navy-dark);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 700;
    display: block;
}

.header-right {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 24px;
}

.progress-container {
    min-width: 220px;
}

.progress-text {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--navy-dark);
    margin-bottom: 10px;
    text-align: right;
    font-family: var(--font-heading);
}

.progress-bar-bg {
    width: 100%;
    height: 10px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 5px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--navy-dark);
    transition: width 0.7s cubic-bezier(0.19, 1, 0.22, 1);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

/* ============================================
   MAIN CONTENT WRAPPER: Proportional
   ============================================ */
.interview-main {
    flex: 1;
    display: flex;
    overflow: hidden;
    padding: 0 40px;
    gap: 40px;
}

/* ============================================
   CHAT AREA: Spacious & Elegant
   ============================================ */
.chat-container {
    flex: 1.2;
    padding: 60px 0 180px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 40px;
    scrollbar-width: thin;
    scrollbar-color: var(--gold) transparent;
}

.chat-container::-webkit-scrollbar {
    width: 6px;
}

.chat-container::-webkit-scrollbar-thumb {
    background: var(--gold-dark);
    border-radius: 10px;
}

.message {
    display: flex;
    max-width: 85%;
    animation: messageAppear 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

@keyframes messageAppear {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ai-bubble {
    background: var(--white);
    padding: 25px 30px;
    border-radius: 20px 20px 20px 5px;
    border: 1px solid var(--cream-dark);
    box-shadow: 0 10px 30px rgba(180, 160, 150, 0.15);
    line-height: 1.7;
    font-size: 1.1rem;
    color: var(--text-dark);
    position: relative;
    border-left: 5px solid var(--gold);
}

.ai-bubble strong {
    color: var(--gold-dark);
    font-family: var(--font-heading);
    font-size: 1.3rem;
}

.feedback-box {
    margin-top: 15px;
    padding: 20px;
    background: rgba(200, 150, 42, 0.06);
    border: 1px dashed var(--gold);
    border-radius: 15px;
    font-size: 1rem;
    color: var(--text-medium);
}

.message--user {
    align-self: flex-end;
    max-width: 70%;
}

.user-bubble {
    background: var(--navy-dark);
    padding: 22px 32px;
    border-radius: 30px 30px 5px 30px;
    color: var(--white);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    font-size: 1.1rem;
    line-height: 1.6;
}

/* ============================================
   MASCOT SIDEBAR: Integrated Character
   ============================================ */
.mascot-sidebar {
    flex: 1.5;
    /* Even larger share for the bold mascot */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 0;
    position: relative;
    max-height: 100vh;
}

.mascot-interviewer {
    text-align: center;
    animation: mascotBreath 6s ease-in-out infinite;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    /* Anchor for the absolute label */
}

.large-mascot {
    width: 100%;
    max-width: 950px;
    /* Maximum Bold presence */
    max-height: 90vh;
    /* Reaching near full viewport height */
    object-fit: contain;
    filter: drop-shadow(0 40px 80px rgba(80, 60, 10, 0.35));
}

.mascot-interviewer__label {
    background: var(--navy-dark);
    color: var(--gold-light);
    padding: 6px 16px;
    border-radius: 40px;
    font-size: 0.75rem;
    font-weight: 800;
    z-index: 100;
    border: 1.5px solid var(--gold);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
    white-space: nowrap;

    position: absolute;
    right: -10px;
    /* Positioned to the right of mascot */
    top: 15%;
    /* Near the top right shoulder/head */

    animation: labelFloat 2.5s ease-in-out infinite alternate;
}

@keyframes labelFloat {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-8px);
    }
}

@keyframes mascotBreath {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02) translateY(-10px);
    }
}

/* ============================================
   INPUT AREA: Modern Floating Dock
   ============================================ */
.input-area {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0 0 30px;
    background: transparent;
    z-index: 100;
}

.input-container {
    max-width: 600px;
    margin: 0 auto;
}

.input-wrapper {
    background: var(--white);
    padding: 6px 10px 6px 25px;
    border-radius: 60px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
    border: 1px solid var(--gold);
}

#user-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 0;
    font-size: 1rem;
    outline: none;
    color: var(--text-dark);
}

.mic-btn {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.8rem;
    cursor: pointer;
    padding: 8px 15px;
    transition: all 0.3s;
}

.mic-btn:hover {
    color: var(--gold);
    transform: scale(1.1);
}

.mic-btn.active {
    color: var(--gold);
    animation: micPulse 1.5s infinite;
}

@keyframes micPulse {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 0 rgba(200, 150, 42, 0));
    }

    50% {
        transform: scale(1.2);
        filter: drop-shadow(0 0 15px rgba(200, 150, 42, 0.8));
    }

    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 0 rgba(200, 150, 42, 0));
    }
}

.recording-indicator {
    position: absolute;
    top: -45px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gold);
    color: var(--navy-dark);
    padding: 6px 18px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(200, 150, 42, 0.4);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 200;
}

.recording-indicator.active {
    opacity: 1;
}

.recording-indicator i {
    color: #ff3b3b;
    animation: blink 0.8s infinite alternate;
}

@keyframes blink {
    from {
        opacity: 1;
        transform: scale(1);
    }

    to {
        opacity: 0.3;
        transform: scale(1.2);
    }
}

.results-btn-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Centered content within the wider box */
    justify-content: center;
    gap: 20px;
    margin: 40px 0 30px 0;
    /* Aligned left edge with AI boxes */
    padding: 35px 30px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 24px;
    border: 2px dashed var(--gold);
    width: 85%;
    /* Perfectly matched width for AI message boxes */
    max-width: 800px;
    animation: fadeInScale 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.btn-view-results {
    background: #000000;
    color: var(--gold-light);
    text-decoration: none;
    padding: 8px 20px;
    border-radius: 80px;
    font-weight: 800;
    font-size: 0.9rem;
    font-family: var(--font-heading);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    border: 2px solid var(--gold);
    cursor: pointer;
    text-align: center;
}

.btn-view-results:hover {
    background: var(--white);
    color: var(--navy-dark);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    border-color: var(--navy-dark);
}

.session-complete-msg {
    color: var(--navy-dark);
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 1px;
}

.submit-btn {
    background: var(--navy-dark);
    color: var(--gold-light);
    border: 1px solid var(--gold);
    padding: 10px 24px;
    border-radius: 40px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.4s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.submit-btn:hover {
    background: var(--white);
    color: var(--navy-dark);
    transform: translateY(-3px) scale(1.02);
}

.input-hint {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-medium);
    margin-top: 20px;
    font-weight: 600;
    opacity: 0.7;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1400px) {
    .large-mascot {
        max-width: 450px;
    }
}

@media (max-width: 1024px) {
    .mascot-sidebar {
        display: none;
    }

    .chat-container {
        flex: 1;
        padding: 40px 5% 200px;
    }

    .interview-header {
        padding: 0 30px;
    }
}

/* ============================================
   FIX: MOVE SCROLLBAR TO RIGHT SIDE OF PAGE 
   (Overrides to keep chat scrollbar at the far right while mascot stays visible)
   ============================================ */

.interview-main {
    position: relative;
    padding-right: 0 !important;
    /* Allows scrollbar to reach the absolute right edge */
}

.chat-container {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    /* Use padding to keep content on the left side, leaving room for mascot on right */
    padding: 60px 48% 200px 60px !important;
    z-index: 5;
    background: transparent !important;
    /* Keep existing scrollbar styling */
    scrollbar-width: thin;
    scrollbar-color: var(--gold) transparent;
}

.mascot-sidebar {
    margin-left: auto;
    flex: 0 0 42% !important;
    z-index: 1;
    position: relative;
    pointer-events: none;
    /* Ensure scrolling works even when mouse is over mascot area */
}

.large-mascot {
    pointer-events: auto;
    /* Interaction with mascot still possible */
}

/* Ensure user messages align to the right of the visible chat column */
.message--user {
    align-self: flex-end !important;
}

/* Adjust for smaller screens where mascot sidebar is hidden */
@media (max-width: 1024px) {
    .interview-main {
        padding-right: 40px !important;
        display: flex;
    }

    .chat-container {
        position: relative !important;
        padding: 40px 5% 200px !important;
        width: auto !important;
        height: auto !important;
    }

    .mascot-sidebar {
        display: none !important;
    }
}

@media (max-width: 1000px) {
    .mascot-area {
        display: none;
    }

    .chat-container {
        padding-right: 0;
    }
}

@media (max-width: 1000px) {
    .mascot-area {
        display: none;
    }

    .chat-container {
        padding-right: 0;
    }
}

/* ============================================
   HIGH INTENSITY TRAINING THEME (Dark)
   Applied when <body> has .mode-high-intensity
   ============================================ */
.mode-high-intensity {
    --cream-bg: #000000;
    --cream-dark: #111111;
    --navy-dark: #FFFFFF;
    --text-dark: #FFFFFF;
    --text-medium: #CCCCCC;
    --gold: #FFC107;
    --gold-dark: #FFD54F;
    --white: #111111;
}

.mode-high-intensity body::before {
    background-image: 
        radial-gradient(circle at 100% 0%, rgba(255, 193, 7, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 0% 100%, rgba(255, 193, 7, 0.05) 0%, transparent 40%);
    opacity: 0.4;
    animation: none;
}

.mode-high-intensity .interview-header {
    background: #000;
    border-bottom: 2px solid var(--gold);
    box-shadow: 0 4px 30px rgba(255, 193, 7, 0.15);
}

.mode-high-intensity .role-info h1, 
.mode-high-intensity .role-info span,
.mode-high-intensity .progress-text {
    color: var(--gold);
}

.mode-high-intensity .progress-bar-bg {
    background: rgba(255, 255, 255, 0.1);
}

.mode-high-intensity .progress-bar-fill {
    background: var(--gold);
    box-shadow: 0 0 15px var(--gold);
}

.mode-high-intensity .ai-bubble {
    background: #111;
    border: 1px solid rgba(255, 193, 7, 0.3);
    color: #EEE;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border-left: 6px solid var(--gold);
}

.mode-high-intensity .ai-bubble strong {
    color: var(--gold);
}

.mode-high-intensity .user-bubble {
    background: var(--gold);
    color: #000;
    font-weight: 800;
    box-shadow: 0 10px 30px rgba(255, 193, 7, 0.2);
}

.mode-high-intensity .input-area {
    background: linear-gradient(to top, #000 80%, transparent);
}

.mode-high-intensity .input-wrapper {
    background: #111;
    border: 2px solid var(--gold);
    box-shadow: 0 0 30px rgba(255, 193, 7, 0.1);
}

.mode-high-intensity #user-input {
    color: #FFF;
}

.mode-high-intensity .submit-btn {
    background: var(--gold);
    color: #000;
    border: none;
}

.mode-high-intensity .submit-btn:hover {
    background: #FFF;
    transform: scale(1.1);
}

.mode-high-intensity .timer-container {
    border: 2.5px solid #FFC107;
    background: #000;
    color: #FFC107;
    box-shadow: 0 0 20px rgba(255, 193, 7, 0.3);
}

/* Timer Display Styles */
.timer-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--cream-bg);
    color: var(--navy-dark);
    padding: 6px 16px;
    border-radius: 50px;
    border: 1.5px solid var(--gold);
    font-weight: 800;
    font-size: 1.15rem;
    font-family: 'Satoshi', sans-serif;
    font-variant-numeric: tabular-nums;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    min-width: 100px;
    height: 38px;
}

.timer-container i {
    animation: flashIcon 1s infinite alternate;
}

@keyframes flashIcon {
    from { opacity: 0.5; }
    to { opacity: 1; }
}

.timer-container.warning {
    animation: timerPulse 1s infinite alternate;
    background: var(--cream-bg);
    color: #ff6b6b;
    border-color: #ff6b6b;
}

@keyframes timerPulse {
    from { transform: scale(1); }
    to { transform: scale(1.05); }
}

.hidden {
    display: none !important;
}