* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg: #070b14;
    --card: #101624;
    --card-light: #171f31;
    --text: #ffffff;
    --muted: #8993a8;
    --accent: #6c63ff;
    --accent-light: #8b85ff;
    --success: #35d39a;
    --danger: #ff6577;
}

body {
    min-height: 100vh;
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    background:
        radial-gradient(
            circle at 50% 20%,
            #18234a 0%,
            #0b1020 35%,
            #05070d 100%
        );

    color: var(--text);
}

.app {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.phone {
    width: 100%;
    max-width: 430px;
    min-height: 760px;

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,0.04),
            rgba(255,255,255,0.01)
        ),
        var(--card);

    border: 1px solid rgba(255,255,255,0.08);

    border-radius: 38px;

    box-shadow:
        0 40px 100px rgba(0,0,0,0.55),
        0 0 80px rgba(108,99,255,0.08);

    overflow: hidden;

    position: relative;
}


/* ============================================================
   TOP BAR
============================================================ */

.top-bar {
    height: 78px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 28px;

    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
}

.brand-icon {
    width: 38px;
    height: 38px;

    border-radius: 12px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 22px;
    font-weight: 800;

    background: linear-gradient(
        135deg,
        var(--accent),
        #a08cff
    );

    box-shadow:
        0 8px 25px rgba(108,99,255,0.3);
}

.brand-name {
    font-size: 16px;
    font-weight: 700;
}

.brand-subtitle {
    font-size: 9px;
    letter-spacing: 3px;
    color: var(--muted);
    margin-top: 2px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);

    box-shadow:
        0 0 12px rgba(53,211,154,0.8);
}


/* ============================================================
   SCREENS
============================================================ */

.screen {
    display: none;
    padding: 45px 30px 30px;
}

.screen.active {
    display: block;
}


/* ============================================================
   WELCOME
============================================================ */

.welcome {
    text-align: center;
}

.voice-orb {
    width: 108px;
    height: 108px;

    margin: 5px auto 28px;

    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    background:
        radial-gradient(
            circle,
            #918bff 0%,
            #6c63ff 35%,
            #403a99 70%,
            transparent 71%
        );

    box-shadow:
        0 0 0 12px rgba(108,99,255,0.06),
        0 0 60px rgba(108,99,255,0.35);
}

.orb-inner {
    font-size: 32px;
}

.welcome h1 {
    font-size: 30px;
    letter-spacing: -0.8px;
}

.welcome p {
    max-width: 270px;
    margin: 12px auto 45px;

    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}


/* ============================================================
   MOBILE INPUT
============================================================ */

.mobile-section label {
    display: block;

    font-size: 13px;
    font-weight: 600;

    color: #c5ccda;

    margin-bottom: 10px;
}

.mobile-input {
    height: 58px;

    display: flex;
    align-items: center;

    padding: 0 17px;

    background: var(--card-light);

    border: 1px solid rgba(255,255,255,0.08);

    border-radius: 16px;

    transition: 0.2s;
}

.mobile-input:focus-within {
    border-color: var(--accent);

    box-shadow:
        0 0 0 4px rgba(108,99,255,0.08);
}

.mobile-input span {
    color: var(--muted);
    font-size: 15px;

    padding-right: 13px;
    margin-right: 13px;

    border-right: 1px solid rgba(255,255,255,0.1);
}

.mobile-input input {
    width: 100%;

    border: none;
    outline: none;

    background: transparent;

    color: white;

    font-size: 17px;
    letter-spacing: 1px;
}

.mobile-input input::placeholder {
    color: #596274;
}

.message {
    min-height: 22px;

    margin-top: 10px;

    font-size: 12px;
    text-align: center;
}

.message.error {
    color: var(--danger);
}

.message.success {
    color: var(--success);
}


/* ============================================================
   BUTTONS
============================================================ */

.primary-btn {
    width: 100%;
    height: 56px;

    margin-top: 18px;

    border: none;
    border-radius: 16px;

    color: white;

    background:
        linear-gradient(
            135deg,
            var(--accent),
            #8178ff
        );

    font-size: 15px;
    font-weight: 700;

    cursor: pointer;

    box-shadow:
        0 12px 30px rgba(108,99,255,0.25);

    transition: 0.2s;
}

.primary-btn:hover {
    transform: translateY(-1px);
}

.primary-btn:active {
    transform: translateY(1px);
}

