/* Enhanced Global Styles with Proper Mobile Support */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    height: 100%;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

body {
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    height: 100%;
    overflow-x: hidden; /* Prevent horizontal scroll only */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

/* Enhanced Canvas Styling with Better Touch Support */
#gameCanvas {
    touch-action: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    background: #228B22;
    border-radius: clamp(8px, 1.5vw, 12px);
    border: 2px solid #ffffff;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.15),
        0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Enhanced Responsive Typography */
body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    font-size: clamp(14px, 2.5vw, 16px);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, .font-press-start {
    font-family: 'Press Start 2P', cursive;
    line-height: 1.2;
}

/* Game Container Responsive Layout */
.game-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: clamp(8px, 2vw, 20px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(12px, 3vw, 24px);
}

/* Canvas Container with Proper Aspect Ratio */
.canvas-container {
    width: 100%;
    max-width: 850px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
}

/* Enhanced Game Stats Layout */
.game-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: clamp(12px, 4vw, 32px);
    padding: clamp(8px, 2vw, 16px);
    width: 100%;
    max-width: 800px;
}

.game-stats > div {
    font-size: clamp(12px, 3vw, 18px);
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
}

/* Enhanced Button System */
button {
    background: linear-gradient(145deg, #2a7a2a, #1d5a1d);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: clamp(6px, 1vw, 10px);
    color: white;
    font-family: inherit;
    font-size: clamp(12px, 2.5vw, 14px);
    font-weight: 600;
    padding: clamp(8px, 2vw, 12px) clamp(12px, 3vw, 20px);
    cursor: pointer;
    transition: all 0.2s ease;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    min-height: 44px; /* iOS touch target minimum */
    min-width: 44px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

button:hover:not(:disabled) {
    background: linear-gradient(145deg, #327232, #236523);
    transform: translateY(-1px);
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

button:active {
    transform: translateY(0);
    box-shadow: 
        0 1px 2px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Controls Container */
.controls-container {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(8px, 2vw, 12px);
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 600px;
    padding: clamp(8px, 2vw, 16px);
}

/* ==============================
   Card Styling with Depth and 3D Hover Animation
   ============================== */

/* Container for the card to provide 3D perspective */
.card-container {
    perspective: 1000px; /* Gives a 3D effect when rotating the card */
    display: inline-block; /* Ensure the card container fits around the card */
}

/* General card styling */
.card {
    width: 60px;
    height: 90px;
    background-color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.4);  /* Softer white border */
    border-radius: 8px;  /* Slightly more rounded corners */
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.3),           /* Base shadow for depth */
        0 0 10px rgba(255, 255, 255, 0.5),      /* Soft white glow */
        0 0 5px rgba(255, 255, 255, 0.3);       /* Additional subtle glow */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;  /* Smooth transition for all changes */
    position: relative;
    cursor: pointer;
    user-select: none;
    transform-origin: center bottom;
    backdrop-filter: blur(5px);  /* Adds a slight blur effect behind the card */
}

/* Hover effect for cards */
.card:hover {
    transform: translateY(-10px) rotateY(5deg) rotateX(5deg) scale(1.05); /* 3D transformation on hover */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4); /* Deeper shadow for hover effect */
}

/* Flip Animation */
.flip-card {
    transform-style: preserve-3d;
    transition: transform 0.6s;
    position: relative;
    width: 100%;
    height: 100%;
}

.flip-card.flipped {
    transform: rotateY(180deg);
}

.flip-card .front, .flip-card .back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 4px;
}

.flip-card .front {
    z-index: 2;
}

.flip-card .back {
    transform: rotateY(180deg);
    z-index: 1;
}

/* ==============================
   Specific Design for Foundation Cards
   ============================== */
.foundation .card {
    border: 2px solid #FFD700; /* Gold border to make it stand out */
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.3), 0 3px 6px rgba(0, 0, 0, 0.15);
    z-index: 3; /* Above other cards */
    
    /* New styles for background gradients */
    background: linear-gradient(135deg, #f9d423, #ff4e50); /* Example gradient */
    /* You can customize the colors as per your preference */
    
    /* Optional: Add a subtle pattern overlay for added texture */
    /* background-image: url('path-to-your-pattern.png'), linear-gradient(135deg, #f9d423, #ff4e50);
       background-blend-mode: overlay; */
    
    /* Ensure the background covers the entire card */
    background-size: cover;
    background-repeat: no-repeat;
}

/* ==============================
   Unique Backgrounds for Each Foundation Pile
   ============================== */

/* Foundation Pile 1 - Hearts */
.foundation .card:nth-child(1) {
    background: linear-gradient(135deg, #ff9a9e, #fad0c4); /* Soft pink gradient */
}

/* Foundation Pile 2 - Diamonds */
.foundation .card:nth-child(2) {
    background: linear-gradient(135deg, #a18cd1, #fbc2eb); /* Purple-pink gradient */
}

/* Foundation Pile 3 - Clubs */
.foundation .card:nth-child(3) {
    background: linear-gradient(135deg, #89f7fe, #66a6ff); /* Blue gradient */
}

/* Foundation Pile 4 - Spades */
.foundation .card:nth-child(4) {
    background: linear-gradient(135deg, #f093fb, #f5576c); /* Pink-red gradient */
}

/* ============================
   Foundation Highlight on Drop
   ============================ */
@keyframes highlightDrop {
    0% {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
        transform: scale(1.1);
    }
    100% {
        box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
        transform: scale(1);
    }
}

.foundation .card-dropped {
    animation: highlightDrop 0.5s ease-out; /* Applies the animation when a card is dropped */
}

/* ==============================
   Comprehensive Responsive Design System
   ============================== */

/* Extra Small Mobile Devices (320px - 480px) */
@media screen and (max-width: 480px) {
    .game-container {
        padding: 8px;
        gap: 12px;
        min-height: 100vh;
    }
    
    .game-stats {
        flex-direction: column;
        gap: 8px;
        text-align: center;
        padding: 8px;
    }
    
    .game-stats > div {
        font-size: clamp(10px, 3vw, 12px);
        padding: 4px 8px;
        background: rgba(0, 0, 0, 0.2);
        border-radius: 4px;
    }
    
    .controls-container {
        flex-direction: column;
        gap: 8px;
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
    }
    
    button {
        width: 100%;
        max-width: 200px;
        font-size: 11px;
        padding: 12px 16px;
        min-height: 44px; /* iOS touch target minimum */
        margin: 0 auto;
        display: block;
    }
    
    #gameCanvas {
        max-width: calc(100vw - 16px);
        width: 100%;
        height: auto;
        border-radius: 6px;
        border-width: 1px;
    }
    
    h1 {
        font-size: clamp(8px, 4vw, 12px) !important;
        text-align: center;
        padding: 4px 8px;
        line-height: 1.3;
    }
    
    .dropdown button {
        font-size: 9px;
        padding: 6px 8px;
        min-height: 36px;
    }
    
    .dropdown-menu {
        font-size: 9px;
        min-width: 120px;
    }
}

/* Small Mobile Devices (481px - 600px) */
@media screen and (min-width: 481px) and (max-width: 600px) {
    .game-container {
        padding: 12px;
        gap: 14px;
    }
    
    .game-stats {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
        padding: 10px;
    }
    
    .game-stats > div {
        font-size: clamp(11px, 3vw, 13px);
        flex: 0 1 auto;
        min-width: 80px;
    }
    
    .controls-container {
        flex-wrap: wrap;
        max-width: 350px;
        gap: 8px;
        justify-content: center;
    }
    
    button {
        min-width: 70px;
        font-size: 11px;
        padding: 10px 14px;
        flex: 1 1 auto;
        max-width: 120px;
    }
    
    #gameCanvas {
        max-width: calc(100vw - 24px);
        border-radius: 8px;
    }
    
    h1 {
        font-size: clamp(10px, 3.5vw, 14px) !important;
    }
}

/* Standard Mobile/Tablet Portrait (601px - 768px) */
@media screen and (min-width: 601px) and (max-width: 768px) {
    .game-container {
        padding: 16px;
        gap: 16px;
    }
    
    .game-stats {
        flex-wrap: wrap;
        justify-content: space-around;
        gap: 12px;
        padding: 12px;
    }
    
    .game-stats > div {
        font-size: clamp(12px, 2.8vw, 15px);
        flex: 0 1 auto;
        min-width: 100px;
    }
    
    .controls-container {
        flex-wrap: wrap;
        max-width: 450px;
        gap: 10px;
    }
    
    button {
        min-width: 80px;
        font-size: 12px;
        padding: 11px 16px;
        flex: 0 1 auto;
    }
    
    #gameCanvas {
        max-width: calc(100vw - 32px);
        border-radius: 10px;
    }
    
    h1 {
        font-size: clamp(12px, 3vw, 16px) !important;
    }
}

/* Tablet Devices (769px - 1024px) */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .game-container {
        padding: 20px;
        gap: 20px;
        max-width: 900px;
    }
    
    .game-stats {
        gap: 16px;
        padding: 16px;
        justify-content: center;
    }
    
    .game-stats > div {
        font-size: clamp(14px, 2.5vw, 16px);
        min-width: 120px;
    }
    
    .controls-container {
        max-width: 550px;
        gap: 12px;
    }
    
    button {
        font-size: 13px;
        padding: 12px 18px;
        min-width: 90px;
    }
    
    #gameCanvas {
        max-width: 800px;
        border-radius: 12px;
    }
    
    h1 {
        font-size: clamp(16px, 2.8vw, 20px) !important;
    }
}

