/* Modern CSS Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* Color Palette */
    --primary-color: #192231;
    --secondary-color: #404a42;
    --tertiary-color: #c0b283;
    --text-color: #ffffff;
    --bg-color: #1a1a1a;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    
    /* Typography */
    --font-family: 'Figtree', sans-serif;
    --timer-font-size: 4rem;
    --btn-font-size: 1rem;
    
    /* Spacing */
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 2rem;
}

html, body {
    height: 100%;
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
}

body {
    display: flex;
    flex-direction: column;
}

/* Layout */
.container {
    display: flex;
    flex: 1;
    width: 100%;
    height: 100%;
}

.block {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg);
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Block Colors */
.block:nth-child(1) { background: linear-gradient(135deg, var(--primary-color), #04b0b8); }
.block:nth-child(2) { background: linear-gradient(135deg, var(--secondary-color), #d91e56); }
.block:nth-child(3) { background: linear-gradient(135deg, var(--tertiary-color), #28a426); }

/* Timer Display */
.timer {
    font-size: var(--timer-font-size);
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    z-index: 2;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    font-variant-numeric: tabular-nums;
}

/* Controls */
button {
    font-family: var(--font-family);
    font-size: var(--btn-font-size);
    font-weight: 600;
    padding: 1rem 2rem;
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    z-index: 2;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    text-transform: uppercase;
    letter-spacing: 1px;
}

button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    background: #ffffff;
}

button:active:not(:disabled) {
    transform: translateY(0);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.5);
    transform: none;
    box-shadow: none;
}

/* Status Text */
.status {
    margin-top: var(--spacing-md);
    font-size: 1.2rem;
    font-weight: 500;
    z-index: 2;
    min-height: 1.5em;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* Wave Animation */
.wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.3" d="M0,320L48,314.7C96,309,192,299,288,288C384,277,480,267,576,245.3C672,224,768,192,864,197.3C960,203,1056,245,1152,250.7C1248,256,1344,224,1392,208L1440,192L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom center;
    background-size: cover;
    transition: height 1s linear;
    z-index: 1;
    pointer-events: none;
}

/* Footer */
footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    text-align: center;
    padding: 1.5rem 0;
    background: linear-gradient(to top, rgba(0,0,0,0.5), transparent);
    font-size: 0.9rem;
    color: white;
    z-index: 10;
    pointer-events: none; /* Let clicks pass through to blocks if needed, but links need pointer-events: auto */
}

footer span, footer a {
    pointer-events: auto;
}

footer .transparent {
    opacity: 0.8;
}

footer .neon {
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    transition: text-shadow 0.3s ease;
}

footer .neon:hover {
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8), 0 0 20px rgba(255, 255, 255, 0.4);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .block {
        min-height: 33.33vh;
        padding: var(--spacing-md);
    }

    .timer {
        font-size: 3rem;
    }

    button {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
    
    footer {
        display: none;
    }
}
