/* 
  Theme: West African Premium (Deep Indigo, Gold, Rich Ochre)
  Font: 'Outfit', sans-serif
*/

:root {
    --color-bg-deep: #0f0c29;
    --color-bg-mid: #302b63;
    --color-bg-light: #24243e;
    --color-accent-gold: #FFD700;
    /* Yellow (Bissau Flag) */
    --color-accent-ochre: #CE1126;
    /* Red (Bissau Flag) */
    --color-accent-green: #009E49;
    /* Green (Bissau Flag) */
    --color-text-white: #ffffff;
    --color-text-muted: rgba(255, 255, 255, 0.7);

    --glass-bg: rgba(20, 20, 35, 0.4);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-blur: 20px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', sans-serif;
    background: linear-gradient(135deg, var(--color-bg-deep), var(--color-bg-mid), var(--color-bg-light));
    color: var(--color-text-white);
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.app-container {
    width: 100%;
    height: 100%;
    max-width: 600px;
    position: relative;
    background: #000;
    overflow: hidden;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
}

/* === Video Feed Layer === */
.video-feed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.mentor-static {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
    transform: scale(1.05);
    transition: transform 10s ease;
    animation: breathe 20s infinite ease-in-out;
}

@keyframes breathe {

    0%,
    100% {
        transform: scale(1.05);
    }

    50% {
        transform: scale(1.08);
    }
}

.overlay-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    z-index: 2;
}

/* === Status Indicators === */
.status-indicator {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 1px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--color-text-muted);
}

.dot.live {
    background-color: #ff3b30;
    box-shadow: 0 0 8px #ff3b30;
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.mentor-tag {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10;
}

.mentor-info h2 {
    font-size: 18px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.language-badge {
    font-size: 11px;
    color: var(--color-accent-gold);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* === Lumi AI === */
.lumi-container {
    position: absolute;
    bottom: 180px;
    /* Above controls */
    right: 20px;
    z-index: 15;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.lumi-orb {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #fff, #00ffff, #0000ff);
    box-shadow: 0 0 20px #00ffff, 0 0 40px #0000ff;
    animation: lumiFloat 4s ease-in-out infinite;
    cursor: pointer;
}

.lumi-orb.speaking {
    animation: lumiPulse 0.5s infinite alternate;
}

.lumi-hint {
    background: white;
    color: #0f0c29;
    padding: 10px 15px;
    border-radius: 15px 15px 0 15px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    max-width: 200px;
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes lumiFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes lumiPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 20px #00ffff;
    }

    100% {
        transform: scale(1.2);
        box-shadow: 0 0 40px #00ffff;
    }
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.5) translateY(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* === Interface Layer === */
.interface-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 20;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px;
}

.top-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    margin-top: 60px;
    width: 100%;
}

.gamification-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.stat-item {
    background: rgba(0, 0, 0, 0.4);
    padding: 6px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 700;
    font-size: 14px;
    border: 1px solid var(--glass-border);
}

.stat-icon {
    font-size: 16px;
}

.stat-value {
    color: #fff;
}

.day-tracker {
    background: rgba(255, 215, 0, 0.15);
    border: 1px solid var(--color-accent-gold);
    padding: 8px 16px;
    border-radius: 30px;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: baseline;
    gap: 6px;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.1);
}

.day-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--color-accent-gold);
}

.day-count {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
}

.day-total {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.session-topic {
    margin-top: 10px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* === Interaction Area === */
.interaction-area {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-bottom: 40px;
}

.captions-container {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 20px;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.mentor-text {
    font-size: 24px;
    /* Accessible */
    line-height: 1.6;
    text-align: center;
    color: #fff;
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.controls-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.mic-button {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--color-accent-gold), var(--color-accent-ochre));
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(210, 105, 30, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    user-select: none;
    position: relative;
    overflow: hidden;
}

.mic-button:active {
    transform: scale(0.95);
    box-shadow: 0 4px 10px rgba(210, 105, 30, 0.3);
}

.mic-button.listening::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    animation: ripple 1.5s infinite;
}

@keyframes ripple {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    100% {
        transform: scale(2);
        opacity: 0;
    }
}

.mic-label {
    font-size: 10px;
    font-weight: 700;
    margin-top: 2px;
}

.user-transcript {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    font-style: italic;
    min-height: 20px;
    margin-top: 5px;
    text-align: center;
}

.share-button {
    background: #25D366;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.3);
    animation: bounce 2s infinite;
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: inherit;
    margin-top: 5px;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-5px);
    }

    60% {
        transform: translateY(-3px);
    }
}

#confetti-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 50;
}

.hidden {
    opacity: 0;
    pointer-events: none;
}

/* === Modals === */
.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 12, 41, 0.95);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
    transition: opacity 0.5s ease;
}

.modal-content {
    background: var(--glass-bg);
    border: 1px solid var(--color-accent-gold);
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.6);
}

.modal-content h2 {
    color: var(--color-accent-gold);
    margin-bottom: 25px;
    font-size: 24px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.country-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.country-grid .country-btn:last-child:nth-child(odd) {
    grid-column: span 2;
}

.country-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 12px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.country-btn:hover {
    background: rgba(255, 215, 0, 0.1);
    border-color: var(--color-accent-gold);
    transform: translateY(-2px);
}

.country-btn .flag {
    font-size: 32px;
}

.country-btn .name {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
}