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

body {
    background: #020617;
    color: white;
    font-family: Arial, Helvetica, sans-serif;
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* FONDO */

.background {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(40,120,255,0.15), transparent 60%);
    animation: pulse 6s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 0.7;
    }
}

/* RELOJ */

.clock {
    position: absolute;
    top: 30px;
    right: 40px;
    font-size: 18px;
    color: #7db7ff;
    letter-spacing: 3px;
}

/* CONTENIDO */

.container {
    text-align: center;
    z-index: 10;
}

h1 {
    font-size: 110px;
    letter-spacing: 15px;
    color: #eaf4ff;
    text-shadow: 0 0 10px #4ea1ff, 0 0 20px #4ea1ff, 0 0 40px #4ea1ff, 0 0 80px #4ea1ff;
    margin-bottom: 20px;
    animation: glow 3s infinite alternate;
}

@keyframes glow {
    from {
        text-shadow: 0 0 10px #4ea1ff, 0 0 20px #4ea1ff;
    }

    to {
        text-shadow: 0 0 20px #4ea1ff, 0 0 40px #4ea1ff, 0 0 80px #4ea1ff;
    }
}

p {
    font-size: 22px;
    letter-spacing: 6px;
    color: #98b6db;
    margin-bottom: 50px;
}

button {
    padding: 20px 70px;
    background: transparent;
    border: 2px solid #4ea1ff;
    color: white;
    font-size: 18px;
    border-radius: 14px;
    cursor: pointer;
    transition: 0.3s;
    letter-spacing: 3px;
}

    button:hover {
        background: #4ea1ff;
        transform: scale(1.05);
        box-shadow: 0 0 10px #4ea1ff, 0 0 30px #4ea1ff, 0 0 60px #4ea1ff;
    }

/* PANTALLA LOCKED IN */

.locked-screen {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(2,6,23,0.98);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: 1s;
    z-index: 100;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 70px 20px;
}

    .locked-screen.active {
        opacity: 1;
        pointer-events: all;
    }

    .locked-screen h2 {
        font-size: 70px;
        letter-spacing: 10px;
        color: #dcecff;
        margin-bottom: 20px;
        text-shadow: 0 0 20px #4ea1ff, 0 0 50px #4ea1ff;
    }

.focus-text {
    color: #8faecc;
    letter-spacing: 4px;
    margin-bottom: 60px;
    font-size: 18px;
}

/* TARJETAS */

.stats {
    display: flex;
    gap: 30px;
}

.card {
    width: 180px;
    padding: 30px;
    border: 1px solid rgba(78,161,255,0.3);
    border-radius: 20px;
    background: rgba(255,255,255,0.03);
    backdrop-filter: blur(5px);
    text-align: center;
    transition: 0.3s;
}

    .card:hover {
        transform: translateY(-10px);
        border-color: #4ea1ff;
        box-shadow: 0 0 20px rgba(78,161,255,0.3);
    }

    .card span {
        color: #7ea9d8;
        letter-spacing: 3px;
        font-size: 14px;
    }

    .card h3 {
        margin-top: 15px;
        font-size: 40px;
        color: white;
    }

/* PARTÍCULAS */

.particles span {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #4ea1ff;
    border-radius: 50%;
    box-shadow: 0 0 10px #4ea1ff, 0 0 20px #4ea1ff;
    animation: float 10s linear infinite;
}

    .particles span:nth-child(1) {
        top: 10%;
        left: 20%;
        animation-duration: 8s;
    }

    .particles span:nth-child(2) {
        top: 30%;
        left: 80%;
        animation-duration: 12s;
    }

    .particles span:nth-child(3) {
        top: 70%;
        left: 10%;
        animation-duration: 7s;
    }

    .particles span:nth-child(4) {
        top: 90%;
        left: 60%;
        animation-duration: 10s;
    }

    .particles span:nth-child(5) {
        top: 50%;
        left: 40%;
        animation-duration: 15s;
    }

    .particles span:nth-child(6) {
        top: 15%;
        left: 70%;
        animation-duration: 9s;
    }

    .particles span:nth-child(7) {
        top: 80%;
        left: 90%;
        animation-duration: 11s;
    }

    .particles span:nth-child(8) {
        top: 40%;
        left: 5%;
        animation-duration: 13s;
    }

@keyframes float {

    0% {
        transform: translateY(0px);
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        transform: translateY(-100px);
        opacity: 0;
    }
}
/* QUIZ */

.quiz-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 200;
    background: rgba(2,6,23,0.98);
    transition: 0.5s;
}

    .quiz-container.active {
        opacity: 1;
        pointer-events: all;
    }

.question {
    font-size: 50px;
    margin-bottom: 40px;
    color: #e8f3ff;
    text-align: center;
    text-shadow: 0 0 20px #4ea1ff;
    max-width: 800px;
}

input {
    width: 350px;
    padding: 18px;
    margin-bottom: 25px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(78,161,255,0.3);
    border-radius: 14px;
    color: white;
    font-size: 18px;
    outline: none;
    text-align: center;
    z-index: 300;
}

    input:focus {
        border-color: #4ea1ff;
        box-shadow: 0 0 15px rgba(78,161,255,0.4);
    }