/* Desktop (1025px+) */
@media screen and (min-width: 1025px) {
    .game-container {
        padding: 24px;
        gap: 24px;
        max-width: 1200px;
    }
    
    .game-stats {
        gap: 20px;
        padding: 20px;
        justify-content: center;
    }
    
    .game-stats > div {
        font-size: clamp(16px, 2vw, 18px);
        min-width: 140px;
    }
    
    .controls-container {
        max-width: 700px;
        gap: 14px;
    }
    
    button {
        font-size: 14px;
        padding: 12px 20px;
        min-width: 100px;
    }
    
    #gameCanvas {
        max-width: 850px;
        border-radius: 12px;
    }
    
    h1 {
        font-size: clamp(18px, 2vw, 24px) !important;
    }
}

/* Landscape Orientation Optimizations */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .game-container {
        padding: 6px;
        gap: 8px;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: flex-start;
    }
    
    .game-stats {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
        justify-content: center;
        order: 2;
        width: 100%;
    }
    
    .game-stats > div {
        font-size: 9px;
        padding: 2px 6px;
        flex: 0 1 auto;
    }
    
    .controls-container {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 4px;
        justify-content: center;
        order: 3;
        width: 100%;
        max-width: none;
    }
    
    button {
        font-size: 9px;
        padding: 4px 8px;
        min-height: 32px;
        min-width: 60px;
        flex: 0 1 auto;
    }
    
    .canvas-container {
        order: 1;
        width: 100%;
        max-width: 70vw;
    }
    
    #gameCanvas {
        max-height: calc(100vh - 80px);
    }
    
    h1 {
        font-size: 10px !important;
        order: 0;
        width: 100%;
        text-align: center;
        margin-bottom: 4px;
    }
}

