:root {
    --color-brand-primary: #ffffff;
    --color-brand-secondary: #c8c8c8;
    --color-brand-accent: #c58de7;
    --color-bg-dark: #000000;
    --color-bg-card: #121214;
    --color-bg-input: #1e1c24;
    --font-title: "Sora", sans-serif;
    --font-body: "Roboto Flex", sans-serif;
    --font-mono: "Roboto Mono", monospace;
}

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

body {
    background-color: var(--color-bg-dark);
    color: var(--color-brand-primary);
    font-family: var(--font-body);
    min-height: 100vh;
}

.page-shell {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 50px 20px;
}

.brand-mark {
    width: 150px;
    margin-bottom: 40px;
}

.layout {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    align-items: flex-start;
}

.hero-copy {
    width: 50%;
}

.eyebrow {
    font-family: var(--font-mono);
    color: var(--color-brand-secondary);
    margin-bottom: 10px;
}

.card-title {
    font-family: var(--font-title);
    font-size: 3.5rem;
    text-transform: uppercase;
    margin-bottom: 40px;
}

#secFaq {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.faq-item h3 {
    color: var(--color-brand-accent);
    font-family: var(--font-mono);
    margin-bottom: 8px;
}

.faq-item p,
.textoSort p {
    color: var(--color-brand-secondary);
    line-height: 1.5;
}

.hero-form,
.result-card {
    width: 45%;
    background-color: var(--color-bg-card);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid #333;
}

.textoSort {
    margin-bottom: 30px;
}

.textoSort h2 {
    font-family: var(--font-title);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.inputesSort {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 30px;
}

.secSortear2 {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.secSortear2 label {
    font-size: 0.9rem;
    color: var(--color-brand-secondary);
    margin-bottom: 8px;
}

.input-field {
    background-color: var(--color-bg-input);
    border: 1px solid #333;
    border-radius: 8px;
    color: white;
    font-size: 1.8rem;
    text-align: center;
    padding: 15px;
}

.input-field:focus {
    border-color: var(--color-brand-accent);
    outline: none;
}

.toggle-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.switch {
    position: relative;
    width: 40px;
    height: 22px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-track {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--color-brand-accent);
    border-radius: 20px;
    transition: 0.3s;
}

.switch-track::after {
    content: "";
    position: absolute;
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: 0.3s;
}

.switch input:checked+.switch-track::after {
    transform: translateX(18px);
}

.btn-primary {
    width: 100%;
    padding: 15px;
    background-color: #2a2834;
    color: white;
    border: none;
    border-radius: 8px;
    font-family: var(--font-title);
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.btn-primary:hover {
    background-color: #3b3849;
}

.box {
    margin-top: 15px;
    background-color: transparent;
    border: 1px solid #555;
}

.box:hover {
    background-color: #222;
}

.is-hidden {
    display: none;
}

.resultado-box {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    background-color: var(--color-bg-input);
    border-radius: 15px;
    padding: 20px;
}

#resultado {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.resultado-chip {
    background-color: #3b3849;
    color: white;
    font-size: 2.5rem;
    font-family: var(--font-title);
    font-weight: bold;
    width: 80px;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 20px;
    border: 2px solid var(--color-brand-accent);
}

.is-animating .resultado-chip {
    animation: rolar 0.8s ease-out both;
}

@keyframes rolar {
    0% {
        opacity: 0;
        transform: translateY(-50px) rotate(-180deg);
        background-color: var(--color-brand-accent);
        color: transparent;
    }

    50% {
        opacity: 1;
        transform: translateY(10px) rotate(20deg);
        background-color: var(--color-brand-accent);
        color: transparent;
    }

    100% {
        transform: translateY(0) rotate(0);
        background-color: #3b3849;
        color: white;
    }
}

@media (max-width: 900px) {
    .layout {
        flex-direction: column;
    }

    .hero-copy,
    .hero-form,
    .result-card {
        width: 100%;
    }

    .card-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 500px) {
    .inputesSort {
        flex-direction: column;
        gap: 10px;
    }

    .input-field {
        font-size: 1.2rem;
        padding: 10px;
    }

    .secSortear2 label {
        font-size: 0.85rem;
    }

    .resultado-chip {
        font-size: 2rem;
        width: 60px;
        height: 60px;
    }
}