.streak-box {
    margin-top: 40px;
    text-align: center;
}

    .streak-box span {
        color: #89aed9;
        letter-spacing: 3px;
    }

    .streak-box h3 {
        font-size: 70px;
        margin-top: 10px;
        color: #4ea1ff;
        text-shadow: 0 0 20px #4ea1ff;
    }


.shake {
    animation: shake 0.4s;
}

@keyframes shake {

    0% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-10px);
    }

    50% {
        transform: translateX(10px);
    }

    75% {
        transform: translateX(-10px);
    }

    100% {
        transform: translateX(0);
    }
}

/* BARRA DE PROGRESO */

.progress-container {
    width: 400px;
    height: 12px;
    background: rgba(255,255,255,0.08);
    border-radius: 20px;
    overflow: hidden;
    margin-top: 20px;
    margin-bottom: 30px;
    border: 1px solid rgba(78,161,255,0.2);
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient( 90deg, #4ea1ff, #8dd0ff );
    box-shadow: 0 0 20px #4ea1ff;
    transition: 0.3s;
}

/* SUBIR ARCHIVO */

.upload-box {
    margin-bottom: 30px;
    text-align: center;
}

#fileInput {
    color: white;
}

#fileStatus {
    margin-top: 10px;
    font-size: 14px;
    color: #7db7ff;
    letter-spacing: 2px;
}


.setup-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

    .setup-panel h3 {
        letter-spacing: 4px;
        color: #7db7ff;
    }

.goal-buttons {
    display: flex;
    gap: 10px;
}

.goal-btn {
    width: 70px;
    padding: 12px;
}

#readyBtn {
    margin-top: 20px;
}

#fileStatus {
    color: #7db7ff;
    font-size: 14px;
}

.results-screen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #0d1117;
    z-index: 2000;
    color: white;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.summary-screen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #0d1117;
    z-index: 2000;
    color: white;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

#summaryContent {
    width: 100%;
    max-width: none;
    min-height: 350px;
    height: 55vh;
    overflow-y: auto;
    background: rgba(0, 150, 255, 0.08);
    border: 1px solid rgba(0, 150, 255, 0.4);
    border-radius: 20px;
    padding: 25px;
    margin-top: 20px;
    line-height: 1.8;
    box-shadow: 0 0 20px rgba(0, 150, 255, 0.2);
    white-space: pre-wrap;
}

.summary-screen h2 {
    font-size: 2rem;
    text-align: center;
    letter-spacing: 3px;
    margin-bottom: 15px;
}

#listenSummaryBtn {
    margin-top: 20px;
}

#splashScreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: black;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeOut 2s ease forwards;
    animation-delay: 2s;
}

#splashLogo {
    width: 500px;
    max-width: 80%;
    animation: zoomIn 2s ease;
}

@keyframes zoomIn {

    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeOut {

    to {
        opacity: 0;
        visibility: hidden;
    }
}

/* =========================================
   3D FLASHCARDS
========================================= */

.flashcards-screen {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: radial-gradient( circle at center, rgba(78,161,255,0.12), transparent 55% ), #020617;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    color: white;
    perspective: 1400px;
}


/* ESCENA */

.flashcard-scene {
    width: min(760px, 85vw);
    height: 460px;
    perspective: 1400px;
}


/* TARJETA */

.flashcard-card {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(.2,.75,.25,1);
}


    /* GIRO */

    .flashcard-card.flipped {
        transform: rotateY(180deg);
    }


/* CARAS */

.flashcard-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 28px;
    border: 1px solid rgba(78,161,255,0.35);
    background: linear-gradient( 145deg, rgba(255,255,255,0.08), rgba(255,255,255,0.025) );
    backdrop-filter: blur(20px);
    box-shadow: 0 25px 80px rgba(0,0,0,0.5), 0 0 40px rgba(78,161,255,0.12);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 55px;
}


/* FRENTE */

.flashcard-front {
    transform: rotateY(0deg);
}


/* ATRÁS */

.flashcard-back {
    transform: rotateY(180deg);
}


/* NUMERO */

.flashcard-number {
    position: absolute;
    top: 28px;
    left: 35px;
    font-size: 13px;
    letter-spacing: 3px;
    color: #7db7ff;
}


    .flashcard-number span {
        color: #62748b;
    }




.flashcard-label {
    margin-bottom: 25px;
    font-size: 13px;
    letter-spacing: 5px;
    color: #7db7ff;
}


/* PREGUNTA */

.flashcard-question {
    max-width: 650px;
    text-align: center;
    font-size: 32px;
    line-height: 1.4;
    font-weight: 500;
    color: #edf6ff;
}


/* RESPUESTA */

.flashcard-answer {
    max-width: 650px;
    max-height: 220px;
    overflow-y: auto;
    text-align: center;
    font-size: 21px;
    line-height: 1.6;
    color: #cbdcf0;
}


/* BOTONES */

.flashcard-action {
    margin-top: 45px;
    padding: 15px 32px;
    border: 1px solid rgba(78,161,255,0.6);
    background: rgba(78,161,255,0.08);
    border-radius: 12px;
    color: white;
    font-size: 14px;
    letter-spacing: 2px;
    cursor: pointer;
    transition: 0.3s ease;
}


    .flashcard-action:hover {
        background: rgba(78,161,255,0.25);
        transform: translateY(-3px);
        box-shadow: 0 10px 30px rgba(78,161,255,0.2);
    }


