.game-body {
    background: linear-gradient(135deg, #fdf4f6, #fbe9ec);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.game-page-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 71px);
    padding: 20px;
    position: relative;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

.stars {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    display: block;
    background: transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAMAAAANIilAAAAAYFBMVEUAAAD/zyL/0if/zyL/zyL/zyL/zyL/zyL/zyL/zyL/zyL/zyL/zyL/zyL/zyL/zyL/zyL/zyL/zyL/zyL/zyL/zyL/zyL/zyL/zyL/zyL/zyL/zyL/zyL/zyL5qNuqAAAAH3RSTlMAoAW23hIQ43h2yP/j/O+p3vD+2/P6//f1+vvLdAftjwAAAbpJREFUSMe1l4miwyAMS2g6s3aMtm21//+5bIWQ2Q3Tw3BfX3ZsoPD0D1P2QvwEF4qP8KigfS2d2DkY+VwsAjfFw8sAFj/9TIAnF75W2o1TfPcNXFcT7Tj4sP/yCcsx2sU405R74fHH1Ld635oN4Pzz/Tkm2R+O+KPwFk5MZBTSJ2yHl4u7MAuKFbEUDIY2fA3GFc9sxIAnDWtCUNhRwW4EptpNb3NcoOE2EFYp624MPC4sUIgdToQYxVTBMPw2MAnHcaN/K4g8v0vMUCS4b3hHwGOG9GQt0jFm0LHMx+Lgb0DnhR4C7rCDBXQuXND4vE5GgsQL4gKa95XW00A4A0Bq3gAs0UqA/ZhbVIBdASs3gL8g1sYgFkF1gBtApmAS2PUDsPBoBoJMgV0Vch2w34iAEOB1F7xgGkAPD8HMAOD3A+AnABTwBdoHKEuGAYgv8l8uAAD8H8LzQfIAGYAOwAUIBzAoZwF4G2oTUAyAOfhAagArA+I4BNIBHIDAACgM7BLaD4D7+BvEEwG1tB7n9fA+5AEAgGwB4KNc9wMIOAE3B1y4ADiBwzT/Bz+TDuQ+tVx34ABwB4qLIA/AfxH5B/8yEa9nAAAAAElFTkSuQmCC) repeat top center;
    animation: move-twinkle-back 200s linear infinite;
}

@keyframes move-twinkle-back {
    from { background-position: 0 0; }
    to { background-position: -10000px 5000px; }
}

.game-container {
    position: relative;
    z-index: 1;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    padding: clamp(20px, 5vw, 30px);
    border-radius: 30px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.95);
    width: 100%;
    max-width: 600px;
    transition: transform 0.3s ease;
    box-sizing: border-box;
}

.game-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.game-container h1 {
    font-family: var(--heading-font);
    color: var(--pink-deep);
    font-size: clamp(2.5rem, 8vw, 3rem);
    margin-bottom: 20px;
    text-shadow: 0 0 8px #fff, 0 0 18px var(--pink-accent);
}

.game-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 240, 245, 0.7);
    border-radius: 15px;
    border: 2px solid var(--border-light);
}

.stat {
    text-align: center;
}

.stat-label {
    display: block;
    font-weight: 700;
    color: var(--primary-text);
    font-size: 0.9em;
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    font-size: 1.4em;
    font-weight: 700;
    color: var(--pink-deep);
}

.memory-board {
    display: grid;
    gap: 10px;
    margin: 20px auto;
    justify-content: center;
    max-width: 100%;
}

.memory-board.easy {
    grid-template-columns: repeat(3, 1fr);
    max-width: 300px;
}

.memory-board.medium {
    grid-template-columns: repeat(4, 1fr);
    max-width: 400px;
}

.memory-board.hard {
    grid-template-columns: repeat(5, 1fr);
    max-width: 500px;
}

.memory-card {
    aspect-ratio: 1;
    background: linear-gradient(135deg, var(--pink-accent), var(--pink-deep));
    border-radius: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    transform-style: preserve-3d;
    min-height: 60px;
}

.memory-card:hover:not(.flipped):not(.matched) {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(233, 81, 113, 0.3);
}

.memory-card.flipped {
    background: #fff;
    border: 3px solid var(--pink-accent);
    transform: rotateY(180deg);
}

.memory-card.matched {
    background: #e8f5e8;
    border: 3px solid #4caf50;
    animation: bounce 0.6s ease;
}

.memory-card.wrong {
    animation: shake 0.5s ease;
    background: #ffebee;
    border: 3px solid #f44336;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 15px;
    backface-visibility: hidden;
}

.card-front {
    background: linear-gradient(135deg, var(--pink-accent), var(--pink-deep));
    color: white;
    font-size: 1.5em;
}

.card-back {
    background: #fff;
    border: 3px solid var(--pink-accent);
    transform: rotateY(180deg);
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s, visibility 0.4s;
    z-index: 1000;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #fff;
    padding: clamp(20px, 5vw, 40px);
    border-radius: 25px;
    text-align: center;
    transform: scale(0.7);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-width: 95%;
    width: 500px;
    box-sizing: border-box;
    margin: 20px;
}

.modal-overlay.show .modal-content {
    transform: scale(1);
}

.modal-title {
    font-family: var(--heading-font);
    font-size: 2.2em;
    color: var(--pink-deep);
    margin-bottom: 25px;
}

.option-group {
    margin-bottom: 25px;
}

.option-group h3 {
    font-weight: 700;
    font-size: 1.1em;
    color: var(--primary-text);
    margin-bottom: 15px;
}

.choice-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.choice-btn {
    background-color: #fff;
    border: 2px solid var(--border-light);
    padding: 10px 15px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 700;
    font-size: 0.9em;
}

.choice-btn:hover {
    background-color: var(--pink-light);
    border-color: var(--pink-accent);
}

.choice-btn.active {
    background-color: var(--pink-deep);
    color: #fff;
    border-color: var(--pink-deep);
}

.modal-message {
    font-family: var(--heading-font);
    font-size: 2.5em;
    color: var(--pink-deep);
    margin-bottom: 20px;
}

.game-results {
    background: rgba(255, 240, 245, 0.7);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 25px;
    border: 2px solid var(--border-light);
}

.game-results p {
    margin: 10px 0;
    font-weight: 700;
    color: var(--primary-text);
}

.restart-button {
    background: linear-gradient(135deg, var(--pink-accent), var(--pink-deep));
    color: #fff;
    border: none;
    padding: 16px 40px;
    font-size: 1.3em;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 1px;
    box-shadow: 0 5px 20px rgba(233, 30, 99, 0.4);
    width: 100%;
}

.restart-button:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(233, 30, 99, 0.5);
}

.tagline {
    color: var(--text-dark);
    font-size: 1em;
    font-weight: 500;
    margin-top: 20px;
    padding: 8px 15px;
    background: transparent;
    border: none;
    cursor: pointer;
}

.hidden {
    display: none !important;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .game-container {
        max-width: 95%;
        padding: 20px;
    }
    
    .game-stats {
        flex-direction: column;
        gap: 10px;
    }
    
    .stat {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .stat-label, .stat-value {
        display: inline;
    }
    
    .memory-board.easy {
        max-width: 250px;
    }
    
    .memory-board.medium {
        max-width: 300px;
    }
    
    .memory-board.hard {
        max-width: 350px;
    }
    
    .memory-card {
        min-height: 50px;
        font-size: clamp(1.2rem, 3vw, 2rem);
    }
}

@media (max-width: 480px) {
    .choice-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .choice-btn {
        width: 100%;
        max-width: 200px;
    }
}