/* High DPI/Retina Display Optimizations */
@media screen and (-webkit-min-device-pixel-ratio: 2), 
       screen and (min-resolution: 192dpi) {
    #gameCanvas {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
    
    button {
        border-width: 0.5px;
    }
    
    .game-stats > div {
        text-shadow: 0.5px 0.5px 1px rgba(0, 0, 0, 0.3);
    }
}

/* Ultra-wide screens */
@media screen and (min-width: 1920px) {
    .game-container {
        max-width: 1400px;
        gap: 32px;
    }
    
    .game-stats > div {
        font-size: 20px;
    }
    
    button {
        font-size: 16px;
        padding: 14px 24px;
    }
}

/* Accessibility and reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    #gameCanvas {
        border-width: 3px;
        border-color: #000;
    }
    
    button {
        border-width: 2px;
        border-color: #000;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .game-stats > div {
        background: rgba(255, 255, 255, 0.1);
        color: #fff;
    }
}

/* ==============================
   Animation Enhancements
   ============================== */

/* Flip Animation */
@keyframes flip {
    0% {
        transform: rotateY(0deg);
    }
    100% {
        transform: rotateY(180deg);
    }
}

.flip {
    animation: flip 0.6s forwards;
}

/* Pulse Animation for Foundation Cards */
@keyframes pulse {
    0% {
        box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
    }
    50% {
        box-shadow: 0 0 5px rgba(255, 215, 0, 0.8);
    }
    100% {
        box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
    }
}