/* PROGRESO */

.flashcard-progress {
    margin-top: 25px;
}


.flashcard-progress-text {
    font-size: 14px;
    letter-spacing: 4px;
    color: #6f8baa;
}


/* VACIO */

.flashcard-empty {
    text-align: center;
}


#memoryRepeats {
    width: 280px;
    padding: 15px 45px 15px 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(78, 161, 255, 0.35);
    border-radius: 14px;
    color: #eaf4ff;
    font-size: 15px;
    letter-spacing: 2px;
    cursor: pointer;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #7db7ff 50%), linear-gradient(135deg, #7db7ff 50%, transparent 50%);
    background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}


    #memoryRepeats:hover {
        border-color: rgba(78, 161, 255, 0.8);
        background-color: rgba(78, 161, 255, 0.08);
        box-shadow: 0 0 20px rgba(78, 161, 255, 0.15);
    }


    /* FOCUS */

    #memoryRepeats:focus {
        border-color: #4ea1ff;
        box-shadow: 0 0 0 3px rgba(78, 161, 255, 0.08), 0 0 25px rgba(78, 161, 255, 0.2);
    }


    /* OPCIONES */

    #memoryRepeats option {
        background: #07111f;
        color: #eaf4ff;
        padding: 10px;
    }

/* =========================================
   FOCUS MODE — SESSION SETUP
========================================= */

.setup-panel {
    width: min(720px, 90vw);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 28px;
}


/* TITLE */

.settings-title {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 5px;
    font-size: 12px;
    letter-spacing: 5px;
    color: #6f91b8;
}

.title-line {
    flex: 1;
    height: 1px;
    background: linear-gradient( 90deg, rgba(78,161,255,0.35), transparent );
}


/* SECTIONS */

.setup-section {
    padding: 22px;
    border: 1px solid rgba(78,161,255,0.12);
    border-radius: 18px;
    background: rgba(255,255,255,0.025);
    transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s ease;
}

    .setup-section:hover {
        border-color: rgba(78,161,255,0.28);
        background: rgba(78,161,255,0.035);
    }


/* SECTION LABEL */

.section-label {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    font-size: 13px;
    letter-spacing: 3px;
    color: #b9d6f5;
}

.section-number {
    color: #4ea1ff;
    font-size: 11px;
    letter-spacing: 1px;
}


/* =========================================
   UPLOAD
========================================= */

.upload-area {
    position: relative;
    min-height: 150px;
    border: 1px dashed rgba(78,161,255,0.35);
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    transition: 0.3s ease;
}

    .upload-area:hover {
        border-color: rgba(78,161,255,0.75);
        background: rgba(78,161,255,0.04);
    }


.upload-icon {
    font-size: 25px;
    color: #4ea1ff;
    margin-bottom: 8px;
    text-shadow: 0 0 15px rgba(78,161,255,0.8);
}


.upload-title {
    font-size: 15px;
    letter-spacing: 3px;
    color: #eaf4ff;
}


.upload-formats {
    margin-top: 7px;
    font-size: 10px;
    letter-spacing: 2px;
    color: #617b99;
}


#fileInput {
    display: none;
}


.upload-button {
    margin-top: 15px;
    padding: 9px 18px;
    border: 1px solid rgba(78,161,255,0.35);
    border-radius: 9px;
    color: #9dc8f5;
    font-size: 11px;
    letter-spacing: 2px;
    cursor: pointer;
    transition: 0.3s ease;
}

    .upload-button:hover {
        background: rgba(78,161,255,0.12);
        border-color: #4ea1ff;
        color: white;
    }


#fileStatus {
    margin: 12px 0 0;
    font-size: 11px;
    letter-spacing: 1px;
    color: #6686a8;
}


/* =========================================
   MEMORY REVIEWS
========================================= */

.review-control {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
}

    .review-control span {
        max-width: 350px;
        font-size: 12px;
        line-height: 1.6;
        letter-spacing: 1px;
        color: #718aa6;
    }


#memoryRepeats {
    width: 210px;
    flex-shrink: 0;
}


/* =========================================
   SESSION GOAL
========================================= */

.goal-description {
    margin-bottom: 18px;
    font-size: 12px;
    letter-spacing: 1px;
    color: #718aa6;
}


.goal-buttons {
    display: flex;
    gap: 10px;
}


.goal-btn {
    flex: 1;
    width: auto;
    padding: 13px 10px;
    border: 1px solid rgba(78,161,255,0.2);
    border-radius: 10px;
    background: rgba(255,255,255,0.025);
    color: #8eaccb;
    font-size: 14px;
    letter-spacing: 1px;
    transition: 0.25s ease;
}


    .goal-btn:hover {
        transform: translateY(-2px);
    }


    .goal-btn.selected {
        background: rgba(78,161,255,0.14);
        border-color: #4ea1ff;
        color: white;
        box-shadow: 0 0 18px rgba(78,161,255,0.15);
    }


