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

@keyframes glow {
    0% { text-shadow: 0 0 10px rgba(0, 255, 255, 0.5); }
    50% { text-shadow: 0 0 20px rgba(0, 255, 255, 0.8), 0 0 30px rgba(0, 255, 255, 0.6); }
    100% { text-shadow: 0 0 10px rgba(0, 255, 255, 0.5); }
}

body {
    font-family: 'Courier New', monospace;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #000;
    color: #fff;
    position: relative;
}

#matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.container {
    text-align: center;
    z-index: 1;
    padding: 2rem;
    width: 100%;
    max-width: 1200px;
    position: relative;
}

h1 {
    font-size: 3rem;
    margin-bottom: 3rem;
    color: #0ff;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.countdown {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin: 2rem 0;
}

.farewell-text {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.5rem;
    margin: 2rem 0;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 1rem;
    border-radius: 8px;
    border: 2px solid rgba(255, 0, 255, 0.3);
    background: rgba(0, 0, 0, 0.7);
    background-image: linear-gradient(45deg, #ff00ff, #00ffff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 10px rgba(255, 0, 255, 0.5);
    animation: glow 2s ease-in-out infinite;
}

.time-section {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.flip-clock {
    display: inline-block;
}

.digit-group {
    display: flex;
    gap: 4px;
    margin-bottom: 1rem;
}

.flip-card {
    width: 60px;
    height: 90px;
    position: relative;
    margin: 0 2px;
    background: transparent;
    perspective: 1000px;
}

.card {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.7s cubic-bezier(0.4, 0.0, 0.2, 1);
    transform-origin: 50% 50%;
}

.card.flip {
    transform: rotateX(-180deg);
}

.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
    font-weight: bold;
    color: #0ff;
    background: rgba(34, 34, 34, 0.9);
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
}

.card-face::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    background: rgba(0, 255, 255, 0.1);
    top: 50%;
    left: 0;
}

.card-face-front {
    transform: rotateX(0);
    background: linear-gradient(180deg, rgba(42, 42, 42, 0.9) 0%, rgba(34, 34, 34, 0.9) 50%, rgba(26, 26, 26, 0.9) 100%);
}

.card-face-back {
    transform: rotateX(180deg);
    background: linear-gradient(180deg, rgba(26, 26, 26, 0.9) 0%, rgba(34, 34, 34, 0.9) 50%, rgba(42, 42, 42, 0.9) 100%);
}

.label {
    font-size: 1.2rem;
    color: #0ff;
    letter-spacing: 2px;
    margin-top: 0.5rem;
    text-transform: uppercase;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
}

.quote-container {
    max-width: 800px;
    margin: 3rem auto 0;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 10px;
    border: 1px solid rgba(0, 255, 255, 0.1);
}

blockquote {
    font-size: 1.5rem;
    font-style: italic;
    margin-bottom: 1rem;
    color: #fff;
}

cite {
    font-size: 1.2rem;
    color: #0ff;
}

.refresh-button {
    display: block;
    margin: 2rem auto 0;
    padding: 0.8rem 1.5rem;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.9rem;
    background: rgba(0, 0, 0, 0.7);
    color: #0ff;
    border: 2px solid #0ff;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
}

.refresh-button:hover {
    background: rgba(0, 255, 255, 0.1);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.4);
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.8);
    transform: scale(1.05);
}

@media (max-width: 768px) {
    body {
        height: auto;
        min-height: 100vh;
        padding: 2rem 0;
    }

    .container {
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
    }

    h1 {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

    .countdown {
        gap: 1rem;
    }

    .flip-card {
        width: 40px;
        height: 60px;
    }

    .card-face {
        font-size: 30px;
    }

    .label {
        font-size: 0.9rem;
    }

    .farewell-text {
        font-size: 1rem;
        margin: 1.5rem 0;
        padding: 0.75rem;
    }

    .quote-container {
        padding: 1rem;
        margin-top: 2rem;
    }

    blockquote {
        font-size: 1.2rem;
    }

    cite {
        font-size: 1rem;
    }

    .refresh-button {
        margin-bottom: 2rem;
    }
}