body {
    font-family: Arial, sans-serif;
    background: #121212;
    color: #fff;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
}

* {
    box-sizing: inherit;
}

h1, h2 {
    margin-bottom: 20px;
}

.menu a {
    display: block;
    margin: 15px;
    padding: 15px;
    background: #1e1e1e;
    border-radius: 10px;
    text-decoration: none;
    color: #00ffcc;
    font-size: 20px;
}

.menu a:hover,
button:hover,
.button-link:hover {
    filter: brightness(1.08);
}

input, textarea {
    width: 50%;
    margin: 5px;
    padding: 15px;
    border-radius: 8px;
    border: none;
}

textarea {
    height: 100px;
}

button {
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    background: #00ffcc;
    color: #000;
    font-size: 18px;
    cursor: pointer;
}

body:not(.study-page) #card {
    background: #1e1e1e;
    border-radius: 15px;
    padding: 40px;
    margin: 20px auto;
    width: 90%;
    min-height: 200px;
    font-size: 20px;
}

.card-item {
    background: #1e1e1e;
    margin: 10px;
    padding: 15px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.acciones a {
    margin-left: 10px;
    text-decoration: none;
    font-size: 18px;
}

.logo {
    width: 120px;
    max-width: 60%;
    margin: 20px auto;
    display: block;
}

.home-page,
.study-page {
    min-height: 100vh;
    margin: 0;
    background: radial-gradient(circle at top left, #28465a, #101820 45%, #0b1016);
}

.home-shell,
.study-shell {
    width: min(100%, 980px);
    margin: 0 auto;
}

.eyebrow {
    color: #d9b56d;
    font-size: 0.9rem;
    font-weight: bold;
    letter-spacing: 0;
    margin: 0 0 8px;
    text-transform: uppercase;
}

.home-intro,
.study-lead {
    color: #cfd8dc;
    line-height: 1.5;
    margin: 0 auto 20px;
    max-width: 620px;
}

.install-app-btn {
    background: #25D366;
    border-radius: 8px;
    color: #082015;
    font-size: 1rem;
    font-weight: bold;
    margin: 4px auto 8px;
    padding: 12px 16px;
}

.install-app-btn[hidden] {
    display: none;
}

.home-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-top: 24px;
    text-align: left;
}

.home-grid a {
    min-height: 112px;
    margin: 0;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 8px;
    background: #182635;
}

.home-grid strong,
.home-grid span {
    display: block;
}

.home-grid span {
    margin-top: 8px;
    color: #cfd8dc;
    font-size: 0.95rem;
    line-height: 1.35;
}

.study-header {
    margin-bottom: 16px;
}

.back-link,
.button-link {
    display: inline-block;
    color: #f5f5f5;
    text-decoration: none;
    background: #223447;
    border-radius: 8px;
    padding: 12px 14px;
}

.back-link {
    margin-bottom: 20px;
}

.filter-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 1fr)) auto auto;
    gap: 10px;
    align-items: center;
    margin: 20px auto 0;
    max-width: 900px;
}

.filter-bar select {
    width: 100%;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 8px;
    background: #0e1720;
    color: #f5f5f5;
    padding: 14px;
    font-size: 1rem;
}

