* {
    font-family: 'Life Savers', serif;
}

body {
    text-align: center;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}
.lava-lamp {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: -1;

    background: radial-gradient(circle at 50% 50%, #aaffc403, #ffb6c154, #add8e600, #ffe4b564);
    z-index: -1;
  
  }



@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}


/* Game Container */
.game-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Games Overview Page */
.games-overview {
    text-align: center;
    padding: 20px;
}

.page-title {
    font-size: 2.5rem;
    color: #343434;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.game-previews {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.game-preview {
    background: white;
    border-radius: 20px;
    padding: 25px;
    border: 0.5px solid #343434;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.game-preview:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.game-preview-header {
    margin-bottom: 20px;
}

.game-preview-header h2 {
    font-size: 1.8rem;
    color: #343434;
    margin-bottom: 10px;
}

.game-preview-header p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 15px;
}

.play-btn {
    background: none;
    color: palevioletred;
    border: none;
    border-radius: 25px;
    padding: 12px 30px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Life Savers', serif;
}

.play-btn:hover {
    color: #343434;
}

/* Game Preview Content */
.game-preview-content {
    display: -webkit-flex;
    display: flex;
    -webkit-justify-content: center;
    justify-content: center;
    -webkit-align-items: center;
    align-items: center;
    min-height: 200px;
    gap: 20px;
}

/* Dress Up Preview */
.preview-model {
    flex: 1;
    display: flex;
    justify-content: center;
}

.preview-model-figure {
    width: 120px;
    height: auto;
    object-fit: contain;
}

