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

body {
    font-family: 'Arial', sans-serif;
    height: 100vh;
    overflow: hidden;
    background: #0a0a0a;
    color: white;
}

/* Fondo dinámico */
.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* Gradiente animado */
.animated-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        45deg,
        #ff006e,
        #8338ec,
        #3a86ff,
        #06ffa5,
        #ffbe0b,
        #fb5607
    );
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
    opacity: 0.3;
}

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

/* Partículas flotantes */
.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.particles::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #fff, transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 90px 40px, #fff, transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.6), transparent),
        radial-gradient(2px 2px at 160px 30px, #fff, transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
    animation: particlesFloat 20s linear infinite;
}

@keyframes particlesFloat {
    0% { transform: translateY(100vh) rotate(0deg); }
    100% { transform: translateY(-100vh) rotate(360deg); }
}

/* Líneas de cuadrícula */
.grid-lines {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255,255,255,0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 15s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* Contenido principal */
.main-content {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    position: relative;
    z-index: 1;
}

.counter-container {
    text-align: center;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    padding: 60px 80px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    animation: containerPulse 3s ease-in-out infinite;
}

@keyframes containerPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.counter-title {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 30px;
    background: linear-gradient(45deg, #ff006e, #8338ec, #3a86ff);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
    animation: titleGlow 2s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    0% { filter: brightness(1); }
    100% { filter: brightness(1.2); }
}

.counter-display {
    font-size: 8rem;
    font-weight: bold;
    margin: 40px 0;
    color: #fff;
    text-shadow: 
        0 0 20px rgba(255, 255, 255, 0.8),
        0 0 40px rgba(51, 136, 255, 0.6),
        0 0 60px rgba(131, 56, 236, 0.4);
    transition: all 0.3s ease;
    min-width: 300px;
}

.counter-display.animate {
    transform: scale(1.1);
    text-shadow: 
        0 0 30px rgba(255, 255, 255, 1),
        0 0 60px rgba(51, 136, 255, 0.8),
        0 0 90px rgba(131, 56, 236, 0.6);
}

.counter-controls {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
}

.btn {
    padding: 15px 30px;
    font-size: 1.5rem;
    font-weight: bold;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(45deg, #333, #555);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    min-width: 80px;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.btn-increase {
    background: linear-gradient(45deg, #06ffa5, #00d4aa);
}

.btn-increase:hover {
    background: linear-gradient(45deg, #00d4aa, #06ffa5);
    box-shadow: 0 10px 20px rgba(6, 255, 165, 0.4);
}

.btn-decrease {
    background: linear-gradient(45deg, #ff006e, #d90368);
}

.btn-decrease:hover {
    background: linear-gradient(45deg, #d90368, #ff006e);
    box-shadow: 0 10px 20px rgba(255, 0, 110, 0.4);
}

.btn-reset {
    background: linear-gradient(45deg, #8338ec, #6f2dbd);
}

.btn-reset:hover {
    background: linear-gradient(45deg, #6f2dbd, #8338ec);
    box-shadow: 0 10px 20px rgba(131, 56, 236, 0.4);
}

.btn:active {
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .counter-container {
        padding: 40px 30px;
        margin: 20px;
    }
    
    .counter-title {
        font-size: 2rem;
    }
    
    .counter-display {
        font-size: 5rem;
        min-width: 200px;
    }
    
    .counter-controls {
        flex-direction: column;
        gap: 15px;
    }
    
    .btn {
        padding: 12px 25px;
        font-size: 1.2rem;
    }
}