
/* ================================
   RESET
================================ */

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


/* ================================
   PAGE
================================ */

html {
    scroll-behavior: smooth;
    scroll-padding-top: 24px;
}

body {
    min-height: 100vh;
    background: #fff;
    color: #000;
    font-family: Georgia, "Times New Roman", serif;
}

a {
    color: #000;
    text-decoration: none;
}


/* ================================
   MAIN CONTAINER
================================ */

.container {
    width: min(800px, 90%);
    margin: 0 auto;
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}


/* ================================
   LOGO
================================ */

.logo {
    display: flex;
     flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-bottom: 40px;
}



.logo img {
    display: block;
    width: 280px;
    max-width: 100%;
    height: auto;
}
h4 {
    font-size: 20px;
    font-weight: 400;
    margin-top: 10px 0;
    
}

/* ================================
   GAME LINKS GRID
================================ */

.game-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px;
    width: 100%;
}


/* ================================
   GAME CARDS
================================ */

.game__link {
    display: flex;
    flex-direction: column;
    align-items: stretch;

    min-width: 0;
    min-height: 230px;
    padding: 25px 26px;

    border: 2px solid #000;
    border-radius: 10px;

    color: #000;
    text-decoration: none;

    box-shadow: 6px 6px 0 #000;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}

/* Keep each game's pastel identity */

.game__link:nth-child(1) {
    background-color: #eae8fe;
}

.game__link:nth-child(2) {
    background-color: #fff2bc;
}

.game__link:nth-child(3) {
    background-color: #cfdef6;
}

.game__link:nth-child(4) {
    background-color: #fde3f7;
}


/* ================================
   GAME CARD INTERACTIONS
================================ */

/* Mouse hover */

.game__link:hover {
    transform: translate(-2px, -2px);
    box-shadow: 8px 8px 0 #000;
}

/* Slightly soften the colour without losing
   the identity of each card */

.game__link:nth-child(1):hover {
    background-color: #fff;
}

.game__link:nth-child(2):hover {
   background-color: #fff;
}

.game__link:nth-child(3):hover {
  background-color: #fff;
}

.game__link:nth-child(4):hover {
    background-color: #fff;
}

/* Keyboard accessibility */

.game__link:focus-visible {
    outline: 3px solid #6b5bd2;
    outline-offset: 5px;
    box-shadow: 8px 8px 0 #000;
}

/* Press feedback */

.game__link:active {
    transform: translate(3px, 3px);
    box-shadow: 3px 3px 0 #000;
}


/* ================================
   GAME ICONS
================================ */

.game__icon {
    display: block;

    width: 100px;
    height: 70px;

    margin: 0 auto;
    object-fit: contain;
    flex-shrink: 0;
}


/* ================================
   TITLES
================================ */

.title-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;

    margin-bottom: 10px;
    text-align: center;
}

.game__link h2 {
    display: inline-block;
    font-size: 29px;
    line-height: 1.15;
    font-weight: 700;
}


/* ================================
   DESCRIPTIONS
================================ */

.game__link p {
    max-width: 450px;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 500;
}


/* ================================
   FOOTER
================================ */

.site-footer {
    width: 100%;
    margin-top: 58px;
    padding: 38px 20px 24px;

    background: #fff;
    text-align: center;
}

.footer-content {
    width: min(800px, 100%);
    margin: 0 auto;

    display: flex;
    flex-direction: column;
    align-items: center;
}


/* Footer heading */

.footer-title {
    margin-bottom: 12px;

    font-size: 28px;
    line-height: 1.2;
    font-weight: 700;
}


/* Footer description */

.footer-description {
    max-width: 480px;
    margin-bottom: 24px;

    color: #444;
    font-size: 17px;
    line-height: 1.6;
}


/* Footer navigation */

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.footer-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 5px 15px;
    border: 1px solid #000;
    border-radius: 8px;
    background: #ffcbcb;
    color: #111;
     box-shadow: 4px 4px 0 #000;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.3;

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

/* Keyboard accessibility */

.footer-link :focus-visible {
    outline: 3px solid #6b5bd2;
    outline-offset: 5px;
    box-shadow: 5px 5px 0 #000;
}

