body {
    font-family: Arial, Helvetica, sans-serif;
    background: linear-gradient(135deg, #D9F8E5, #E9D8FF);
    margin: 0;
    padding: 20px;
    text-align: center;
}


#game-info h2,
#game-info h3 {
    margin: 5px 0;
}


#timer {
    font-size: 20px;
    margin: 20px auto;
    font-weight: bold;
}


/* ================
   GAME BOARD
================= */
#gameBoard {
    display: grid;
    gap: 12px;
    margin: 20px auto;
    padding: 12px;
    max-width: 600px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    grid-auto-rows: 1fr;
}


body.easy #gameBoard {
    grid-template-columns: repeat(3, 1fr);
}


body.medium #gameBoard {
    grid-template-columns: repeat(4, 1fr);
}


body.hard #gameBoard {
    grid-template-columns: repeat(4, 1fr);
}


/* =================
   CARD STYLING
================= */
.card {
    width: 100%;
    aspect-ratio: 1 / 1;
    position: relative;
    cursor: pointer;
    perspective: 1000px;
}


.card-inner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: transform 0.5s;
    transform-style: preserve-3d;
    border-radius: 12px;
}


.card.flipped .card-inner {
    transform: rotateY(180deg);
}


/* FRONT & BACK */
.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 12px;
}


.card-back {
    background-color: #FFD8E4;
}


.card-front {
    transform: rotateY(180deg);
}


.card-front img {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    object-fit: cover;
    display: block;
}


/* =========================
   GALLERY OF USED IMAGES
========================= */
#usedImagesGallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 20px;
}


#usedImagesGallery img {
    width: 80px;
    height: 80px;
    margin: 5px;
    border-radius: 5px;
    object-fit: cover;
}


/* ===============
   WIN OVERLAY
=================*/
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(220, 220, 220, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}


.overlay-content {
    background: #fff;
    padding: 40px 60px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.25);
}


.overlay-content h2 {
    font-size: 2rem;
    color: #7469B6;
    margin-bottom: 20px;
}


.overlay-content button {
    padding: 12px 30px;
    font-size: 1.1rem;
    border: none;
    border-radius: 12px;
    background-color: #B8E8C6;
    cursor: pointer;
}


.overlay-content button:hover {
    background-color: #CFEFFF;
}


/* ==================
   THEME BUTTONS
==================== */
.theme-btn {
    padding: 10px 20px;
    margin: 6px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0,0,0,0.12);
    background: linear-gradient(135deg, #B8E8C6, #D9F8E5);
    color: #333;
}


.theme-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 12px rgba(0,0,0,0.2);
    background: linear-gradient(135deg, #D9F8E5, #CFEFFF);
}


.theme-btn.selected {
    background: linear-gradient(135deg, #E9D8FF, #CFEFFF);
    border: 2px solid #7469B6;
    color: #444;
}


/* ===============
   START BUTTON
================== */
#start-btn {
    padding: 10px 20px;        
    font-size: 1rem;          
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 6px rgba(0,0,0,0.12);
    background: linear-gradient(135deg, #B8E8C6, #D9F8E5);
    color: #333;
    max-width: 200px;
    text-align: center;
    margin-top: 20px;
}


#start-btn:hover {
    transform: translateY(-1px) scale(1.03);
    box-shadow: 0 5px 10px rgba(0,0,0,0.2);
    background: linear-gradient(135deg, #D9F8E5, #CFEFFF);
}


/* =========================
   DIFFICULTY DROPDOWN
========================= */
#difficulty-select {
    padding: 10px 15px;
    font-size: 1rem;
    border-radius: 10px;
    border: 1px solid #ccc;
    background: #D9F8E5;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.3s ease;
}


#difficulty-select:hover {
    background: #CFEFFF;
}
