@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap');

* {
    box-sizing: border-box;
}
::-webkit-scrollbar {
    display: none;
}
body {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(-45deg, #0a0a0a, #1a1025, #001220, #140518);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    color: #f4f4f4;
    font-family: 'Outfit', sans-serif;
    padding: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.card {
    width: min(100%, 600px);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(255,255,255,0.05);
}

.welcome {
    text-align: center;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    text-decoration: none;
}

.brand-mark {
    display: grid;
    grid-template-columns: repeat(3, 12px);
    grid-template-rows: repeat(3, 12px);
    gap: 3px;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(255, 0, 127, 0.85), rgba(121, 40, 202, 0.9));
    box-shadow: 0 8px 20px rgba(121, 40, 202, 0.28);
    transform: rotate(-4deg);
}

.brand-mark span {
    display: grid;
    place-items: center;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 0.52rem;
    font-weight: 800;
    line-height: 1;
}

.brand-mark span:nth-child(2n) {
    background: rgba(255, 255, 255, 0.92);
}

.brand-mark span:nth-child(2n) {
    color: #7928ca;
}

.brand-name {
    display: inline-flex;
    align-items: baseline;
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.brand-name strong {
    color: #fff;
}

.brand-name > span {
    color: #ff6fb4;
}

.top-title {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    min-width: 0;
}

h1 {
    font-size: 42px;
    margin-top: 0;
    font-weight: 800;
    background: linear-gradient(135deg, #fff, #a3a3a3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

h1 span {
    background: linear-gradient(135deg, #ff007f, #7928ca);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    line-height: 1.4;
    font-weight: 600;
    font-size: 24px;
    margin-bottom: 24px;
}

.top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 16px;
    margin-bottom: 24px;
}

.top h1 {
    font-size: 24px;
    margin: 0;
}

.top .timer-badge {
    font-size: 14px;
    color: #ff007f;
    font-weight: 600;
    background: rgba(255, 0, 127, 0.15);
    padding: 6px 12px;
    border-radius: 20px;
}

label {
    display: block;
    margin: 20px 0 10px;
    font-weight: 600;
    color: #ccc;
    text-align: left;
}

input {
    width: 100%;
    padding: 16px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(0,0,0,0.3);
    color: white;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s ease;
}

input:focus {
    outline: none;
    border-color: #ff007f;
    box-shadow: 0 0 0 3px rgba(255,0,127,0.2);
}

button {
    width: 100%;
    padding: 16px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, #ff007f, #7928ca);
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 24px;
    font-family: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 8px 20px rgba(121, 40, 202, 0.4);
}

button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(121, 40, 202, 0.5);
}

button:active:not(:disabled) {
    transform: translateY(1px);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option {
    background: rgba(255,255,255,0.05);
    color: #fff;
    text-align: left;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: none;
    margin-top: 0;
    transition: all 0.3s ease;
}

.option:hover:not(:disabled) {
    background: rgba(255,255,255,0.1);
    border-color: #7928ca;
    transform: scale(1.02);
}

.option.correct {
    background: linear-gradient(135deg, #1fbd70, #118653);
    border-color: #72f2ad;
    color: #ffffff;
    opacity: 1;
    box-shadow: 0 0 0 3px rgba(40, 199, 111, 0.2), 0 10px 24px rgba(40, 199, 111, 0.32);
    animation: correctAnswer 0.45s ease;
}

.option.incorrect {
    background: linear-gradient(135deg, #d83a5b, #9e1838);
    border-color: #ff91a8;
    color: #ffffff;
    opacity: 1;
    box-shadow: 0 0 0 3px rgba(255, 77, 109, 0.2), 0 10px 24px rgba(190, 32, 71, 0.3);
    animation: incorrectAnswer 0.45s ease;
}

#mensaje.correct-message {
    color: #72f2ad;
}

#mensaje.incorrect-message {
    color: #ff91a8;
}

@keyframes correctAnswer {
    0% { transform: scale(1); }
    55% { transform: scale(1.03); }
    100% { transform: scale(1); }
}

@keyframes incorrectAnswer {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.error {
    background: rgba(255, 0, 85, 0.15);
    border-left: 4px solid #ff0055;
    padding: 14px;
    border-radius: 8px;
    color: #ffb3c6;
    margin-bottom: 20px;
}

.retos-disponibles {
    margin: 16px 0;
    padding: 14px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    text-align: left;
    color: #d7d7d7;
}

.retos-disponibles ul {
    margin: 8px 0 0;
    padding-left: 20px;
}

.retos-disponibles li + li {
    margin-top: 5px;
}

#mensaje {
    margin-top: 20px;
    font-weight: 600;
    text-align: center;
    font-size: 16px;
}

.clue {
    background: rgba(40, 199, 111, 0.1);
    border-left: 4px solid #28c76f;
    padding: 16px;
    border-radius: 12px;
    margin-top: 24px;
    color: #d4f4e2;
    animation: slideIn 0.4s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.pistas-lista {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(121, 40, 202, 0.12);
    border: 1px solid rgba(121, 40, 202, 0.28);
}

.pistas-lista h3 {
    margin: 0 0 10px;
    font-size: 0.95rem;
    color: #e0c4ff;
}

.pistas-lista ol {
    margin: 0;
    padding-left: 18px;
    color: #d4f4e2;
}

.pistas-lista li {
    margin: 6px 0;
    font-size: 0.88rem;
    line-height: 1.4;
}

.hidden {
    display: none;
}

.link {
    display: inline-block;
    color: #7928ca;
    text-align: center;
    margin-top: 28px;
    text-decoration: none;
    font-weight: 600;
    background: rgba(121, 40, 202, 0.1);
    padding: 10px 20px;
    border-radius: 20px;
    transition: all 0.3s ease;
    width: 100%;
}

.link:hover {
    background: rgba(121, 40, 202, 0.2);
    color: #fff;
}

.grid-demo {
    display: grid;
    place-items: center;
    min-height: 200px;
    background: rgba(0,0,0,0.3);
    border: 1px dashed rgba(255,255,255,0.2);
    border-radius: 16px;
    color: #aaa;
    text-align: center;
    padding: 20px;
}

small {
    display: block;
    color: #888;
    margin-top: 24px;
    line-height: 1.6;
    font-size: 13px;
}

.tema-badge {
    display: inline-block;
    margin: 0 0 12px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 0, 127, 0.15);
    color: #ff7ab8;
    font-weight: 600;
    font-size: 0.9rem;
}

.tema-inline {
    margin: -8px 0 18px;
    color: #ff7ab8;
    font-weight: 600;
    font-size: 0.9rem;
}

.offline-banner {
    display: none;
    position: fixed;
    top: max(10px, env(safe-area-inset-top));
    left: 50%;
    z-index: 1000;
    width: min(600px, calc(100% - 20px));
    max-width: 600px;
    margin: 0;
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(255, 193, 7, 0.15);
    border-left: 4px solid #ffc107;
    color: #ffe08a;
    font-size: 0.9rem;
    line-height: 1.35;
    text-align: center;
    overflow-wrap: anywhere;
    transform: translateX(-50%);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(10px);
}

.offline-banner.show {
    display: block;
}

@media (max-width: 600px) {
    body {
        padding: 10px;
        align-items: flex-start;
        overflow-x: hidden;
    }

    .card {
        width: 100%;
        max-width: 100%;
        padding: 18px 14px;
        border-radius: 18px;
    }

    .offline-banner {
        width: calc(100% - 20px);
        padding: 10px 12px;
        font-size: 0.82rem;
        text-align: left;
    }

    h1 {
        font-size: 28px;
    }

    .top {
        flex-direction: column;
        align-items: flex-start;
    }

    .option {
        font-size: 15px;
        padding: 14px;
    }
}