.preview-clothes {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.preview-item {
    width: 60px;
    height: 60px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    padding: 5px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

/* Skill Sweeper Preview */
.preview-board {
    display: grid;
    -webkit-justify-self: center;
    justify-self: center;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    max-width: 150px;
    margin: 0 auto;
}

.preview-cell {
    width: 40px;
    height: 40px;
    background: transparent;
    box-shadow: 0 0 0 1px rgba(163, 163, 163, 0.242);
    border: 2px solid white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
}

/* Game Back Button */
.game-back-btn {
    margin-top: 15px;
    margin-bottom: 0px;
    text-align: left;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #343434;
    text-decoration: none;
    border-radius: 20px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    font-family: 'Life Savers', serif;
}

.back-link:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Game Modals */
.game-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    
}

.game-modal.active {
    display: flex;
    flex-direction: column;
}

.modal-header {
    background: linear-gradient(135deg, #ff6b9d 0%, #c44569 100%);
    color: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.modal-header h1 {
    font-size: 1.5rem;
    margin: 0;
}

.close-modal {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.modal-content {
    flex: 1;
    background: white;
    border-radius: 20px;
    overflow-y: auto;
    padding: 20px;
    min-height: 0; /* Allow flexbox to shrink */
    position: relative;
    z-index: 1;
}

/* Ensure modal content is visible */
.game-modal .minesweeper-container {
    opacity: 1;
    visibility: visible;
    position: relative;
    z-index: 1;
    justify-items: center;
    justify-self:center;
}

/* Debug styling - temporary */
.game-modal.active {
    display: flex !important;
    flex-direction: column !important;
}

.modal-content * {
    visibility: visible !important;
    opacity: 1 !important;
}

/* Hide elements when modals are active */
body.modal-open {
    overflow: hidden;
}

body.modal-open .games-overview {
    display: none;
}

.game-title {
    text-align: center;
    margin-bottom: 10px;
}

.game-title h1 {
    font-size: 2rem;
    color: #343434;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.game-title p {
    font-size: 1.2rem;
    color: #666;
    margin: 0;
}

/* Single Canvas Layout */
.game-canvas {
    position: relative;
    width: 100%;
    height: calc(100vh - 180px);
    min-height: 700px;
    
    overflow: hidden;
}

/* Model - Always centered */
.canvas-model {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 800px;
    z-index: 1;
}

.model-figure {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Canvas Items - General Styling */
.canvas-item {
    position: absolute;
    cursor: grab;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    padding: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
}

.canvas-item:hover {
    transform: scale(1.05);
}

.canvas-item.dragging {
    cursor: grabbing;
    transform: scale(0.95) rotate(2deg);
    z-index: 1000;
    opacity: 0.9;
}

.canvas-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
}

/* All clothing items positioned freely across canvas */
.canvas-item {
    position: absolute;
    width: 160px;
    height: 200px;
    cursor: grab;
    transition: transform 0.2s ease;
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
}

/* Smaller sizes for specific clothing types */
/* Hats - much smaller */
.canvas-item:nth-child(14), /* hat1 */
.canvas-item:nth-child(15), /* hat2 */
.canvas-item:nth-child(16), /* hat3 */
.canvas-item:nth-child(17), /* hat4 */
.canvas-item:nth-child(18), /* hat5 */
.canvas-item:nth-child(19) { /* hat6 */
    width: 80px;
    height: 80px;
}

/* Shirt1 - much smaller to fit model */
.canvas-item:nth-child(2) { /* shirt1 */
    width: 70px;
    height: 110px;
}

/* Glasses and accessories - much smaller */
.canvas-item:nth-child(20), /* face1 */
.canvas-item:nth-child(21), /* face2 */
.canvas-item:nth-child(22) { /* glasses1 */
    width: 60px;
    height: 60px;
}

/* Hair - different sizes for each type */
.canvas-item[data-item="hair1"] { /* hair1 - short hair - much smaller */
    width: 60px;
    height: 70px;
}

.canvas-item[data-item="hair2"] { /* hair2 - long hair - slightly smaller */
    width: 130px;
    height: 160px;
}

.canvas-item[data-item="hair3"] { /* hair3 - crazy hair - medium size */
    width: 100px;
    height: 120px;
}

/* Stack clothes like quarters - very close together with small offsets */
/* Tops/Dresses stack - Left side */
.canvas-item:nth-child(2) { top: 10%; left: 5%; z-index: 6; }   /* shirt - bottom of stack */
.canvas-item:nth-child(3) { top: 10.5%; left: 5.5%; z-index: 7; } /* dress1 */
.canvas-item:nth-child(4) { top: 11%; left: 6%; z-index: 8; }   /* dress2 */
.canvas-item:nth-child(5) { top: 11.5%; left: 6.5%; z-index: 9; } /* dress3 */
.canvas-item:nth-child(6) { top: 12%; left: 7%; z-index: 10; }  /* dress4 */
.canvas-item:nth-child(7) { top: 12.5%; left: 7.5%; z-index: 11; } /* dress5 - top of stack */

/* Bottoms stack - Desktop spacing */
.canvas-item:nth-child(8) { top: 45%; left: 5%; z-index: 6; }   /* bottom1 - bottom of stack */
.canvas-item:nth-child(9) { top: 45.5%; left: 5.5%; z-index: 7; } /* bottom2 */
.canvas-item:nth-child(10) { top: 46%; left: 6%; z-index: 8; }  /* bottom3 */
.canvas-item:nth-child(11) { top: 46.5%; left: 6.5%; z-index: 9; } /* bottom4 */
.canvas-item:nth-child(12) { top: 47%; left: 7%; z-index: 10; } /* bottom5 */
.canvas-item:nth-child(13) { top: 47.5%; left: 7.5%; z-index: 11; } /* bottom6 - top of stack */

/* Hats stack - Top right - high z-index to always be on top of hair */
.canvas-item:nth-child(14) { top: 5%; left: 75%; z-index: 20; }  /* hat1 - bottom of stack */
.canvas-item:nth-child(15) { top: 5.5%; left: 75.5%; z-index: 21; } /* hat2 */
.canvas-item:nth-child(16) { top: 6%; left: 76%; z-index: 22; }  /* hat3 */
.canvas-item:nth-child(17) { top: 6.5%; left: 76.5%; z-index: 23; } /* hat4 */
.canvas-item:nth-child(18) { top: 7%; left: 77%; z-index: 24; } /* hat5 */
.canvas-item:nth-child(19) { top: 7.5%; left: 77.5%; z-index: 25; } /* hat6 - top of stack */

/* Accessories stack - Middle right - high z-index to always be on top of hair */
.canvas-item:nth-child(20) { top: 35%; left: 80%; z-index: 20; } /* face1 - bottom of stack */
.canvas-item:nth-child(21) { top: 35.5%; left: 80.5%; z-index: 21; } /* face2 */
.canvas-item:nth-child(22) { top: 36%; left: 81%; z-index: 22; } /* glasses1 - top of stack */

/* Hair stack - Bottom right - all three together - lower z-index so hats/glasses go on top */
.canvas-item[data-item="hair1"] { top: 55%; left: 80%; z-index: 2; } /* hair1 - short hair - bottom of stack */
.canvas-item[data-item="hair2"] { top: 55.5%; left: 80.5%; z-index: 3; } /* hair2 - long hair - middle of stack */
.canvas-item[data-item="hair3"] { top: 56%; left: 81%; z-index: 4; } /* hair3 - crazy hair - top of stack */

/* Game Controls - Bottom Center */
.canvas-controls {
    position: absolute;
    bottom: 5%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 1000;
    pointer-events: auto;
}

.control-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Life Savers', serif;
    font-size: 1rem;
    z-index: 1001;
    pointer-events: auto;
    position: relative;
}

.reset-btn {
    background: transparent;
    border: 1px solid #343434;
    color: #343434;
    
}

.share-btn {
    color: white;
    background-color:  #343434;
}

.control-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Dropped clothing items - positioned relative to model container */
.dropped-item {
    position: absolute;
    z-index: 10;
    pointer-events: auto;
    transition: none;
    cursor: move;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.dropped-item:hover {
    filter: brightness(1.1);
    transform: translate(-50%, -50%) scale(1.05);
}

.dropped-item:active {
    cursor: grabbing;
    z-index: 1000;
}

/* Game Controls */
.game-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.btn-reset, .btn-save {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Life Savers', serif;
}

.btn-reset {
    background: #ff6b9d;
    color: white;
}

.btn-reset:hover {
    background: #e55a87;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 157, 0.3);
}

.btn-share {
    background: #4ecdc4;
    color: white;
}

.btn-share:hover {
    background: #45b7aa;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(78, 205, 196, 0.3);
}

/* Wardrobe Area - Main Display */
.wardrobe-area {
    flex: 1;
   
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Category Navigation */
.category-navigation {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    justify-content: center;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(255, 107, 157, 0.1);
}

.nav-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    background: #f8f9fa;
    color: #666;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Life Savers', serif;
}

.nav-btn.active {
    background: linear-gradient(135deg, #ff6b9d, #c44569);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 157, 0.4);
}

.nav-btn:hover:not(.active) {
    background: #e9ecef;
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Wardrobe Display */
.wardrobe-display {
    flex: 1;
    overflow-y: auto;
    padding-right: 10px;
}

.wardrobe-section {
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    padding: 20px 0;
}

.wardrobe-section.active {
    display: grid;
}

/* Wardrobe Items - Full Size Display */
.wardrobe-item {
    
 
    padding: 20px;
    cursor: grab;
    transition: all 0.4s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.wardrobe-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, #ffffff 0%, #fff5f8 100%);
}

.wardrobe-item.dragging {
    cursor: grabbing;
    opacity: 0.9;
    transform: rotate(3deg) scale(0.95);
    z-index: 1000;
    box-shadow: 0 20px 50px rgba(255, 107, 157, 0.3);
}

.wardrobe-item img {
    width: 100%;
    max-width: 200px;
    height: 200px;
    object-fit: contain;
    transition: transform 0.4s ease;
    margin-bottom: 15px;
}

.wardrobe-item:hover img {
    transform: scale(1.1);
}

.wardrobe-item .item-label {
    font-size: 1.1rem;
    font-weight: bold;
    color: #333;
    text-align: center;
    margin-top: auto;
    padding: 10px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    min-width: 120px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.wardrobe-item:hover .item-label {
    background: rgba(255, 107, 157, 0.1);
    color: #ff6b9d;
}

/* Drag and Drop Visual Feedback */
.model-container.drag-over {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    transform: scale(1.02);
    
}

/* Mobile Responsiveness */
@media screen and (max-width: 768px) {

   
    .game-container {
        padding-top: 60px;
    }

    .game-title {
        text-align: left;
        margin-left: 20px;
        margin-bottom: 10px;
    }

    /* Dress-up game specific mobile title styling */
    #dress-up-game .game-title h1 {
        font-size: 1.2rem;
        visibility: hidden;
        position: relative;
        margin-bottom: 20px;
        height: 50px;
    }
    
    #dress-up-game .game-title h1::before {
        content: "✨ Dress Me Up ✨ \A for the Job Interview";
        white-space: pre-line;
        visibility: visible;
        position: absolute;
        left: 0;
        top: 0;
        text-align: left;
        width: 100%;
        line-height: 1.5;
        padding-left: 12px;
    }

    #dress-up-game .game-title p { 
        visibility: hidden;
        position: relative;
        color: #343434;
        font-weight: 600;
        line-height: 1.5;
        text-align: left;
        font-size: 1rem;
        margin-top: 15px;
        padding-right:50px;
    }
    
    #dress-up-game .game-title p::before {
        content: "Drag and drop clothes to create the perfect outfit";
        white-space: pre-line;
        visibility: visible;
        position: absolute;
        left: 0;
        top: 0;
        width: calc(100% - 90px);
        padding-left: 12px;
        line-height: 1.5;
        margin-right: 0px;
    }

    /* Minesweeper game mobile title styling */
    #minesweeper-game .game-title h1 {
        font-size: 1.2rem;
        text-align: left;
        margin-left: 20px;
        margin-bottom: 20px;
        padding-left: 12px;
    }

    #minesweeper-game .game-title p {
        color: #343434;
        font-weight: 600;
        line-height: 1.5;
        text-align: left;
        font-size: 1rem;
        margin-top: 15px;
        margin-left: 20px;
        padding-left: 12px;
        padding-right: 50px;
    }

    .game-canvas {
        height: calc(100vh - 140px);
        min-height: 500px;
    }

    .canvas-model {
        top: 45%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 250px;
        height: 250px;
    }

    .canvas-item {
        width: 90px;
        height: 120px;
    }

    /* Mobile-specific sizes for specific clothing items */
    /* Shirt1 - smaller for mobile */
    .canvas-item:nth-child(2) { /* shirt1 */
        width: 50px;
        height: 70px;
    }

    /* Hats - smaller for mobile */
    .canvas-item:nth-child(14), /* hat1 */
    .canvas-item:nth-child(15), /* hat2 */
    .canvas-item:nth-child(16), /* hat3 */
    .canvas-item:nth-child(17), /* hat4 */
    .canvas-item:nth-child(18), /* hat5 */
    .canvas-item:nth-child(19) { /* hat6 */
        width: 45px;
        height: 45px;
    }

    /* Glasses and accessories - smaller for mobile */
    .canvas-item:nth-child(20), /* face1 */
    .canvas-item:nth-child(21), /* face2 */
    .canvas-item:nth-child(22) { /* glasses1 */
        width: 35px;
        height: 35px;
    }

    /* Hair - smaller for mobile */
    .canvas-item[data-item="hair1"] { /* hair1 - short hair */
        width: 40px;
        height: 50px;
    }

    .canvas-item[data-item="hair2"] { /* hair2 - long hair */
        width: 70px;
        height: 90px;
    }

    .canvas-item[data-item="hair3"] { /* hair3 - crazy hair */
        width: 60px;
        height: 80px;
    }

    /* Mobile-specific positioning for tops/dresses - make them higher */
    .canvas-item:nth-child(2) { top: 5%; }   /* shirt - bottom of stack */
    .canvas-item:nth-child(3) { top: 5.5%; } /* dress1 */
    .canvas-item:nth-child(4) { top: 6%; }   /* dress2 */
    .canvas-item:nth-child(5) { top: 6.5%; } /* dress3 */
    .canvas-item:nth-child(6) { top: 7%; }  /* dress4 */
    .canvas-item:nth-child(7) { top: 7.5%; } /* dress5 - top of stack */

    .canvas-controls {
        position: absolute;
        bottom: 18%;
        top: 75%;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        gap: 10px;
        z-index: 1000;
        pointer-events: auto;
    }

    .control-btn {
        padding: 6px 12px;
        font-size: 1rem;
        white-space: nowrap;
    }
}

/* Hide game content when mobile menu is open */
body.menu-open .game-canvas,
body.menu-open .canvas-item,
body.menu-open .canvas-model,
body.menu-open .canvas-controls {
    display: none !important;
}

body.menu-open .game-title {
    display: none !important;
}

@media screen and (max-width: 480px) {
    .game-title h1 {
        font-size: 1.2rem;
    }

    .model-container {
        width: 200px;
        height: 300px;
    }

    .wardrobe-section {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .wardrobe-item {
        padding: 12px;
        min-height: 180px;
    }

    .wardrobe-item img {
        height: 100px;
        max-width: 100px;
    }

    .nav-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

/* Loading Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.game-container {
    animation: fadeIn 0.8s ease-out;
}

.clothing-item {
    animation: fadeIn 0.6s ease-out forwards;
}

/* Purple background for game menu item */
/* removed empty .purple-bg ruleset; class styled in navigation.css */

/* Game Selector Tabs */
.game-selector {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 0 20px;
}

.game-tab {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    background: #f8f9fa;
    color: #666;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Life Savers', serif;
}

.game-tab.active {
    background: #343434;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 52, 52, 0.3);
}

.game-tab:hover:not(.active) {
    background: #e9ecef;
    transform: translateY(-1px);
}

/* Game Sections */
.game-section {
    display: none;
    width: 100%;
}

.game-section.active {
    display: block;
}

/* Minesweeper Styles */
.minesweeper-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
}

.game-info {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding-top: 15px;
    background: none;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.2rem;
    font-weight: bold;
    color: #343434;
}

.info-item .emoji {
    font-size: 1.5rem;
}

.info-item .count {
    min-width: 30px;
    text-align: center;
    padding: 5px 10px;
    background: white;
    border-radius: 15px;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
}

.difficulty-selector {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.difficulty-label {
    font-size: 1.1rem;
    font-weight: bold;
    color: #343434;
    font-family: 'Life Savers', serif;
}

.difficulty-dropdown {
    padding: 10px 20px;
    border: none;
    border-radius: 20px;
    background: white;
    color: #343434;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Life Savers', serif;
    min-width: 180px;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ff6b9d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
    padding-right: 50px;
    box-shadow: 0 5px 15px rgba(255, 107, 157, 0.3);
}

.difficulty-dropdown:hover {
    background-color: #fff5f8;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(255, 107, 157, 0.2);
}

.difficulty-dropdown:focus {
    outline: none;
    box-shadow: 0 5px 15px rgba(255, 107, 157, 0.3);
}

.difficulty-dropdown option {
    background: white;
    color: #343434;
    padding: 10px;
}

.game-board {
    display: inline-block;
    margin: 20px auto;
    padding: 0;
    background: linear-gradient(135deg, #a8ede969 0%, #fed6e36f 100%);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 3px solid white;
    position: relative;
}

.game-board .game-info {
    margin: 0;
    padding: 15px;
  
    gap: 20px;
}

.board-row {
    display: flex;
    margin: 0;
    padding: 0;
}

.board-row:first-of-type {
    padding-top: 20px;
}

.board-row:last-of-type {
    padding-bottom: 20px;
}

.board-row .cell:first-child {
    margin-left: 20px;
}

.board-row .cell:last-child {
    margin-right: 20px;
}

.cell {
    width: 35px;
    height: 35px;
    border: 2px solid #fff;
    background: linear-gradient(135deg, #ffb6c1 0%, #ffc0cb 100%);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    transition: all 0.2s ease;
    position: relative;
    user-select: none;
}

.cell:hover:not(.revealed):not(.flagged) {
    background: linear-gradient(135deg, #ffcccb 0%, #ffd0dc 100%);
    transform: scale(1.05);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.cell.revealed {
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
    cursor: default;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
}

.cell.flagged {
    background: linear-gradient(135deg, #98fb98 0%, #90ee90 100%);
}

.cell.bee {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff5252 100%);
    animation: beeReveal 0.5s ease-out;
}

.cell.safe {
    background: linear-gradient(135deg, #c8e6c9 0%, #a5d6a7 100%);
}

.cell.number-1 { color: #2196f3; }
.cell.number-2 { color: #4caf50; }
.cell.number-3 { color: #ff9800; }
.cell.number-4 { color: #9c27b0; }
.cell.number-5 { color: #f44336; }
.cell.number-6 { color: #795548; }
.cell.number-7 { color: #000000; }
.cell.number-8 { color: #607d8b; }






.hint-btn {
    background: linear-gradient(135deg, #ffecb3 0%, #ffd54f 100%);
    color: #333;
}

.hint-btn:hover {
    background: linear-gradient(135deg, #ffd54f 0%, #ffcc02 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 213, 79, 0.4);
}

@keyframes beeReveal {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

@keyframes cellReveal {
    0% { 
        transform: scale(1) rotateY(0deg);
        opacity: 1;
    }
    50% { 
        transform: scale(0.8) rotateY(90deg);
        opacity: 0.5;
    }
    100% { 
        transform: scale(1) rotateY(0deg);
        opacity: 1;
    }
}

@keyframes hintPulse {
    0% { 
        transform: scale(1);
        background: linear-gradient(135deg, #ffb6c1 0%, #ffc0cb 100%);
        box-shadow: 0 0 0 0 rgba(255, 213, 79, 0.7);
    }
    50% { 
        transform: scale(1.15);
        background: linear-gradient(135deg, #ffd54f 0%, #ffcc02 100%);
        box-shadow: 0 0 0 10px rgba(255, 213, 79, 0.3);
    }
    100% { 
        transform: scale(1);
        background: linear-gradient(135deg, #ffb6c1 0%, #ffc0cb 100%);
        box-shadow: 0 0 0 0 rgba(255, 213, 79, 0);
    }
}

.cell.revealing {
    animation: cellReveal 0.3s ease-out;
}

/* Mobile responsiveness for minesweeper */
@media screen and (max-width: 768px) {
    .game-selector {
        gap: 5px;
        padding: 0 10px;
    }
    
    .game-tab {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    .minesweeper-container {
        padding: 10px;
    }
    
    .game-info {
        gap: 15px;
        padding: 10px;
        flex-wrap: wrap;
    }
    
    .info-item {
        font-size: 1rem;
    }
    
    .info-item .emoji {
        font-size: 1.2rem;
    }
    
    .difficulty-selector {
        gap: 10px;
        flex-direction: column;
        text-align: center;
    }
    
    .difficulty-label {
        font-size: 1rem;
    }
    
    .difficulty-dropdown {
        min-width: 200px;
        font-size: 0.9rem;
        padding: 8px 15px;
        padding-right: 40px;
    }
    
    /* Hide hard difficulty option on mobile */
    .difficulty-dropdown option[value="hard"] {
        display: none;
    }
    
    .cell {
        width: 20px;
        height: 20px;
        font-size: 0.8rem;
        border: 1px solid #fff;
    }
    
    .game-board {
        padding: 5px;
        max-width: 95vw;
        overflow-x: auto;
    }
    
    /* Game Previews Mobile */
    .page-title {
        font-size: 1.8rem;
    }
    
    .game-previews {
        grid-template-columns: 1fr;
        gap: 20px;
        justify-items: center;
        margin-top: 60px !important;
    }
    .preview-board {
        justify-items: center !important;
        justify-self:center !important;
    }
    
    .game-preview {
        padding: 20px;
      
    }
    
    .game-preview-header h2 {
        font-size: 1.4rem;
    }
    
    .game-preview-content {
        min-height: 150px;
        flex-direction: column;
        justify-items: center;
    }
    
    .preview-model-figure {
        width: 80px;
        justify-items: center;
    }
    
    .preview-item {
        width: 40px;
        height: 40px;
        justify-items: center;
        justify-self:center;
        justify-content: center;
    }
    
    .preview-board {
        max-width: 120px;
        justify-items: center;
        justify-self:center;
    }
    
    .preview-cell {
        justify-items: center;
        justify-self:center;
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }
    
    .play-btn {
        padding: 10px 20px;
        font-size: 1rem;
    }
}

/* Win/Lose Popup Modal */
.game-result-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-out;
}

.game-result-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-result-modal .modal-content {
    background: rgba(216, 112, 147, 0.382);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.4s ease-out;
    position: relative;
}

.game-result-modal .close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.game-result-modal .close-modal:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.game-result-modal .modal-body {
    padding: 40px 30px;
    text-align: center;
}

#result-image-container {
    margin-bottom: 20px;
}

#result-image {
    height: 200px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

#result-message {
    font-size: 1.2rem;
    color: #ffffff;
    margin-bottom: 25px;
    font-weight: 500;
    line-height: 1.5;
}

.play-again-btn {
    background: #ff6b9d;
    color: white;
    border: none;
    border-radius: 25px;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Life Savers', serif;
}

.play-again-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 157, 0.4);
}

/* Variant styling for win vs lose */
.game-result-modal.win .modal-content {
    background: rgba(255, 221, 87, 0.45);
}

.game-result-modal.win #result-message {
    color: #3d3d3d;
}

.game-result-modal.win .play-again-btn {
    background: #f1c40f;
    color: #3d3d3d;
}

.game-result-modal.win .play-again-btn:hover {
    box-shadow: 0 8px 25px rgba(241, 196, 15, 0.4);
}

.game-result-modal.lose .modal-content {
    background: rgba(216, 112, 147, 0.382);
}

.game-result-modal.lose #result-message {
    color: #ffffff;
}

.game-result-modal.lose .play-again-btn {
    background: #ff6b9d;
    color: #ffffff;
}

/* Modal Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media screen and (max-width: 800px) {
    .game-previews {
        grid-template-columns: 1fr;
    }

    .game-preview-content {
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .preview-board {
        margin: 0 auto;
        place-self: center;
        justify-self: center;
    }


    .game-container {
        margin-top: 0px !important;
        padding-top: 5px !important;
        margin-bottom: 20px;
    }
}

/* Desktop-only: enlarge game preview cards */
@media screen and (min-width: 1024px) {
    .game-previews {
        -webkit-justify-items: center;
        justify-items: center;
        max-width: 1000px;
        gap: 0px;
        display: -webkit-grid;
        display: grid;
    }

    .game-preview {
        padding: 35px;
        
    }

    .game-preview-header h2 {
        font-size: 2.1rem;
    }

    .game-preview-header p {
        font-size: 1.2rem;
    }

    .preview-model-figure {
        width: 160px;
    }

    .preview-board {
        max-width: 180px;
        margin: 0 auto;
        -webkit-justify-items: center;
        justify-items: center;
    }

    .preview-cell {
        width: 48px;
        height: 48px;
        font-size: 1.4rem;
    }
}
