:root {
    --as-red: #b3302a;
    --as-red-dark: #8f2420;
    --as-green: #1e7a4c;
    --as-gold: #f5b942;
    --as-cream: #fff8ee;
    --as-ink: #2b2b2b;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: var(--as-ink);
    background:
        radial-gradient(circle at 10% 0%, rgba(245, 185, 66, 0.18), transparent 40%),
        radial-gradient(circle at 90% 10%, rgba(30, 122, 76, 0.12), transparent 40%),
        var(--as-cream);
}

main {
    flex: 1 0 auto;
}

/* Encabezado y pie */
.app-header {
    background: #ffffff;
    border-bottom: 3px solid var(--as-gold);
}

.app-brand {
    color: var(--as-red);
    font-weight: 700;
    font-size: 1.25rem;
}

.app-footer {
    color: #6c6c6c;
}

/* Tarjetas y botones */
.card {
    border: 0;
    border-radius: 1.25rem;
}

.btn {
    border-radius: 999px;
}

.btn-festive {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--as-red);
    --bs-btn-border-color: var(--as-red);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--as-red-dark);
    --bs-btn-hover-border-color: var(--as-red-dark);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--as-red-dark);
    --bs-btn-active-border-color: var(--as-red-dark);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: #c98a87;
    --bs-btn-disabled-border-color: #c98a87;
}

.form-control,
.form-check-input {
    border-radius: 0.75rem;
}

.form-check-input {
    border-radius: 0.35rem;
}

.form-check-input:checked {
    background-color: var(--as-green);
    border-color: var(--as-green);
}

/* Inicio */
.hero {
    padding: 3rem 1rem;
    background: #ffffff;
    border-radius: 1.5rem;
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.06);
}

.hero-emoji {
    font-size: 4rem;
    line-height: 1;
    margin-bottom: 0.75rem;
}

.hero-text {
    max-width: 38rem;
}

.feature-emoji {
    font-size: 2.5rem;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.feature-card {
    box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.05);
}

/* Indicador de pasos */
.step-indicator {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0 auto 1.5rem;
    max-width: 40rem;
}

.step-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    color: #8a8a8a;
    font-size: 0.85rem;
}

.step-item::before {
    content: '';
    position: absolute;
    top: 1rem;
    left: -50%;
    width: 100%;
    height: 3px;
    background: #ddd;
    z-index: 0;
}

.step-item:first-child::before {
    display: none;
}

.step-item.is-done::before,
.step-item.is-current::before {
    background: var(--as-green);
}

.step-number {
    position: relative;
    z-index: 1;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e6e6e6;
    color: #666;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.step-item.is-done .step-number {
    background: var(--as-green);
    color: #fff;
}

.step-item.is-current .step-number {
    background: var(--as-red);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(179, 48, 42, 0.2);
}

.step-item.is-current {
    color: var(--as-red);
    font-weight: 600;
}

@media (max-width: 575.98px) {
    .step-item:not(.is-current) .step-label {
        display: none;
    }
}

/* Código de verificación */
.code-input {
    text-align: center;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 2rem;
    letter-spacing: 0.6em;
    padding-left: 0.6em;
}

/* Lista de identificación */
.identity-list .list-group-item {
    font-size: 1.1rem;
    padding: 0.9rem 1.1rem;
    border-radius: 0.75rem !important;
    margin-bottom: 0.5rem;
    border: 1px solid #eadfcf;
}

.identity-list .list-group-item:hover {
    background: #fff1d6;
    border-color: var(--as-gold);
}

/* Matriz de exclusiones */
.matrix-wrapper {
    max-height: 70vh;
}

.matrix-table {
    min-width: 32rem;
}

.matrix-table th,
.matrix-table td {
    vertical-align: middle;
}

.matrix-col-head {
    min-width: 5.5rem;
    max-width: 8rem;
    font-size: 0.85rem;
    word-break: break-word;
}

.matrix-sticky {
    position: sticky;
    left: 0;
    z-index: 1;
    background: #ffffff;
    min-width: 8rem;
    box-shadow: 2px 0 0 rgba(0, 0, 0, 0.06);
}

.matrix-self {
    background: #f1f1f1;
    color: #aaa;
}

.matrix-checkbox {
    width: 1.35rem;
    height: 1.35rem;
    cursor: pointer;
}

/* Revelación del amigo secreto */
.friend-name {
    font-size: clamp(2rem, 8vw, 3.25rem);
    font-weight: 800;
    color: var(--as-red);
    margin: 1rem 0 1.5rem;
    word-break: break-word;
    animation: friend-pop 0.7s ease-out both;
}

@keyframes friend-pop {
    0% {
        opacity: 0;
        transform: scale(0.6);
    }
    70% {
        transform: scale(1.08);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .friend-name {
        animation: none;
    }
}