.pulse {
    animation: pulse 1.5s infinite;
}

/* ==============================
   Additional Adjustments
   ============================== */

/* Highlight card being dragged */
.dragging {
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.4);
    transform: scale(1.1);
    z-index: 5; /* Above all other elements */
}

/* Highlight valid drop zones */
.valid-drop {
    border: 2px dashed #00ff00;
}

/* ==============================
   Pop-up Message Styles
   ============================== */
.popup {
    background-color: #ffffff; /* White background */
    color: #000000; /* Black text */
    border: 1px solid #ccc; /* Light gray border */
    padding: 20px; /* Space inside the popup */
    border-radius: 8px; /* Rounded corners */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); /* Shadow for depth */
    position: fixed; /* Fixed position on the screen */
    top: 50%; /* Center vertically */
    left: 50%; /* Center horizontally */
    transform: translate(-50%, -50%); /* Adjust to perfectly center */
    z-index: 1000; /* Ensure it's above other elements */
    /* display: none; */ /* Removed to prevent conflict */
    max-width: 90%; /* Responsive width */
    text-align: center; /* Centered text */
}

/* OK Button Styles */
.popup-button {
    margin-top: 20px; /* Space above the button */
    padding: 10px 20px; /* Button padding */
    background-color: #4CAF50; /* Green background */
    color: white; /* White text */
    border: none; /* No border */
    border-radius: 5px; /* Rounded corners */
    cursor: pointer; /* Pointer cursor on hover */
    font-size: 16px; /* Font size */
}

.popup-button:hover {
    background-color: #45a049; /* Darker green on hover */
}

/* Hidden Class to Hide Elements */
.hidden {
    display: none; /* Completely hides the element */
}

/* ==============================
   Desktop-Specific Styles
   ============================== */

@media (min-width: 768px) {
    /* Position the controlButtons container above the game canvas */
    .game-container {
        position: relative; /* Establish a positioning context */
    }

    #controlButtons {
        position: absolute; /* Position absolutely within the game-container */
        top: 10px; /* Adjust this value to move buttons higher or lower */
        right: 50%; /* Center horizontally */
        transform: translateX(50%); /* Center alignment */
    }

    #controlButtons {
        margin-bottom: 0; /* Remove bottom margin */
    }
}


/* Buttons should stay visible below the canvas */
#controlButtons {
    margin-top: 10px;  /* Ensure some space between the canvas and buttons */
    position: relative;
    z-index: 2;  /* Keep them above the canvas */
    display: flex;
    justify-content: center;  /* Center buttons horizontally */
}

/* Adjust button size for desktop */
#controlButtons button {
    font-size: 16px;  /* Increase button font size */
    padding: 10px 20px;  /* Adjust padding for bigger buttons */
    background-color: #4CAF50; /* Green background */
    color: white !important; /* White text */
    border: 2px solid #45a049; /* Darker green border */
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5); /* Text shadow for better visibility */
}

#controlButtons button:hover {
    background-color: #45a049; /* Darker green on hover */
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

/* On mobile, make sure buttons are accessible and positioned well */
@media (max-width: 768px) {
    #controlButtons {
        position: static;  /* Allow normal flow in mobile layout */
        margin-top: 20px;  /* Add spacing on mobile as well */
    }

    #controlButtons button {
        font-size: 14px;  /* Smaller buttons on mobile */
        padding: 8px 16px;
        background-color: #4CAF50; /* Green background */
        color: white !important; /* White text */
        border: 2px solid #45a049; /* Darker green border */
        border-radius: 8px;
        cursor: pointer;
        font-weight: bold;
        text-shadow: 1px 1px 2px rgba(0,0,0,0.5); /* Text shadow for better visibility */
    }
}