/* =========================================
   READY
========================================= */

.ready-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 5px;
}


.ready-line {
    width: 100%;
    height: 1px;
    background: linear-gradient( 90deg, transparent, rgba(78,161,255,0.2), transparent );
    margin-bottom: 25px;
}


#readyBtn {
    min-width: 220px;
    padding: 16px 30px;
    border: 1px solid rgba(78,161,255,0.7);
    background: rgba(78,161,255,0.06);
    border-radius: 12px;
    color: white;
    font-size: 14px;
    letter-spacing: 4px;
}


    #readyBtn span {
        margin-left: 15px;
        color: #4ea1ff;
        transition: 0.3s ease;
    }


    #readyBtn:hover span {
        margin-left: 25px;
    }


.ready-hint {
    margin-top: 12px;
    font-size: 9px;
    letter-spacing: 3px;
    color: #465d76;
}
/* =========================================
   FOCUS MODE SCROLL
========================================= */

.locked-screen {
    overflow-y: auto;
    overflow-x: hidden;
}

    /* Scrollbar */

    .locked-screen::-webkit-scrollbar {
        width: 8px;
    }

    .locked-screen::-webkit-scrollbar-track {
        background: rgba(255,255,255,0.02);
    }

    .locked-screen::-webkit-scrollbar-thumb {
        background: rgba(78,161,255,0.35);
        border-radius: 20px;
        border: 2px solid rgba(2,6,23,0.98);
    }

        .locked-screen::-webkit-scrollbar-thumb:hover {
            background: rgba(78,161,255,0.7);
        }

/* =========================================
   SUMMARY SCREEN
========================================= */

.summary-screen {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    background: radial-gradient( circle at 50% 20%, rgba(78,161,255,0.08), transparent 45% ), #020617;
    z-index: 2000;
    color: white;
    display: none;
    justify-content: flex-start;
    align-items: center;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 50px 5vw;
}


    /* SCROLLBAR */

    .summary-screen::-webkit-scrollbar {
        width: 8px;
    }

    .summary-screen::-webkit-scrollbar-track {
        background: rgba(255,255,255,0.02);
    }

    .summary-screen::-webkit-scrollbar-thumb {
        background: rgba(78,161,255,0.35);
        border-radius: 20px;
    }

        .summary-screen::-webkit-scrollbar-thumb:hover {
            background: rgba(78,161,255,0.7);
        }



.summary-wrapper {
    width: min(1200px, 90vw);
    margin: 0 auto;
}



.summary-header {
    display: flex;
    flex-direction: column;
    gap: 20px;
}



.analysis-status {
    display: flex;
    align-items: center;
    gap: 14px;
}


.status-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(78,161,255,0.7);
    color: #4ea1ff;
    font-size: 16px;
    box-shadow: 0 0 18px rgba(78,161,255,0.2);
}


.status-label {
    display: block;
    font-size: 11px;
    letter-spacing: 3px;
    color: #8db8e5;
}


.status-subtitle {
    display: block;
    margin-top: 5px;
    font-size: 11px;
    color: #536d89;
    letter-spacing: 1px;
}


/* TITLE */

.summary-title {
    text-align: center;
}


    .summary-title h2 {
        margin: 0;
        font-size: clamp(45px, 7vw, 75px);
        letter-spacing: 12px;
        color: #eaf4ff;
        text-shadow: 0 0 15px #4ea1ff, 0 0 40px rgba(78,161,255,0.5);
    }


    .summary-title p {
        margin: 8px 0 0;
        font-size: 11px;
        letter-spacing: 4px;
        color: #617d9e;
    }


/* =========================================
   SUMMARY CARD
========================================= */

.summary-card {
    border: 1px solid rgba(78,161,255,0.2);
    border-radius: 20px;
    background: rgba(255,255,255,0.025);
    backdrop-filter: blur(12px);
    box-shadow: 0 15px 50px rgba(0,0,0,0.25);
    overflow: hidden;
}


.summary-card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px 25px;
    border-bottom: 1px solid rgba(78,161,255,0.1);
    font-size: 11px;
    letter-spacing: 3px;
    color: #8eb6df;
}


.summary-card-line {
    flex: 1;
    height: 1px;
    background: linear-gradient( 90deg, rgba(78,161,255,0.3), transparent );
}


/* CONTENT */

#summaryContent {
    width: 100%;
    height: 42vh;
    min-height: 320px;
    overflow-y: auto;
    padding: 30px;
    margin: 0;
    background: rgba(0,0,0,0.12);
    border: none;
    border-radius: 0;
    line-height: 1.9;
    font-size: 16px;
    color: #c8dbef;
    white-space: pre-wrap;
}


    /* INNER SCROLL */

    #summaryContent::-webkit-scrollbar {
        width: 6px;
    }

    #summaryContent::-webkit-scrollbar-track {
        background: transparent;
    }

    #summaryContent::-webkit-scrollbar-thumb {
        background: rgba(78,161,255,0.3);
        border-radius: 20px;
    }


/* =========================================
   TOOLS
========================================= */

.summary-tools {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}


