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

body {
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(135deg, #1a2a6c, #b21f1f, #fdbb2d);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
}

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

.container {
    width: 100%;
    max-width: 1200px;
    padding: 20px;
}

.counter-wrapper {
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.counter {
    font-size: 5rem;
    font-weight: 700;
    margin: 30px 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    min-height: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.digits-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.digit-box {
    position: relative;
    width: 4rem;
    height: 6rem;
    margin: 0 0.3rem;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.digit {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 4rem;
    font-weight: bold;
    color: white;
    transform: translateY(0);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.digit.old {
    animation: slideUp 0.5s forwards;
}

.digit.new {
    transform: translateY(100%);
    animation: slideIn 0.5s forwards;
}

@keyframes slideUp {
    from { transform: translateY(0); }
    to { transform: translateY(-100%); }
}

@keyframes slideIn {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.last-updated {
    font-size: 0.9rem;
    opacity: 0.7;
    font-style: italic;
    margin-bottom: 10px;
}

.status-message {
    font-size: 0.9rem;
    color: #ffcc00;
    min-height: 20px;
    margin-top: 10px;
}

/* Footer removed as requested */

.error {
    color: #ff6b6b;
    font-weight: bold;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive styles */
@media (max-width: 768px) {
    .counter-wrapper {
        padding: 30px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .counter {
        font-size: 3.5rem;
        min-height: 90px;
    }
    
    .digit-box {
        width: 3rem;
        height: 4.5rem;
        margin: 0 0.2rem;
        border-radius: 8px;
    }
    
    .digit {
        font-size: 3rem;
    }
}

@media (max-width: 480px) {
    .counter-wrapper {
        padding: 20px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .counter {
        font-size: 2.5rem;
        min-height: 70px;
    }
    
    .digit-box {
        width: 2.5rem;
        height: 3.7rem;
        margin: 0 0.15rem;
        border-radius: 6px;
        box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
    }
    
    .digit {
        font-size: 2.2rem;
    }
}

@media (max-width: 360px) {
    .digit-box {
        width: 1.5rem;
        height: 2.3rem;
        margin: 0 0.1rem;
        border-radius: 4px;
    }
    
    .digit {
        font-size: 1.4rem;
    }
}

/* For tablets in portrait mode */
@media (min-width: 768px) and (max-width: 1024px) {
    .digit-box {
        width: 3.5rem;
        height: 5rem;
        margin: 0 0.25rem;
    }
    
    .digit {
        font-size: 3.2rem;
    }
}

/* For kiosk/large screens */
@media (min-width: 1600px) {
    .counter-wrapper {
        padding: 60px;
    }
    
    h1 {
        font-size: 3.5rem;
    }
    
    .counter {
        font-size: 7rem;
        min-height: 160px;
    }
    
    .digit-box {
        width: 5.5rem;
        height: 8rem;
        margin: 0 0.4rem;
        border-radius: 12px;
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    }
    
    .digit {
        font-size: 5.5rem;
    }
}