/* Fix header authentication visibility */
#headerAuthContainer {
    color: white !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8) !important;
}

#headerAuthContainer * {
    color: white !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8) !important;
}

#headerAuthContainer button {
    background-color: rgba(76, 175, 80, 0.9) !important;
    border: 2px solid #45a049 !important;
    color: white !important;
    font-weight: bold !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8) !important;
}

#headerAuthContainer button:hover {
    background-color: rgba(69, 160, 73, 1) !important;
    transform: translateY(-1px);
}

/* Game Stats Styling */
#gameStats {
    display: flex;
    justify-content: center;
    gap: 20px;
}

#timerDisplay,
#movesDisplay,
#scoreDisplay,
#highScoreDisplay {
    font-family: 'Roboto', sans-serif !important;
    font-size: 16px !important;
    color: white !important;
    font-weight: bold !important;
}

/* Game Title */
.game-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 20px;
    color: #fff;
    text-align: center;
    margin: 5px 0;
    text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.3);
}


/* Adjust Game Canvas */
.canvas-container {
    flex-grow: 1;
    width: 100%;
    max-width: 1000px; /* Max width for desktop canvas */
    height: auto;
    position: relative; /* Allows for control buttons to be positioned relative */
}

#statsOverlay {
    z-index: 9999;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

/* Header and Stats Styling */
.solitaire-header {
    text-align: center;
    margin: 5px 0;
    padding: 0;
    font-size: 24px;
    font-family: 'Press Start 2P', cursive;
    color: #000;
    text-shadow: 2px 2px 0px rgba(255, 255, 255, 0.5);
}

/* Game Stats Container */
#gameStats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    padding: 5px 0;
    margin: 0;
    border-radius: 4px;
}

/* Individual Stat Items */
#timerDisplay,
#movesDisplay,
#scoreDisplay,
#highScoreDisplay {
    font-family: 'Press Start 2P', cursive;
    font-size: 12px;
    color: #000;
    padding: 5px;
    margin: 0;
    text-shadow: 1px 1px 0px rgba(255, 255, 255, 0.5);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .solitaire-header {
        font-size: 20px;
    }
    
    #timerDisplay,
    #movesDisplay,
    #scoreDisplay,
    #highScoreDisplay {
        font-size: 10px;
    }
}
/* Override Game Stats Styling */
#gameStats div,
#timerDisplay,
#movesDisplay,
#scoreDisplay,
#highScoreDisplay {
    font-family: 'Roboto', sans-serif !important;
    font-size: 18px !important;
    color: white !important;
    font-weight: bold !important;
    text-shadow: none !important;
}

.achievement-item {
    transform: translateY(0);
    transition: transform 0.2s ease-in-out;
}

.achievement-item:hover {
    transform: translateY(-2px);
}

.achievement-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 15px;
    animation: slideIn 0.5s ease-out;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.achievement-icon {
    font-size: 24px;
}

.achievement-text {
    display: flex;
    flex-direction: column;
}

.achievement-title {
    font-size: 12px;
    color: #ffd700;
}

.achievement-name {
    font-size: 16px;
    font-weight: bold;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Achievement Card Styles */
/* Achievement card base styles */
.achievement-card {
    transition: all 0.3s ease;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 0.5rem;
}

/* Unlocked achievement styles */
.achievement-earned {
    background: linear-gradient(to right, #dcfce7, #bbf7d0);
    border: 2px solid #4ade80;
    transform: scale(1);
    opacity: 1;
}

.achievement-earned:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(74, 222, 128, 0.2);
}

/* Locked achievement styles */
.achievement-locked {
    background: #f3f4f6;
    border: 2px solid #d1d5db;
    opacity: 0.6;
    filter: grayscale(1);
}

.achievement-locked:hover {
    opacity: 0.8;
    transform: translateY(-2px);
}

/* Progress Bar Animation */
@keyframes progressFill {
    from { width: 0; }
    to { width: var(--progress-width); }
}

#progressBar {
    animation: progressFill 1s ease-out forwards;
}