.tool-btn {
    min-height: 58px;
    padding: 12px;
    border: 1px solid rgba(78,161,255,0.15);
    border-radius: 12px;
    background: rgba(255,255,255,0.025);
    color: #7996b5;
    font-size: 10px;
    letter-spacing: 1.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}


    .tool-btn span {
        color: #4ea1ff;
        font-size: 14px;
    }


    .tool-btn:hover {
        background: rgba(78,161,255,0.08);
        border-color: rgba(78,161,255,0.5);
        color: white;
        transform: translateY(-2px);
    }


.active-tool {
    border-color: rgba(78,161,255,0.35);
    background: rgba(78,161,255,0.06);
    color: #b9d8f7;
}


/* =========================================
   START FLASHCARDS
========================================= */

.summary-start {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 5px;
}


.start-line {
    width: 100%;
    height: 1px;
    background: linear-gradient( 90deg, transparent, rgba(78,161,255,0.25), transparent );
    margin-bottom: 25px;
}


#startFlashcardsBtn {
    width: min(500px, 90%);
    padding: 18px 30px;
    border: 1px solid rgba(78,161,255,0.75);
    border-radius: 13px;
    background: linear-gradient( 90deg, rgba(78,161,255,0.08), rgba(78,161,255,0.15), rgba(78,161,255,0.08) );
    color: white;
    font-size: 14px;
    letter-spacing: 4px;
    box-shadow: 0 0 20px rgba(78,161,255,0.08);
}


    #startFlashcardsBtn span {
        margin-left: 20px;
        color: #4ea1ff;
        transition: 0.3s ease;
    }


    #startFlashcardsBtn:hover span {
        margin-left: 35px;
    }


.summary-start p {
    margin: 12px 0 0;
    font-size: 9px;
    letter-spacing: 3px;
    color: #40556e;
}


/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 700px) {

    .summary-screen {
        padding: 30px 15px;
    }


    .summary-tools {
        grid-template-columns: repeat(2, 1fr);
    }


    #summaryContent {
        height: 300px;
        padding: 20px;
        font-size: 14px;
    }


    .summary-title h2 {
        letter-spacing: 7px;
    }
}


@media (max-width: 450px) {

    .summary-tools {
        grid-template-columns: 1fr;
    }


    .tool-btn {
        min-height: 50px;
    }
}

/* =========================================
   RESULTS SCREEN
========================================= */

.results-screen {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    background: radial-gradient( circle at center, rgba(78,161,255,0.10), transparent 45% ), #020617;
    z-index: 3000;
    color: white;
    display: none;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 40px 20px;
}


    .results-screen::before {
        content: "";
        position: absolute;
        width: 500px;
        height: 500px;
        border-radius: 50%;
        background: rgba(78,161,255,0.05);
        filter: blur(80px);
        pointer-events: none;
    }

.results-wrapper {
    position: relative;
    z-index: 2;
    width: min(850px, 92vw);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}


/* =========================================
   COMPLETION
========================================= */

.completion-status {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #82b5e8;
    font-size: 11px;
    letter-spacing: 4px;
}


.completion-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(78,161,255,0.7);
    color: #4ea1ff;
    box-shadow: 0 0 20px rgba(78,161,255,0.25);
    animation: completionPulse 2s infinite;
}


@keyframes completionPulse {

    0%, 100% {
        box-shadow: 0 0 15px rgba(78,161,255,0.15);
    }

    50% {
        box-shadow: 0 0 30px rgba(78,161,255,0.45);
    }
}


/* =========================================
   HEADER
========================================= */

.results-header {
    margin-top: 25px;
}


    .results-header h2 {
        margin: 0;
        font-size: clamp(45px, 7vw, 75px);
        letter-spacing: 10px;
        color: #eaf4ff;
        text-shadow: 0 0 15px #4ea1ff, 0 0 45px rgba(78,161,255,0.45);
    }


    .results-header p {
        margin: 12px 0 0;
        font-size: 13px;
        letter-spacing: 2px;
        color: #617d9e;
    }


/* =========================================
   SCORE
========================================= */

.score-display {
    margin-top: 35px;
}


.score-number {
    font-size: clamp(70px, 10vw, 110px);
    font-weight: bold;
    letter-spacing: 4px;
    color: white;
    text-shadow: 0 0 20px rgba(78,161,255,0.8), 0 0 50px rgba(78,161,255,0.35);
}


.score-divider {
    color: #45617f;
    margin: 0 10px;
}


.score-label {
    margin-top: 5px;
    font-size: 10px;
    letter-spacing: 5px;
    color: #4ea1ff;
}


/* =========================================
   STATISTICS
========================================= */

.results-stats {
    width: 100%;
    margin-top: 40px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}


.result-stat {
    padding: 22px 15px;
    border: 1px solid rgba(78,161,255,0.14);
    border-radius: 15px;
    background: rgba(255,255,255,0.025);
    transition: 0.3s ease;
}


    .result-stat:hover {
        transform: translateY(-4px);
        border-color: rgba(78,161,255,0.4);
        background: rgba(78,161,255,0.05);
    }


.stat-label {
    display: block;
    font-size: 9px;
    letter-spacing: 2px;
    color: #617d9e;
}


.result-stat strong {
    display: block;
    margin-top: 10px;
    font-size: 30px;
    color: #e8f3ff;
    text-shadow: 0 0 12px rgba(78,161,255,0.35);
}


