:root {
    --primary-yellow: #FFFF00;
    --light-yellow: #FFD700;
    --dark-yellow: #FF8C00;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --icon-dark: #000000;
}

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

body {
    background: #FFFF00;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 1rem;
    overflow-x: hidden;
    overflow-y: auto;
}

/* Removed unused .h1 .h2 .p selector */

.header {
    text-align: center;
    margin-bottom: 1rem;
}

.logo-container {
    max-width: 300px;
    max-height: 300px;
    background: var(--primary-yellow);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    margin: 0 auto 1.5rem;
}

.logo-container:hover {
    transform: translateY(-5px);
}

.logo-container img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 16px;
}

h1 {
    font-size: clamp(2rem, 8vw, 4rem);
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.countdown-container {
    background: var(--primary-yellow);
    border-radius: 24px;
    padding: 2rem;
    border: 3px solid var(--primary-yellow);
    max-width: 800px;
    width: 100%;
}

.countdown-header {
    text-align: center;
    margin-bottom: 1.5rem;
    font-family: "Open Sans", sans-serif;
    font-optical-sizing: auto;
    font-weight: 200;
    font-style: normal;
    font-variation-settings: "wdth" 100;
}

.countdown-footer {
    text-align: center;
    margin-top: 1.0rem;
}

.countdown-title {
    font-size: clamp(1.5rem, 5vw, 2rem);
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.target-date {
    color: var(--text-light);
    font-size: 1rem;
}

.countdown-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.countdown-item {
    background: none;
    border: 3px solid var(--icon-dark);
    padding: 1.5rem;
    border-radius: 16px;
    text-align: center;
    color: var(--icon-dark);
    box-shadow: 0 8px 20px rgba(251, 191, 36, 0.3);
    transition: transform 0.3s ease;
    overflow: hidden;
    position: relative;
}

.countdown-item:hover {
    transform: translateY(-3px);
}

.countdown-number-container {
    position: relative;
    height: 3rem;
    perspective: 1000px;
    overflow: hidden;
}

.countdown-number {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    backface-visibility: hidden;
    transform-style: preserve-3d;
}

.countdown-number.current {
    z-index: 2;
}

.countdown-number.next {
    z-index: 1;
    transform: rotateX(-90deg);
    transform-origin: center bottom;
}

.countdown-number.flip-out {
    animation: flipOut 0.6s ease-in-out forwards;
}

.countdown-number.flip-in {
    animation: flipIn 0.6s ease-in-out forwards;
}

@keyframes flipOut {
    to { transform: rotateX(90deg); }
}

@keyframes flipIn {
    from { transform: rotateX(-90deg); }
    to { transform: rotateX(0deg); }
}

.countdown-label {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.5rem;
    opacity: 0.9;
}

.expired-message {
    background: var(--primary-yellow);
    color: var(--text-dark);
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    border: 3px solid var(--icon-dark);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15),
    0 4px 15px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
}

.expired-message::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    right: 3px;
    bottom: 3px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 13px;
    pointer-events: none;
}

.expired-message h2 {
    margin-bottom: 1rem;
    font-size: 1.8rem;
    position: relative;
    z-index: 1;
}

.expired-message p {
    font-size: 1.2rem;
    line-height: 1.4;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    z-index: 1;
}

/* Desktop gear - inline with text */
.gear-icon-inline {
    width: 36px;
    height: 36px;
    fill: var(--text-dark);
    animation: spin 3s linear infinite;
    vertical-align: middle;
    margin-left: 8px;
    transform: translateY(-1px);
    display: inline-block;
}

/* Mobile gear - below text */
.gear-icon-mobile {
    width: 48px;
    height: 48px;
    fill: var(--text-dark);
    animation: spin 3s linear infinite;
    display: none; /* Hidden by default */
    margin-top: 15px;
}

.main-content-wrapper {
    width: 100%;
    max-width: 800px;
    margin-bottom: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer {
    text-align: center;
    color: var(--text-dark);
    font-size: 0.875rem;
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    background: var(--primary-yellow);
    padding: 1rem 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.footer-icons {
    display: flex;
    justify-content: center;
    color: var(--dark-yellow);
    gap: 2rem;
    margin-bottom: 0.5rem;
}

.footer-icon {
    width: 48px;
    height: 48px;
    background: var(--icon-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(255, 255, 0, 0.2);
}

.footer-icon:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(69, 69, 69, 10.0);
}

/* Removed unused ::before pseudo-element for footer-icon:hover */
/*
.footer-icon:hover::before {
    opacity: 1;
    transform: rotate(-45deg) translateY(100%);
}
*/

.footer-icon svg {
    width: 24px;
    height: 24px;
    fill: var(--primary-yellow);
}

.footer-text {
    font-size: 0.8rem;
    opacity: 0.8;
}

.pulse {
    animation: pulse 0.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Mobile breakpoint - 768px and below */
@media (max-width: 768px) {
    /* Hide inline gear on mobile */
    .gear-icon-inline {
        display: none;
    }

    /* Show mobile gear below text */
    .gear-icon-mobile {
        display: block;
        margin-top: 8px;
    }

    /* Adjust expired message layout for mobile */
    .expired-message p {
        display: block; /* Change from flex to block */
        text-align: center;
    }
    .expired-message {
        gap: 0.5rem; /* Reduced from 1rem */
    }

}

@media (max-width: 640px) {
    .logo-container {
        width: 120px;
        height: 120px;
        border-radius: 16px;
        margin-bottom: 0.5rem;
    }

    .countdown-container {
        padding: 1.5rem;
        border-radius: 20px;
    }

    .countdown-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .countdown-item {
        padding: 1rem;
        border-radius: 12px;
    }

    .countdown-number-container {
        height: 2.25rem;
    }

    .countdown-number {
        font-size: 1.75rem;
    }

    .countdown-label {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .footer-icons {
        gap: 1.5rem;
    }

    .footer-icon {
        width: 40px;
        height: 40px;
    }

    .footer-icon svg {
        width: 20px;
        height: 20px;
    }
    .footer {
        height: 70px;
    }
    .main-content-wrapper {
        margin-bottom: 70px;
    }

    .countdown-grid {
        gap: 0.75rem;
    }

    .countdown-item {
        padding: 0.75rem;
    }

    .countdown-number-container {
        height: 2rem;
    }

    .countdown-number {
        font-size: 1.5rem;
    }

    .countdown-label {
        font-size: 0.7rem;
    }

    .countdown-container {
        padding: 1rem;
    }

    .gear-icon-mobile {
        margin-top: 3px; /* Reduced to 3px for very small screens */
    }
}

@keyframes spin {
    from { transform: rotate(0deg) translateY(-1px); }
    to { transform: rotate(360deg) translateY(-1px); }
}