/* Achievement status indicators */
.achievement-earned {
    background-color: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
}

.achievement-locked {
    background-color: rgba(229, 231, 235, 0.5);
    border-color: rgba(229, 231, 235, 0.8);
}

#achievementsOverlay {
    /* Keep existing styles and add/update these */
    overflow: hidden; /* Hide overflow on the overlay */
}

#achievementsList {
    /* Add these new styles */
    max-height: 70vh; /* Take up 70% of the viewport height */
    overflow-y: auto; /* Enable vertical scrolling */
    padding-right: 16px; /* Add padding for scrollbar */
    scroll-behavior: smooth; /* Enable smooth scrolling */
}

/* Add styles for the scrollbar */
#achievementsList::-webkit-scrollbar {
    width: 8px;
}

#achievementsList::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

#achievementsList::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

#achievementsList::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Dropdown menu */
.dropdown-menu {
    display: none;
    min-width: 180px;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

/* Smooth animation for arrow */
.dropdown button svg {
    transition: transform 0.2s ease-in-out;
}

.dropdown:hover button svg {
    transform: rotate(180deg);
}

/* Active state for current game type */
.dropdown-menu a.active {
    background-color: #f3f4f6;
}

/* Ensure dropdown is always on top */
.dropdown {
    position: relative;
    z-index: 50;
}

/* Add to style.css */

/* Info Pages Specific Styles */
.info-page {
    min-height: 100vh;
    background: url('https://www.transparenttextures.com/patterns/asfalt-light.png') repeat, #228B22;
    background-size: 100px 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

.info-header {
    width: 100%;
    max-width: 800px;
    margin-bottom: 2rem;
}

.info-nav {
    background: rgba(0, 0, 0, 0.2);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.info-nav__link {
    color: white;
    text-decoration: none;
    font-family: 'Press Start 2P', cursive;
    padding: 0.5rem 1rem;
    margin: 0 0.5rem;
    transition: all 0.3s ease;
}

.info-title {
    font-family: 'Press Start 2P', cursive;
    color: white;
    text-align: center;
    margin: 2rem 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.info-content {
    width: 90%;
    max-width: 800px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    padding: 2rem;
    margin-bottom: 2rem;
}

.info-section__title {
    font-family: 'Press Start 2P', cursive;
    color: #228B22;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.info-section__text {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #333;
    margin-bottom: 1.5rem;
}

.info-section__list {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #333;
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.info-footer {
    width: 100%;
    text-align: center;
    margin-top: auto;
    padding: 2rem 0;
}

.info-footer__nav {
    margin-bottom: 1rem;
}

.info-footer__link {
    color: white;
    text-decoration: none;
    margin: 0 0.5rem;
}

.info-footer__copy {
    color: white;
    font-family: 'Roboto', sans-serif;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .info-content {
        width: 95%;
        padding: 1rem;
    }
    
    .info-title {
        font-size: 1.2rem;
    }
    
    .info-nav__link {
        display: block;
        margin: 0.5rem 0;
    }
}

/* Add to style.css */

/* Contact Page Specific Styles */
.contact-page .info-section {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
}

.contact-page .info-section__text {
    font-family: 'Roboto', sans-serif;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
    margin-bottom: 3rem;
    text-align: center;
}

/* Reset alignment for other pages */
.info-section {
    text-align: left;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.info-section__text {
    font-family: 'Roboto', sans-serif;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
    margin-bottom: 2rem;
    text-align: left;
}

.share-button {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: #3182ce; /* Tailwind's bg-blue-600 */
    color: #ffffff;
    border: none;
    border-radius: 0.5rem; /* Tailwind's rounded-lg */
    cursor: pointer;
    transition: background-color 0.3s;
}

.share-button:hover {
    background-color: #2c5282; /* Tailwind's hover:bg-blue-500 */
}
/* Remove box-shadow from the Facebook share button */
#facebookShareButton {
    box-shadow: none !important;
}