/* =========================================
   MESSAGE
========================================= */

.results-message {
    margin: 30px 0 0;
    font-size: 12px;
    letter-spacing: 2px;
    color: #718aa6;
}


/* =========================================
   ACTIONS
========================================= */

.results-actions {
    width: 100%;
    margin-top: 35px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}


.primary-result-btn {
    width: min(450px, 90%);
    padding: 18px 30px;
    border: 1px solid rgba(78,161,255,0.75);
    border-radius: 13px;
    background: rgba(78,161,255,0.08);
    color: white;
    font-size: 13px;
    letter-spacing: 4px;
    box-shadow: 0 0 20px rgba(78,161,255,0.08);
}


    .primary-result-btn span {
        margin-left: 20px;
        color: #4ea1ff;
        transition: 0.3s ease;
    }


    .primary-result-btn:hover span {
        margin-left: 35px;
    }


.secondary-result-btn {
    padding: 10px 20px;
    border: none;
    background: transparent;
    color: #526b87;
    font-size: 9px;
    letter-spacing: 3px;
}


    .secondary-result-btn:hover {
        color: #9bbce0;
        background: transparent;
        box-shadow: none;
        transform: none;
    }


/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 700px) {

    .results-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}


@media (max-width: 450px) {

    .results-stats {
        grid-template-columns: 1fr 1fr;
    }

    .result-stat {
        padding: 18px 10px;
    }

        .result-stat strong {
            font-size: 24px;
        }

    .results-header h2 {
        letter-spacing: 6px;
    }
}

.summary-screen > button:not(.tool-btn) {
    min-height: 70px;
    padding: 20px 40px;
}

.summary-screen .tool-btn {
    min-height: 32px !important;
    height: 32px !important;
    padding: 0 25px !important;
    font-size: 11px !important;
    line-height: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 8px !important;
}

.summary-actions {
    width: 90%;
    max-width: 1000px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    margin-top: -100px;
    margin-left: auto;
    margin-right: 0;
}

    .summary-actions .tool-btn {
        width: 280px;
        height: 100px;
        padding: 0 25px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 12px;
        letter-spacing: 2px;
        border-radius: 10px;
    }

/* =========================================
   MOBILE / ANDROID
   LOCKED IN RESPONSIVE
========================================= */