.study-card,
.empty-state {
    background: linear-gradient(145deg, #182635, #111c27);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(0,0,0,.25);
    margin: 0 auto;
    max-width: 760px;
    padding: 18px;
}

.study-progress,
.session-summary {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #cfd8dc;
    flex-wrap: wrap;
}

.import-card {
    margin-bottom: 16px;
    text-align: left;
}

.import-help {
    color: #cfd8dc;
    line-height: 1.5;
}

.csv-sample {
    background: #0e1720;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 8px;
    color: #f5f5f5;
    line-height: 1.45;
    overflow-x: auto;
    padding: 14px;
    white-space: pre-wrap;
}

.import-actions {
    grid-template-columns: repeat(3, 1fr);
    margin: 16px 0;
}

.import-form {
    border-top: 1px solid rgba(255,255,255,.12);
    display: grid;
    gap: 12px;
    margin-top: 18px;
    padding-top: 18px;
}

.import-form label {
    color: #d9b56d;
    font-weight: bold;
}

.import-form input[type="file"] {
    background: #0e1720;
    border: 1px solid rgba(255,255,255,.12);
    color: #f5f5f5;
    width: 100%;
}

.import-result {
    margin-bottom: 16px;
    text-align: left;
}

.error-list {
    color: #f5f5f5;
    line-height: 1.5;
}

.flashcard {
    background: #0e1720;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 8px;
    margin: 18px 0;
    min-height: 280px;
    padding: 24px;
    text-align: left;
    cursor: pointer;
}

.card-label {
    color: #d9b56d;
    font-size: .85rem;
    font-weight: bold;
    margin: 0 0 12px;
    text-transform: uppercase;
}

.flashcard h2 {
    color: #00ffcc;
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    line-height: 1.15;
    margin: 0 0 10px;
}

.hint {
    color: #cfd8dc;
}

.answer {
    border-left: 4px solid #d9b56d;
    color: #f5f5f5;
    display: none;
    line-height: 1.55;
    margin-top: 22px;
    padding-left: 14px;
    white-space: pre-line;
}

.answer.visible {
    display: block;
}

.study-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.secondary-btn {
    background: #374151;
    color: #f5f5f5;
}

.success-btn {
    background: #25D366;
    color: #082015;
}


/* ========================= */
/* 🎮 JUEGOS FILOSOFÍA MOBILE */
/* ========================= */

.game-container {
    max-width: 700px;
    margin: 20px auto;
    padding: 15px;
}

.game-card {
    background: #1e1e1e;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 8px;
    margin: 14px auto;
    padding: 18px;
}

.game-title {
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 15px;
}

.game-text {
    font-size: 18px;
    text-align: center;
    margin-bottom: 15px;
}

.game-subtext {
    font-size: 14px;
    text-align: center;
    color: #555;
    margin-bottom: 20px;
}

/* Botones tipo app */
.game-btn {
    width: 100%;
    padding: 15px;
    margin-bottom: 10px;
    font-size: 18px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(45deg, #1a0beb, #24A0ED);
    color: white;
    transition: 0.2s;
}

.game-btn:hover {
    transform: scale(1.02);
}

/* Resultado */
.game-result {
    text-align: center;
    font-size: 20px;
    margin-top: 15px;
}

/* Puntaje */
.game-score {
    text-align: center;
    font-size: 16px;
    margin-top: 10px;
}

/* Botón siguiente */
.game-next {
    display: block;
    text-align: center;
    text-decoration: none;
    width: 100%;
    padding: 12px;
    margin-top: 15px;
    border-radius: 8px;
    background: #333;
    color: white;
    border: none;
}

.game-input {
    width: min(100%, 180px);
    text-align: center;
    text-transform: uppercase;
}

.game-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.game-link {
    color: #00ffcc;
    text-decoration: none;
}

.hangman-drawing {
    color: #d9b56d;
    font-size: 1rem;
    line-height: 1.15;
    overflow-x: auto;
}

.hangman-word {
    font-size: clamp(1.8rem, 7vw, 3rem);
    letter-spacing: .2em;
    overflow-wrap: anywhere;
}

.game-info,
.game-hint {
    color: #cfd8dc;
}

/* ========================= */
/* 📱 EXTRA MOBILE */
/* ========================= */
@media (max-width: 768px) {

    .game-title {
        font-size: 22px;
    }

    .game-text {
        font-size: 17px;
    }

    .game-btn {
        font-size: 17px;
        padding: 14px;
    }

    body {
        padding: 5px;
    }

    input,
    textarea {
        width: 100%;
    }

    .filter-bar,
    .study-actions,
    .import-actions {
        grid-template-columns: 1fr;
    }

}