.primary-btn span {
    margin-left: 8px;
    font-size: 18px;
}

.privacy-note {
    margin-top: 20px;

    text-align: center;

    color: #596274;

    font-size: 11px;
}


/* ============================================================
   CALL SCREEN
============================================================ */

.call-status {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 7px;

    color: var(--muted);

    font-size: 12px;
}

.connected-dot {
    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: var(--success);
}

.student-avatar {
    width: 88px;
    height: 88px;

    margin: 38px auto 18px;

    display: flex;
    justify-content: center;
    align-items: center;

    border-radius: 50%;

    background:
        linear-gradient(
            135deg,
            #292f45,
            #1b2131
        );

    border: 1px solid rgba(255,255,255,0.1);

    font-size: 30px;
    font-weight: 700;
}

.call-screen h2,
#studentName {
    text-align: center;
    font-size: 21px;
}

.student-info {
    text-align: center;

    margin-top: 7px;

    color: var(--muted);
    font-size: 12px;
}


/* ============================================================
   CALL ORB
============================================================ */

.call-orb {
    width: 165px;
    height: 165px;

    margin: 48px auto 25px;

    display: flex;
    justify-content: center;
    align-items: center;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(108,99,255,0.30),
            rgba(108,99,255,0.06) 60%,
            transparent 61%
        );

    border: 1px solid rgba(108,99,255,0.2);

    box-shadow:
        0 0 70px rgba(108,99,255,0.12);
}

.call-orb-inner {
    width: 95px;
    height: 95px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #191f31;

    font-size: 34px;
}

.call-description {
    text-align: center;

    max-width: 280px;

    margin: 0 auto 30px;

    color: var(--muted);

    font-size: 13px;
    line-height: 1.6;
}

.call-btn {
    width: 100%;
    height: 58px;

    border: none;
    border-radius: 18px;

    background: var(--success);

    color: #06140f;

    font-size: 15px;
    font-weight: 800;

    cursor: pointer;

    box-shadow:
        0 12px 30px rgba(53,211,154,0.18);
}

.call-btn span {
    margin-right: 8px;
    font-size: 19px;
}

.back-btn {
    display: block;

    margin: 20px auto 0;

    border: none;
    background: transparent;

    color: var(--muted);

    font-size: 12px;

    cursor: pointer;
}


/* ============================================================
   RESPONSIVE
============================================================ */

@media (max-width: 480px) {

    .app {
        padding: 0;
    }

    .phone {
        min-height: 100vh;
        border-radius: 0;
        border: none;
    }
}

/* ============================================================
   LISTENING STATE
============================================================ */

.call-orb.listening {
    animation: voicePulse 1.8s infinite;
}

.call-orb.listening .call-orb-inner {
    background: var(--accent);
    box-shadow: 0 0 35px rgba(108, 99, 255, 0.45);
}

@keyframes voicePulse {

    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.08);
    }

    100% {
        transform: scale(1);
    }
}

/* ============================================================
   TRANSCRIPT
============================================================ */

.transcript-box {
    margin: 20px 0 12px;
    padding: 14px 16px;

    background: rgba(255,255,255,0.035);

    border: 1px solid rgba(255,255,255,0.07);

    border-radius: 15px;
}

.transcript-label {
    color: var(--muted);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 7px;
}

.transcript {
    min-height: 22px;
    color: #e9ecf5;
    font-size: 13px;
    line-height: 1.5;
}


/* ============================================================
   LANGUAGE SELECTOR
============================================================ */

.language-selector {
    display: flex;
    justify-content: center;
    gap: 7px;
    margin: 12px 0 18px;
}

.language-btn {
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.035);

    color: var(--muted);

    padding: 7px 12px;

    border-radius: 10px;

    font-size: 11px;

    cursor: pointer;
}

.language-btn.active {
    color: white;
    background: rgba(108,99,255,0.2);
    border-color: rgba(108,99,255,0.5);
}


/* ============================================================
   MICROPHONE
============================================================ */

.mic-btn {
    width: 100%;
    height: 54px;

    margin-top: 10px;

    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 17px;

    background: #171d2d;

    color: white;

    font-size: 14px;
    font-weight: 700;

    cursor: pointer;
}

.mic-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.mic-btn.listening {
    background: #351c24;
    border-color: rgba(255,101,119,0.45);
    color: #ff8a98;
}