@media (max-width: 700px) {

    html,
    body {
        width: 100%;
        min-height: 100%;
        overflow-x: hidden;
    }

    body {
        min-height: 100dvh;
        height: 100dvh;
    }

    /* =========================
       SPLASH
    ========================= */

    #splashLogo {
        width: min(360px, 75vw);
    }

    /* =========================
       HOME
    ========================= */

    .container {
        width: 90%;
        padding: 20px;
    }

    h1 {
        font-size: clamp(42px, 14vw, 70px);
        letter-spacing: clamp(5px, 2vw, 10px);
        margin-bottom: 15px;
    }

    .container p {
        font-size: 14px;
        letter-spacing: 3px;
        line-height: 1.6;
        margin-bottom: 35px;
    }

    .container button {
        min-height: 52px;
        padding: 14px 35px;
        font-size: 14px;
    }

    /* =========================
       CLOCK
    ========================= */

    .clock {
        top: 15px;
        right: 18px;
        font-size: 12px;
        letter-spacing: 2px;
    }

    /* =========================
       FOCUS MODE
    ========================= */

    .locked-screen {
        width: 100%;
        height: 100dvh;
        min-height: 100dvh;
        padding: 55px 15px 35px;
        justify-content: flex-start;
        overflow-y: auto;
    }

        .locked-screen h2 {
            width: 100%;
            text-align: center;
            font-size: clamp(35px, 11vw, 55px);
            letter-spacing: 5px;
            margin-bottom: 10px;
        }

    .focus-text {
        width: 100%;
        text-align: center;
        font-size: 13px;
        line-height: 1.6;
        letter-spacing: 2px;
        margin-bottom: 35px;
    }

    .setup-panel {
        width: 100%;
        max-width: 520px;
        gap: 18px;
    }

    .settings-title {
        font-size: 10px;
        letter-spacing: 3px;
        gap: 10px;
    }

    .setup-section {
        width: 100%;
        padding: 17px;
        border-radius: 15px;
    }

    .section-label {
        font-size: 11px;
        letter-spacing: 2px;
        margin-bottom: 14px;
    }

    /* =========================
       UPLOAD
    ========================= */

    .upload-area {
        min-height: 145px;
        padding: 15px;
    }

    .upload-title {
        font-size: 13px;
        letter-spacing: 2px;
        text-align: center;
    }

    .upload-formats {
        font-size: 9px;
        letter-spacing: 1px;
        text-align: center;
    }

    .upload-button {
        min-height: 44px;
        padding: 12px 18px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 10px;
    }

    #fileStatus {
        max-width: 100%;
        overflow-wrap: anywhere;
        text-align: center;
        line-height: 1.5;
    }

    /* =========================
       MEMORY REVIEWS
    ========================= */

    .review-control {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

        .review-control span {
            max-width: none;
            font-size: 11px;
            line-height: 1.6;
        }

    #memoryRepeats {
        width: 100%;
        min-height: 48px;
        padding: 12px 40px 12px 15px;
        font-size: 13px;
    }

    /* =========================
       SESSION GOAL
    ========================= */

    .goal-description {
        font-size: 11px;
        line-height: 1.5;
    }

    .goal-buttons {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .goal-btn {
        min-height: 48px;
        padding: 10px 5px;
        font-size: 13px;
    }

    /* =========================
       READY
    ========================= */

    .ready-area {
        width: 100%;
    }

    #readyBtn {
        width: 100%;
        min-height: 54px;
        padding: 15px 20px;
        font-size: 13px;
        letter-spacing: 3px;
    }

    .ready-hint {
        font-size: 8px;
        letter-spacing: 2px;
        text-align: center;
    }

    /* =========================
       SUMMARY
    ========================= */

    .summary-screen {
        width: 100%;
        height: 100dvh;
        min-height: 100dvh;
        padding: 25px 12px 35px;
        align-items: stretch;
    }

    .summary-wrapper {
        width: 100%;
        max-width: 100%;
    }

    .summary-header {
        gap: 15px;
    }

    .analysis-status {
        gap: 10px;
    }

    .status-icon {
        width: 30px;
        height: 30px;
        flex-shrink: 0;
        font-size: 14px;
    }

    .status-label {
        font-size: 9px;
        letter-spacing: 2px;
    }

    .status-subtitle {
        font-size: 9px;
        line-height: 1.4;
    }

    .summary-title h2 {
        font-size: clamp(35px, 12vw, 55px);
        letter-spacing: 6px;
    }

    .summary-title p {
        font-size: 9px;
        letter-spacing: 2px;
    }

    /* =========================
       SUMMARY CONTENT
    ========================= */

    .summary-card {
        border-radius: 15px;
    }

    .summary-card-header {
        padding: 14px 16px;
        font-size: 9px;
        letter-spacing: 2px;
    }

    #summaryContent {
        width: 100%;
        height: 45dvh;
        min-height: 250px;
        max-height: 450px;
        padding: 18px;
        font-size: 14px;
        line-height: 1.7;
        overflow-y: auto;
        overflow-x: hidden;
        overflow-wrap: anywhere;
    }

    /* =========================
       SUMMARY BUTTONS
    ========================= */

    .summary-tools {
        width: 100%;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        margin-top: 10px;
    }

    .summary-screen .tool-btn {
        width: 100% !important;
        min-height: 48px !important;
        height: auto !important;
        padding: 10px 6px !important;
        font-size: 9px !important;
        letter-spacing: 1px !important;
    }

    .summary-actions {
        width: 100%;
        max-width: none;
        margin: 10px 0 0;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

        .summary-actions .tool-btn {
            width: 100%;
            min-height: 48px !important;
            height: auto !important;
            padding: 10px 6px !important;
            font-size: 9px;
            letter-spacing: 1px;
        }

    /* =========================
       START FLASHCARDS
    ========================= */

    .summary-start {
        width: 100%;
        margin-top: 20px;
    }

    #startFlashcardsBtn {
        width: 100%;
        min-height: 54px;
        padding: 15px 12px;
        font-size: 11px;
        letter-spacing: 2px;
    }

    .summary-start p {
        font-size: 8px;
        letter-spacing: 2px;
        text-align: center;
    }

    /* =========================
       FLASHCARDS
    ========================= */

    .flashcards-screen {
        width: 100%;
        height: 100dvh;
        min-height: 100dvh;
        padding: 20px 12px;
    }

    .flashcard-scene {
        width: 100%;
        height: min(68dvh, 440px);
        max-width: 520px;
        min-height: 300px;
    }

    .flashcard-face {
        padding: 35px 20px;
        border-radius: 20px;
    }

    .flashcard-number {
        top: 18px;
        left: 20px;
        font-size: 10px;
        letter-spacing: 2px;
    }

    .flashcard-label {
        margin-bottom: 18px;
        font-size: 10px;
        letter-spacing: 3px;
    }

    .flashcard-question {
        width: 100%;
        max-width: 100%;
        font-size: clamp(20px, 6vw, 28px);
        line-height: 1.35;
        overflow-wrap: anywhere;
    }

    .flashcard-answer {
        width: 100%;
        max-width: 100%;
        max-height: 45%;
        font-size: clamp(15px, 4.5vw, 20px);
        line-height: 1.5;
        overflow-y: auto;
        overflow-wrap: anywhere;
    }

    .flashcard-action {
        min-height: 48px;
        margin-top: 25px;
        padding: 12px 20px;
        font-size: 11px;
        letter-spacing: 1.5px;
    }

    .flashcard-progress {
        margin-top: 15px;
    }

    .flashcard-progress-text {
        font-size: 10px;
        letter-spacing: 2px;
    }

    /* =========================
       QUIZ
    ========================= */

    .quiz-container {
        width: 100%;
        height: 100dvh;
        min-height: 100dvh;
        padding: 25px 15px;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .question {
        width: 100%;
        max-width: 600px;
        font-size: clamp(22px, 7vw, 34px);
        line-height: 1.35;
        margin-bottom: 25px;
        overflow-wrap: anywhere;
    }

    input {
        width: 100%;
        max-width: 500px;
        min-height: 50px;
        padding: 14px;
        margin-bottom: 15px;
        font-size: 16px;
    }

    #submitAnswer {
        min-height: 50px;
        padding: 14px 30px;
        font-size: 13px;
    }

    .progress-container {
        width: 100%;
        max-width: 500px;
        height: 10px;
        margin-top: 25px;
        margin-bottom: 20px;
    }

    .streak-box {
        margin-top: 20px;
    }

        .streak-box h3 {
            font-size: clamp(45px, 14vw, 65px);
        }

    /* =========================
       RESULTS
    ========================= */

    .results-screen {
        width: 100%;
        height: 100dvh;
        min-height: 100dvh;
        padding: 30px 15px;
        align-items: flex-start;
    }

    .results-wrapper {
        width: 100%;
        max-width: 600px;
        margin: auto;
    }

    .completion-status {
        font-size: 9px;
        letter-spacing: 2px;
        gap: 8px;
    }

    .completion-icon {
        width: 28px;
        height: 28px;
        flex-shrink: 0;
    }

    .results-header {
        margin-top: 20px;
    }

        .results-header h2 {
            font-size: clamp(35px, 12vw, 55px);
            letter-spacing: 5px;
        }

        .results-header p {
            font-size: 11px;
            line-height: 1.5;
        }

    .score-display {
        margin-top: 25px;
    }

    .score-number {
        font-size: clamp(60px, 18vw, 90px);
    }

    .score-label {
        font-size: 9px;
        letter-spacing: 3px;
    }

    .results-stats {
        width: 100%;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        margin-top: 25px;
    }

    .result-stat {
        padding: 15px 8px;
        border-radius: 12px;
    }

    .stat-label {
        font-size: 8px;
        letter-spacing: 1px;
        line-height: 1.4;
    }

    .result-stat strong {
        font-size: 23px;
        margin-top: 8px;
    }

    .results-message {
        margin: 22px 0 0;
        font-size: 10px;
        line-height: 1.5;
        letter-spacing: 1px;
    }

    .results-actions {
        width: 100%;
        margin-top: 25px;
    }

    .primary-result-btn {
        width: 100%;
        min-height: 52px;
        padding: 14px 20px;
        font-size: 11px;
        letter-spacing: 2px;
    }

    .secondary-result-btn {
        min-height: 45px;
        padding: 12px 20px;
        font-size: 9px;
    }
}


