:root {
    /* Global Colors */
    --bg-color: #0d0d0d;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    
    /* Euchre Colors */
    --euchre-main: #4D58BC;
    --euchre-accent: #909BFD;
    --euchre-dark: #2a316b;

    /* Solitaire Colors */
    --solitaire-red: #340710;
    --solitaire-lite-red: #b45465;
    --solitaire-lite-blue: #6291aa;
    --solitaire-dark-blue: #1b436f;

    /* Slots Colors */
    --slots-green-main: #053305;
    --slots-green-accent: #2ecc71;
    --slots-green-dark: #001a00;

    /* Football Colors */
    --football-main: #5C3A21;
    --football-accent: #E69A53;
    --football-dark: #2A1608;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Header */
.main-header {
    background-color: rgba(0,0,0,0.8);
    padding: 1rem;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #333;
}

.main-logo {
    max-height: 60px;
    width: auto;
}

/* Hero */
.hero {
    text-align: center;
    padding: 5rem 2rem;
    margin: 2rem 1rem;
    /* Faint pink cloud background with dark overlay */
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.6)), url('backgroundpinkcloud1024x768.png');
    background-size: cover;
    background-position: center;
    border: 4px solid #fff;
    box-shadow: 
        0 0 0 4px #000, /* Outer black border */
        0 10px 20px rgba(0,0,0,0.5); /* Drop shadow */
    position: relative;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    border-radius: 12px;
}

/* Banner "ribbon" effect (pseudo-elements could be added here for tails, but keeping it clean for mobile) */

.hero h1 {
    font-family: 'Rye', serif; /* Casino/Western Font */
    font-size: 3.5rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    line-height: 1.1;
    color: #fff;
    text-shadow: 
        3px 3px 0 #000,
        -1px -1px 0 #000,  
        1px -1px 0 #000,
        -1px  1px 0 #000,
        1px  1px 0 #000;
    letter-spacing: 2px;
}

.hero p {
    font-family: 'Rowdies', sans-serif;
    font-size: 1.4rem;
    color: #FFD700; /* Gold text */
    text-transform: uppercase;
    text-shadow: 2px 2px 0 #000;
    background-color: rgba(0,0,0,0.85);
    padding: 0.8rem 1.5rem;
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 50px;
    display: inline-block;
    letter-spacing: 1px;
    margin-top: 1rem;
    transform: rotate(-2deg); /* Fun jaunty angle */
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

/* Games Container */
.games-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem 1.5rem 4rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Game Cards */
.game-card {
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transition: transform 0.2s ease;
    border: 2px solid rgba(255,255,255,0.1);
    display: flex;
    flex-direction: column;
}

.action-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.game-card:active {
    transform: scale(0.98);
}

.card-content {
    padding: 2rem;
    text-align: center;
    background: rgba(0,0,0,0.2); /* Darker glass effect */
    backdrop-filter: blur(5px);
}

.game-icon img {
    max-width: 120px;
    height: auto;
    margin-bottom: 1rem;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3));
}

.game-card h2 {
    font-family: 'Rye', serif; /* Casino/Western Font */
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: #fff !important; /* Force white */
    text-transform: none; 
    letter-spacing: 2px;
    text-shadow: 
        3px 3px 0 #000,
       -1px -1px 0 #000,  
        1px -1px 0 #000,
       -1px  1px 0 #000,
        1px  1px 0 #000;
}

.game-desc {
    font-family: 'Rowdies', sans-serif;
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: #fceeb5; /* Creamy off-white/gold */
    font-weight: 300;
    text-shadow: 2px 2px 0 #000;
    letter-spacing: 0.5px;
    line-height: 1.4;
}

/* Theme Specific Styles */

/* Euchre Theme */
.euchre-theme {
    background: linear-gradient(135deg, var(--euchre-main), var(--euchre-dark));
    border: 1px solid var(--euchre-accent);
}
.btn-euchre {
    background-color: var(--euchre-accent);
    color: #fff;
    box-shadow: 0 4px 15px rgba(77, 88, 188, 0.4);
}

