/* Reset y configuración base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #000f04, #03300a);
    min-height: 100vh;
    color: white;
}

/* Animación de fondo */
.bg-animation {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image:
        radial-gradient(circle, rgba(255, 255, 255, 0.07) 1px, transparent 1px),
        radial-gradient(circle, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        radial-gradient(circle, rgba(255, 255, 255, 0.03) 2px, transparent 2px);
    background-size: 40px 40px, 80px 80px, 130px 130px;
    background-position: 0 0, 20px 20px, 60px 60px;
    animation: bgDrift 40s linear infinite;
}

@keyframes bgDrift {
    from { background-position: 0 0, 20px 20px, 60px 60px; }
    to   { background-position: 40px 40px, 60px 60px, 190px 190px; }
}

/* Franja superior con logo */
.top-bar {
    background: linear-gradient(135deg, #01092e, #071659);
    padding: 0 20px;
    text-align: center;
    height: 100px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.top-bar-logo {
    height: 150px;
    width: auto;
    display: inline-block;
    margin-top: 20px;
}

/* Header y banner */
.header {
    /* REEMPLAZAR CON URL DE IMAGEN: background-image: url('TU_URL_AQUI'); */
    background: linear-gradient(135deg, #1a0a00, #3d1a00);
    background-size: cover;
    background-position: center;
    padding: 20px 0;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="30" r="1.5" fill="rgba(255,255,255,0.1)"/><circle cx="60" cy="70" r="1" fill="rgba(255,255,255,0.1)"/></svg>');
    animation: float 20s infinite linear;
}

@keyframes float {
    0% {
        transform: translateX(-100px);
    }

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

.banner {
    background: linear-gradient(45deg, #b09f77, #6c5f43);
    color: white;
    text-align: center;
    padding: 15px;
    margin: 20px auto;
    max-width: 600px;
    border-radius: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    transform: rotate(-2deg);
    border-style: double;
}

.banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(45deg,
            transparent,
            transparent 10px,
            rgba(255, 255, 255, 0.1) 10px,
            rgba(255, 255, 255, 0.1) 20px);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% {
        transform: translateX(-100%);
    }

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

.banner h1 {
    font-size: 2.5rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 2;
}

.banner .subtitle {
    font-size: 1.2rem;
    margin-top: 10px;
    position: relative;
    z-index: 2;
}

/* Container principal */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

p span {
    color: #ffd700;
    font-weight: 600;
}

/* Imagen sobre el formulario */
.banner-top {
    text-align: center;
    padding: 10px 0 30px 0;
}

.banner-top img {
    border-radius: 20px;
    display: block;
    margin: 0 auto;
}

/* Formulario */
.prediction-form {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    color: #333;
    backdrop-filter: blur(10px);
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #2c3e50;
    font-size: 1.1rem;
}

.form-control {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.3);
    transform: translateY(-2px);
}

/* Estilos específicos para los selectores de caballos */
.horse-select {
    background: white;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23666" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
}

.horse-select:focus {
    border-color: #8B4513;
    box-shadow: 0 0 10px rgba(139, 69, 19, 0.3);
}

.horse-select option {
    padding: 10px;
    font-size: 1rem;
}

/* Botón de envío */
.submit-btn {
    background: linear-gradient(135deg, #ff6b35, #f7941d);
    color: white;
    border: none;
    padding: 18px 40px;
    font-size: 1.3rem;
    font-weight: bold;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 30px;
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4);
    position: relative;
    overflow: hidden;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(255, 107, 53, 0.6);
}

/* Stats */
.stats-banner {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 40px;
    margin: 30px 0;
    text-align: center;
    backdrop-filter: blur(10px);
}

.stats-banner h3 {
    margin-bottom: 10px;
    color: #ffd700;
}

/* Mensaje de error para selección duplicada */
.duplicate-error {
    border-color: #e74c3c !important;
    box-shadow: 0 0 10px rgba(231, 76, 60, 0.3) !important;
}

/* Contador regresivo */
#countdown-banner {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 16px;
    padding: 24px 20px 20px;
    margin-bottom: 30px;
    text-align: center;
    backdrop-filter: blur(10px);
}

#countdown-label {
    display: block;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: 14px;
    opacity: 0.9;
}

#countdown-timer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.cd-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 64px;
}

.cd-block span {
    font-family: 'Anton', sans-serif;
    font-size: 2.6rem;
    color: #ffd700;
    line-height: 1;
}

.cd-block small {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 4px;
}

.cd-sep {
    font-size: 2.2rem;
    font-weight: bold;
    color: #ffd700;
    opacity: 0.5;
    line-height: 1;
    margin-bottom: 18px;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .banner h1 {
        font-size: 2rem;
    }

    .prediction-form {
        padding: 25px;
    }
}