/* Main Menu Styles */

#menu-screen {
    background: linear-gradient(135deg, #1a5f2a 0%, #0d3015 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

#menu-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23000000' fill-opacity='0.1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.menu-container {
    text-align: center;
    max-width: 600px;
    width: 100%;
    z-index: 1;
}

/* Menu App Icon */
.menu-app-icon {
    width: 120px;
    height: 120px;
    border-radius: 24px;
    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(201, 162, 39, 0.3);
    margin-bottom: 20px;
    object-fit: cover;
    animation: iconFloat 4s ease-in-out infinite;
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* Game Title */
.game-title {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(2rem, 7vw, 3.5rem);
    font-weight: bold;
    color: #fff;
    text-shadow:
        0 2px 0 #c9a227,
        0 4px 0 #a68520,
        0 6px 10px rgba(0, 0, 0, 0.4);
    margin-bottom: 10px;
    text-align: center;
}

.title-card {
    display: inline-block;
    width: 50px;
    height: 70px;
    background: linear-gradient(145deg, #fff 0%, #eee 100%);
    border-radius: 6px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    position: relative;
}

.title-card::after {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 30px;
}

.title-card.spade::after {
    content: '♠';
    color: #000;
}

.title-card.heart::after {
    content: '♥';
    color: #d40000;
}

.subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 40px;
    font-style: italic;
}

/* Game Selection Grid */
.game-selection {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 40px;
    width: 100%;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.game-btn {
    display: flex !important;
}

.game-btn {
    background: linear-gradient(145deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.05) 100%);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 25px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: white;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.game-btn:hover {
    transform: translateY(-5px);
    border-color: var(--ui-primary);
    background: linear-gradient(145deg, rgba(201,162,39,0.2) 0%, rgba(201,162,39,0.1) 100%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.game-btn:active {
    transform: translateY(-2px);
}

.game-icon {
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

/* Game Icons using card symbols */
.klondike-icon::before {
    content: '🃏';
}

.spider-icon::before {
    content: '🕷️';
}

.freecell-icon::before {
    content: '🎴';
}

.pyramid-icon::before {
    content: '🔺';
}

.tripeaks-icon::before {
    content: '⛰️';
}

.game-name {
    font-size: 1.3rem;
    font-weight: bold;
    color: #fff;
}

.game-desc {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Menu Bottom Buttons */
.menu-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.menu-btn {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    padding: 15px 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-size: 1rem;
}

.menu-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--ui-primary);
}

.btn-icon {
    font-size: 1.2rem;
}

/* Decorative Cards Animation */
.menu-container::before,
.menu-container::after {
    content: '';
    position: fixed;
    width: 100px;
    height: 140px;
    background: linear-gradient(145deg, #1e3a5f, #2a4a6f);
    border-radius: 8px;
    border: 3px solid #c9a227;
    opacity: 0.3;
    animation: floatCard 6s ease-in-out infinite;
}

.menu-container::before {
    top: 10%;
    left: 5%;
    transform: rotate(-15deg);
    animation-delay: -3s;
}

.menu-container::after {
    bottom: 10%;
    right: 5%;
    transform: rotate(15deg);
}

@keyframes floatCard {
    0%, 100% {
        transform: translateY(0) rotate(-15deg);
    }
    50% {
        transform: translateY(-20px) rotate(-10deg);
    }
}

/* Responsive Menu */
@media (max-width: 600px) {
    .game-selection {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .game-btn {
        padding: 20px 10px;
    }

    .game-icon {
        width: 50px;
        height: 50px;
        font-size: 30px;
    }

    .game-name {
        font-size: 1.1rem;
    }

    .title-card {
        width: 35px;
        height: 50px;
    }

    .title-card::after {
        font-size: 22px;
    }

    .menu-buttons {
        flex-direction: column;
        align-items: center;
    }

    .menu-btn {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }
}

@media (max-width: 400px) {
    .game-selection {
        grid-template-columns: 1fr;
    }

    .game-btn {
        flex-direction: row;
        text-align: left;
        justify-content: flex-start;
        padding: 15px 20px;
    }

    .game-icon {
        flex-shrink: 0;
    }

    .game-btn > :not(.game-icon) {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Game Options Modal - Klondike Draw Options etc */
#game-options-content {
    margin: 20px 0;
}

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

.option-group label {
    display: block;
    margin-bottom: 10px;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
}

.option-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.option-btn {
    padding: 12px 25px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.option-btn:hover {
    border-color: var(--ui-primary);
    background: rgba(201, 162, 39, 0.2);
}

.option-btn.selected {
    border-color: var(--ui-primary);
    background: var(--ui-primary);
    color: #000;
    font-weight: bold;
}

/* Continue Game Button (if game in progress) */
.continue-btn {
    background: linear-gradient(145deg, var(--ui-primary), #a68520);
    border: none;
    padding: 18px 40px;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: bold;
    color: #000;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(201, 162, 39, 0.4);
}

.continue-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(201, 162, 39, 0.5);
}