/* Solitaire Theme */
.solitaire-theme {
    background: linear-gradient(135deg, var(--solitaire-red), var(--solitaire-dark-blue));
    border: 1px solid var(--solitaire-lite-red);
}
.btn-solitaire {
    background-color: var(--solitaire-lite-red);
    color: #fff;
    box-shadow: 0 4px 15px rgba(180, 84, 101, 0.4);
}

/* Slots Theme */
.slots-theme {
    background: linear-gradient(135deg, var(--slots-green-main), var(--slots-green-dark));
    border: 1px solid var(--slots-green-accent);
}
.slots-theme h2 {
    color: #fff;
}
.btn-slots {
    background-color: var(--slots-green-accent);
    color: #fff;
    font-weight: 800;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}

/* Football Theme */
.football-theme {
    background: linear-gradient(135deg, var(--football-main), var(--football-dark));
    border: 1px solid var(--football-accent);
}
.btn-football {
    background-color: var(--football-accent);
    color: #fff;
    box-shadow: 0 4px 15px rgba(230, 154, 83, 0.4);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    transition: all 0.3s ease;
    width: 100%; /* Full width on mobile */
    max-width: 300px;
}

.btn:hover {
    filter: brightness(1.2);
    transform: translateY(-2px);
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-size: 0.9rem;
    margin-top: auto;
}

footer a {
    color: #888;
    text-decoration: none;
}

/* Media Queries */
@media (min-width: 768px) {
    .games-container {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    .game-card {
        flex: 1 1 300px; /* Cards sit side by side on desktop */
        max-width: 350px;
    }
}

/* Custom Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    padding-top: calc(1rem + env(safe-area-inset-top));
    padding-bottom: calc(1rem + env(safe-area-inset-bottom));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: linear-gradient(135deg, #1a1a1a, #0d0d0d);
    border: 2px solid #FFD700;
    border-radius: 20px;
    padding: 2rem 1.5rem;
    max-width: 420px;
    width: 100%;
    max-height: calc(100vh - 2rem);
    max-height: calc(100dvh - 2rem);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    text-align: center;
    position: relative;
    box-shadow: 0 15px 40px rgba(0,0,0,0.8), 0 0 20px rgba(255, 215, 0, 0.2);
    transform: translateY(-20px) scale(0.95);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal.show .modal-content {
    transform: translateY(0) scale(1);
}

.close-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    color: rgba(255,255,255,0.7);
    font-size: 1.8rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
    line-height: 1;
    z-index: 10;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.close-btn:hover,
.close-btn:active {
    color: #FFD700;
    background: rgba(255,255,255,0.2);
}

.modal-content h2 {
    font-family: 'Rye', serif;
    font-size: 2rem;
    color: #fff;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 0 #000;
    letter-spacing: 1px;
}

.modal-content p {
    font-family: 'Rowdies', sans-serif;
    color: #fceeb5;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    font-weight: 300;
    line-height: 1.5;
}

.apk-instructions p {
    text-align: left;
    margin-bottom: 0.8rem;
    font-size: 1rem;
}

.modal-action-btn {
    background-color: #FFD700;
    color: #000;
    border: none;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
    cursor: pointer;
    touch-action: manipulation;
}

.modal-action-btn:hover {
    background-color: #fff;
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.5);
    color: #000;
}

/* PWA Dismiss Button */
.pwa-dismiss-btn {
    display: block;
    width: 100%;
    margin-top: 1.2rem;
    padding: 14px 20px;
    background: linear-gradient(135deg, #FFD700, #B8860B);
    color: #000;
    font-family: 'Rowdies', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    border: 2px solid #FFD700;
    border-radius: 50px;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 0 #8c6e14;
    transition: transform 0.1s, filter 0.15s;
}
.pwa-dismiss-btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.pwa-dismiss-btn:active { transform: translateY(2px); box-shadow: none; opacity: 0.9; }

/* Mobile Modal Tweaks */
@media (max-width: 480px) {
    .modal-content {
        padding: 1.2rem;
        border-radius: 16px;
        max-width: 100%;
    }
    .modal-content h2 { font-size: 1.4rem; }
    .pwa-modal .trust-item { font-size: 0.72rem; padding: 8px 6px; }
    .pwa-modal .install-steps { padding: 0.8rem 1rem; }
    .pwa-modal .install-steps ol { font-size: 0.85rem; }
}