/* =========================================
   SMALL PHONES
========================================= */

@media (max-width: 380px) {

    .locked-screen {
        padding-left: 10px;
        padding-right: 10px;
    }

    .setup-section {
        padding: 14px;
    }

    .goal-buttons {
        grid-template-columns: repeat(2, 1fr);
    }

    .summary-screen {
        padding-left: 9px;
        padding-right: 9px;
    }

    .summary-tools {
        grid-template-columns: 1fr;
    }

    .summary-actions {
        grid-template-columns: 1fr;
    }

    #summaryContent {
        font-size: 13px;
        padding: 15px;
    }

    .flashcard-scene {
        height: 62dvh;
        min-height: 280px;
    }

    .flashcard-face {
        padding: 30px 15px;
    }

    .results-stats {
        gap: 6px;
    }

    .result-stat {
        padding: 13px 5px;
    }
}


/* =========================================
   TOUCH DEVICES
========================================= */

@media (hover: none) and (pointer: coarse) {

    button,
    .upload-button,
    select,
    input {
        -webkit-tap-highlight-color: transparent;
    }

        button:hover,
        .upload-button:hover,
        .card:hover,
        .setup-section:hover {
            transform: none;
        }

        button:active,
        .upload-button:active {
            transform: scale(0.97);
        }
}

@media screen and (max-width: 700px) {

    #summaryScreen .summary-tools {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        max-width: 100% !important;
        gap: 10px !important;
    }

        #summaryScreen .summary-tools button {
            display: block !important;
            width: 100% !important;
            max-width: 100% !important;
            min-width: 0 !important;
            height: 52px !important;
            min-height: 52px !important;
            max-height: 52px !important;
            padding: 10px 14px !important;
            margin: 0 !important;
            font-size: 12px !important;
            line-height: 1.2 !important;
            letter-spacing: 1.5px !important;
            box-sizing: border-box !important;
        }
}

#analysisStatus {
    width: 85%;
    margin: 12px auto 0;
    text-align: center;
}

#fileStatus {
    margin: 0;
}

#analysisProgressContainer {
    display: none;
    width: 80%;
    height: 5px;
    margin: 10px auto 6px;
    background: rgba(150, 170, 190, 0.25);
    border-radius: 10px;
    overflow: hidden;
}

#analysisProgress {
    width: 0%;
    height: 100%;
    background: #8ed8ff;
    border-radius: 10px;
    transition: width 0.3s ease;
}

#analysisProgressText,
#analysisProgressPercent {
    display: none;
    color: #8ed8ff;
    font-size: 12px;
    text-align: center;
}

#analysisProgressText {
    margin-top: 5px;
}

#analysisProgressPercent {
    margin-top: 2px;
}