body {
    font-family: Arial, Helvetica, sans-serif;
    background-image: url("https://images.unsplash.com/photo-1518770660439-4636190af475?auto=format&fit=crop&w=1600&q=80");
    background-size: cover;
    background-position: center;
    min-height: 100vh;
    margin: 0;
    color: #222;
}

.custom-nav {
    border-radius: 0;
    margin-bottom: 10px;
    background: rgba(17, 24, 39, 0.95);
    border: none;
}

.brand-logo {
    font-weight: 700;
    letter-spacing: 0.5px;
}

.heading {
    text-align: center;
    margin: 8px 0 4px;
}

.title-box {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 10px 16px;
    backdrop-filter: blur(6px);
}

.title-box h1 {
    margin: 0;
    color: #fff;
    font-size: 32px;
    font-weight: 800;
    letter-spacing: 0.8px;
}

.subtitle {
    margin: 4px 0 0;
    color: #f2f2f2;
    font-size: 15px;
    font-weight: 500;
}

.scoreboard-row {
    margin: 8px 0 14px;
}

.score-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 14px;
    padding: 12px 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    text-align: center;
    margin-bottom: 10px;
}

.best-card {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
}

.score-label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #444;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.score-value {
    display: block;
    font-size: 26px;
    font-weight: 800;
    color: #111827;
}

.game-wrap {
    padding: 0 15px;
}

.content {
    min-height: 560px;
    background: rgba(255, 240, 245, 0.95);
    border-radius: 16px;
    padding: 14px;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
}

.panel-box {
    padding-top: 8px;
}

.panel-title {
    text-align: center;
    font-size: 22px;
    font-weight: 800;
    margin-top: 6px;
    margin-bottom: 16px;
    color: #1f2937;
}

.game-btn {
    width: 85%;
    margin: 10px auto;
    display: block;
    border-radius: 12px;
    padding: 12px;
    font-size: 16px;
    font-weight: 700;
    border: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.game-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.16);
}

.tips-list {
    margin: 0;
    padding-left: 20px;
    font-size: 16px;
    line-height: 1.8;
    color: #374151;
}

.flip-card {
    width: 100%;
    min-height: 500px;
    perspective: 1000px;
    position: relative;
}

.flip-card-inner {
    width: 100%;
    min-height: 500px;
}

.flip-card-inner2 {
    position: relative;
    width: 25%;
    height: 125px;
    float: left;
    padding: 6px;
    transform-style: preserve-3d;
    transition: transform 0.5s ease;
    cursor: pointer;
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    top: 6px;
    left: 6px;
    width: calc(100% - 12px);
    height: calc(100% - 12px);
    border-radius: 12px;
    overflow: hidden;
    backface-visibility: hidden;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.16);
}

.flip-card-front {
    background: linear-gradient(135deg, #1d4ed8, #7c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
}

.flip-card-back {
    transform: rotateY(180deg);
    background: #fff;
}

.rollover {
    transform: rotateY(180deg);
}

.done {
    transform: rotateY(180deg);
    opacity: 1;
    pointer-events: none;
    box-shadow: 0 0 14px rgba(34, 197, 94, 0.85);
}

img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.overLay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(17, 24, 39, 0.78);
    z-index: 10;
    border-radius: 14px;
}

#timer {
    position: absolute;
    font-size: 88px;
    color: white;
    text-align: center;
    width: 100%;
    top: 38%;
    font-weight: 800;
    text-shadow: 0 0 18px rgba(255,255,255,0.35);
}

.footer {
    background: rgba(17, 24, 39, 0.96);
    color: white;
    padding: 14px 10px;
    margin-top: 16px;
}

.footer-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    text-align: center;
}

.footer h6 {
    margin: 8px 0;
    font-size: 14px;
}

.social-wrap {
    text-align: center;
}

.icon {
    display: inline-block;
    color: white;
    font-size: 22px;
    margin: 0 8px;
    transition: transform 0.2s ease, color 0.2s ease;
}

.icon:hover {
    color: #60a5fa;
    transform: scale(1.15);
    text-decoration: none;
}

.popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.popup-overlay.show {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.popup-box {
    background: #fff;
    width: 90%;
    max-width: 420px;
    border-radius: 18px;
    padding: 28px 22px;
    text-align: center;
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28);
    animation: popUp 0.35s ease;
}

.popup-icon {
    font-size: 52px;
    margin-bottom: 8px;
}

.popup-box h2 {
    margin-top: 0;
    margin-bottom: 10px;
    font-weight: 800;
}

.popup-box p {
    font-size: 18px;
    margin-bottom: 18px;
}

.popup-btn {
    width: 70%;
    border-radius: 12px;
    font-weight: 700;
}

@keyframes popUp {
    0% {
        transform: scale(0.75);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

@media (max-width: 991px) {
    .content {
        min-height: auto;
    }

    .panel-box {
        margin-bottom: 15px;
    }
}

@media (max-width: 768px) {
    .title-box h1 {
        font-size: 26px;
    }

    .score-value {
        font-size: 22px;
    }

    .flip-card-inner2 {
        width: 25%;
        height: 110px;
    }

    #timer {
        font-size: 74px;
    }
}

@media (max-width: 480px) {
    .flip-card-inner2 {
        width: 50%;
        height: 100px;
    }

    .title-box h1 {
        font-size: 22px;
    }

    .subtitle {
        font-size: 13px;
    }

    #timer {
        font-size: 58px;
    }

    .game-btn {
        width: 92%;
    }
}