/* Press feedback */

.footer-link:active {
    transform: translate(2px, 2px);
    box-shadow: 5px 5px 0 #000;
}

.footer-link:hover {
    background: #fff;
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 #000;
}

.footer-link:focus-visible {
    outline: 2px solid #7c6ce8;
    outline-offset: 4px;
}

.footer-link:active {
    transform: translateY(0);
}


/* Footer bottom */

.footer-bottom {
    width: 100%;
    padding-top: 20px;
    border-top: 1px solid #e8e8e8;
}

.footer-tagline {
    margin-bottom: 10px;

    color: #555;
    font-size: 15px;
    line-height: 1.6;
}

.footer-copyright {
    color: #999;
    font-size: 13px;
    line-height: 1.5;
}


/* ================================
   MOBILE AND TABLET
================================ */

@media (max-width: 700px) {

    .container {
        width: min(480px, 90%);
        padding-top: 35px;
    }

    .logo {
        margin-bottom: 35px;
    }

    .logo img {
        width: 240px;
    }

    .game-links {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .game__link {
        min-height: 0;
        padding: 24px;
    }

    .game__icon {
        width: 95px;
        height: 68px;
    }

    .title-row {
        gap: 9px;
        margin-bottom: 12px;
    }

    .game__link h2 {
        font-size: 26px;
    }

    .game__link p {
        font-size: 17px;
        line-height: 1.45;
    }

    .site-footer {
        margin-top: 42px;
        padding: 30px 20px 22px;
    }

    .footer-title {
        font-size: 24px;
    }

    .footer-description {
        max-width: 360px;
        margin-bottom: 20px;
        font-size: 15px;
        line-height: 1.55;
    }

    .footer-links {
        gap: 8px;
        margin-bottom: 25px;
    }

    .footer-link {
        padding: 9px 12px;
        font-size: 14px;
    }

    .footer-bottom {
        padding-top: 18px;
    }

    .footer-tagline {
        font-size: 13px;
    }

    .footer-copyright {
        font-size: 12px;
    }
}


/* ================================
   SMALL MOBILE SCREENS
================================ */

@media (max-width: 380px) {

    .container {
        width: 88%;
        padding-top: 25px;
    }

    .logo img {
        width: 210px;
    }

    .game__link {
        padding: 20px;
    }

    .game__link h2 {
        font-size: 24px;
    }

    .game__link p {
        font-size: 16px;
    }

    .footer-links {
        gap: 8px;
    }

    .footer-link {
        padding: 8px 10px;
        font-size: 13px;
    }
}


/* ================================
   REDUCED MOTION ACCESSIBILITY
================================ */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    .game__link,
    .footer-link {
        transition: none;
    }

    .game__link:hover,
    .game__link:active,
    .footer-link:hover,
    .footer-link:active {
        transform: none;
    }
}

/* ================================
   MEMORY CODE DAILY COUNTDOWN
================================ */

.memory-code-card {
    gap: 0;
}

.daily-countdown {
    margin-top: 20px;
    width: 100%;
}

.daily-countdown-heading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: Arial, sans-serif;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 1.8px;
    color: #444;
}

.live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #000000;
    flex-shrink: 0;
}

.countdown-timer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-family: Arial, sans-serif;
    font-variant-numeric: tabular-nums;
    border: 1px solid #000;
    padding: 8px;
    border-radius: 100px;
}

.countdown-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0px;
}

.countdown-unit span {
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.5px;
}



.countdown-colon {
    align-self: center;
    font-family: Arial, sans-serif;
    font-size: 10px;
    font-weight: 700;
}

.countdown-date {
    margin-top: 8px;
    text-align: center;
    font-family: Arial, sans-serif;
    font-size: 12px !important;
    line-height: 1.2;
    
}

/* Keep the countdown compact on small screens */

@media (max-width: 700px) {
    .daily-countdown {
        margin-top: 20px;
        padding-top: 15px;
    }

    .countdown-unit span {
        font-size: 10px;
    }

    .countdown-timer {
        gap: 14px;
    }
}

/* Respect reduced-motion preferences */

@media (prefers-reduced-motion: reduce) {
    .live-dot {
        animation: none;
    }
}