/* Reset e base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
    overflow-x: hidden;
}
/* Lock scroll when mobile menu open */
body.menu-open { overflow: hidden; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header e Navigation */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-brand h1 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #667eea;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link.active {
    color: #667eea;
    font-weight: 600;
}

.nav-link.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
}

.hero-content {
    text-align: center;
    color: white;
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    opacity: 0;
    animation: fadeInUp 1s ease forwards;
}

.gradient-text {
    background: linear-gradient(45deg, #ffd89b 0%, #19547b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    opacity: 0;
    animation: fadeInUp 1s ease 0.2s forwards;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeInUp 1s ease 0.4s forwards;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.btn-primary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.btn-download {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

/* Hero Background */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 6s ease-in-out infinite;
}

.shape-1 {
    width: 100px;
    height: 100px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 150px;
    height: 150px;
    top: 60%;
    right: 10%;
    animation-delay: 2s;
}

.shape-3 {
    width: 80px;
    height: 80px;
    top: 40%;
    left: 70%;
    animation-delay: 4s;
}

/* Sections */
section {
    padding: 5rem 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* About Section */
.about {
    background: #f8f9fa;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: #555;
    line-height: 1.8;
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.stat {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.stat:hover {
    transform: translateY(-5px);
}

.stat i {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.stat h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.stat p {
    color: #666;
}

/* Games Section */
.games {
    background: white;
    padding: 6rem 0;
}

/* Games Hero Section */
.games-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 8rem 0 6rem;
    color: white;
    text-align: center;
}

.games-hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.games-hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 3rem;
    opacity: 0.9;
}

.games-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.game-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 500;
}

.game-stat i {
    font-size: 1.5rem;
    color: #ffd700;
}

.games-grid {
    display: grid;
    grid-template-columns: 1fr;
    max-width: 1000px;
    margin: 0 auto;
    gap: 4rem;
}

/* Separated stats bar for games page */
.games-stats-bar {
    background: #f6f8ff; /* diverso dallo sfondo successivo */
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    margin-bottom: 2.5rem; /* stacco dal primo gioco */
}
.games-stats-bar .games-stats {
    white-space: nowrap; /* stessa riga */
    gap: 2rem;
}
.games-stats-bar .games-stats .game-stat i { color: #6b8afd; }
.games-stats-bar .games-stats .game-stat span { color: #333; }

.game-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    min-height: 500px;
}

/* Preview allineata come gli altri: nessun offset verticale extra */

/* Fullscreen layout for M.U.L.E. */
#muleCard.mule-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 2000;
    margin: 0;
    border-radius: 0;
    grid-template-columns: 60% 40%;
}

#muleCard.mule-fullscreen .game-preview {
    height: 100%;
}

#muleCard.mule-fullscreen #muleCanvas {
    width: 95% !important;
    height: auto !important;
    max-height: calc(100vh - 160px);
}

#muleCard.mule-fullscreen .game-info {
    overflow: auto;
}

#muleCard.mule-fullscreen .mule-stats-list {
    max-height: 40vh;
}

#muleCard.mule-fullscreen .mule-market {
    margin-top: 10px;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
}

.game-preview {
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Utility: uniform black preview box */
.preview-box {
    display: grid;
    place-items: center;
    background: #0f0f0f;
    height: 240px;
}

/* Overlay that doesn't intercept pointer events */
.overlay-muted { pointer-events: none; }

/* Focus visibility for keyboard users */
:focus-visible { outline: 3px solid #6b8afd; outline-offset: 2px; }

/* Back-link fixed used in Flappy */
.back-link-fixed {
    position: fixed;
    left: 12px;
    top: 108px;
    z-index: 10;
    text-decoration: none;
    color: #e8eefc;
    font-weight: 600;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.06);
}

#snakeCanvas {
    border-radius: 10px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    background: #000;
    max-width: 100%;
    height: auto;
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end; /* sposta il contenuto più in basso */
    padding-bottom: 28px; /* distanza dal bordo inferiore */
    color: white;
    opacity: 1;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.game-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.game-overlay i {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: pulse 2s infinite;
}

.game-overlay p {
    font-size: 1.2rem;
    margin: 0;
}

.game-info {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.game-info h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.game-info p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.game-features {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #f8f9fa;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #555;
}

.feature i {
    color: #667eea;
}

.game-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.game-controls .btn {
    transition: all 0.3s ease;
}

.reset-section {
    display: none;
    text-align: center;
    padding: 1rem;
    background: rgba(255, 0, 0, 0.1);
    border: 2px dashed #ff4444;
    border-radius: 12px;
    margin-top: 1rem;
}

.reset-section.show {
    display: block;
    animation: fadeInScale 0.5s ease;
}

.reset-message {
    color: #ff4444;
    font-weight: 600;
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
}

#resetBtn {
    background: #ff4444 !important;
    color: white !important;
    border: 2px solid #ff4444 !important;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(255, 68, 68, 0.3);
}

#resetBtn:hover {
    background: #ff6666 !important;
    border-color: #ff6666 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 68, 68, 0.4);
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.game-score {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
}

.score-item {
    text-align: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    font-weight: 500;
}

/* Game Instructions */
.game-instructions {
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border-radius: 12px;
    border-left: 4px solid #2196f3;
}

.game-instructions h4 {
    color: #1976d2;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.game-instructions ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.game-instructions li {
    padding: 0.5rem 0;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.3);
}

.game-instructions li:last-child {
    border-bottom: none;
}

.game-instructions li::before {
    content: '🎯';
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.game-instructions strong {
    color: #1976d2;
}

/* M.U.L.E. specific styles - Retro 80s Theme */
.mule-game {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border: 3px solid #0f3460;
    border-radius: 10px;
    padding: 20px;
    font-family: 'Courier New', monospace;
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.2);
}

.mule-game h3 {
    color: #00ff41;
    text-shadow: 0 0 10px #00ff41;
    font-size: 24px;
    text-align: center;
    margin-bottom: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.mule-game p {
    color: #00ffff;
    text-align: center;
    margin-bottom: 20px;
    font-size: 14px;
}

#muleCanvas {
    border: 2px solid #00ff41;
    background: #000000;
    box-shadow: 0 0 20px #00ff41;
    border-radius: 5px;
    display: block;
    margin: 0 auto;
}

.mule-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.mule-controls .btn {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 12px;
    padding: 8px 16px;
    border: 2px solid;
    border-radius: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(45deg, #1a1a2e, #16213e);
    color: #00ff41;
    border-color: #00ff41;
    text-shadow: 0 0 5px #00ff41;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
}

.mule-controls .btn:hover {
    background: linear-gradient(45deg, #00ff41, #00cc33);
    color: #000000;
    box-shadow: 0 0 20px #00ff41;
    transform: translateY(-2px);
}

.mule-controls .btn-warning {
    color: #ffff00;
    border-color: #ffff00;
    text-shadow: 0 0 5px #ffff00;
    box-shadow: 0 0 10px rgba(255, 255, 0, 0.3);
}

.mule-controls .btn-warning:hover {
    background: linear-gradient(45deg, #ffff00, #cccc00);
    color: #000000;
    box-shadow: 0 0 20px #ffff00;
}

.mule-selection {
    text-align: center;
    margin: 15px 0;
    padding: 15px;
    background: linear-gradient(135deg, #0a0a1a, #1a1a2e);
    border: 2px solid #00ffff;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.mule-selection h4 {
    color: #00ffff;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    margin-bottom: 10px;
    text-shadow: 0 0 5px #00ffff;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.mule-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    max-width: 400px;
    margin: 0 auto;
}

.mule-btn {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 11px;
    padding: 8px 12px;
    border: 2px solid #666;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(45deg, #2a2a3e, #1a1a2e);
    color: #cccccc;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.mule-btn:hover {
    border-color: #00ff41;
    color: #00ff41;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
    transform: translateY(-1px);
}

.mule-btn.selected {
    border-color: #00ff41;
    color: #00ff41;
    background: linear-gradient(45deg, #003300, #001a00);
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.7);
    text-shadow: 0 0 5px #00ff41;
}

.mule-stats {
    background: linear-gradient(135deg, #0a0a1a, #1a1a2e);
    border: 2px solid #00ffff;
    border-radius: 5px;
    padding: 15px;
    margin-top: 15px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #00ffff;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.mule-stats h4 {
    color: #ffff00;
    text-align: center;
    margin-bottom: 10px;
    text-shadow: 0 0 5px #ffff00;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.mule-player-info {
    margin: 5px 0;
    padding: 5px;
    border-left: 3px solid;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
}

.mule-stats-list {
    max-height: 160px;
    overflow: auto;
    padding-right: 6px;
}

.mule-stats-list .row {
    display: grid;
    grid-template-columns: 1fr 2fr auto;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    border-bottom: 1px solid rgba(0,255,255,0.15);
}

.mule-stats-list .row:last-child {
    border-bottom: none;
}

.mule-stats-list .name {
    min-width: 110px;
    color: #ffff00;
}

.mule-stats-list .vals {
    color: #9ee;
}

.mule-stats-list .score {
    color: #fff;
    font-weight: 700;
}

.mule-current-player {
    background: rgba(0, 255, 65, 0.1);
    border-left-color: #00ff41;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.2);
}

.mule-instructions {
    background: linear-gradient(135deg, #1a0a1a, #2e1a1a);
    border: 2px solid #ff6b6b;
    border-radius: 5px;
    padding: 15px;
    margin-top: 15px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: #ffcccc;
    box-shadow: 0 0 10px rgba(255, 107, 107, 0.3);
}

.mule-instructions h4 {
    color: #ff6b6b;
    text-align: center;
    margin-bottom: 10px;
    text-shadow: 0 0 5px #ff6b6b;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.mule-instructions ul {
    padding-left: 20px;
}

.mule-instructions li {
    margin: 3px 0;
    color: #ffcccc;
}

.mule-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.mule-btn:hover {
    border-color: #667eea;
    background: #f8f9ff;
    transform: translateY(-1px);
}

.mule-btn.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.mule-btn i {
    font-size: 1rem;
}

#muleCanvas {
    border: 2px solid #333;
    border-radius: 8px;
    cursor: pointer;
    background: #2d3748;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

#muleCanvas:hover {
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

#mulePlayBtn, #muleResetBtn {
    transition: all 0.3s ease;
    margin: 0.25rem;
}

#mulePlayBtn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    font-weight: 600;
}

#mulePlayBtn:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

#muleResetBtn {
    background: #6c757d;
    color: white;
    border: none;
    font-weight: 600;
}

#muleResetBtn:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

#muleSkipBtn {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
    border: none;
    font-weight: 600;
    transition: all 0.3s ease;
    margin: 0.25rem;
}

#muleSkipBtn:hover {
    background: linear-gradient(135deg, #138496 0%, #117a8b 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(23, 162, 184, 0.3);
}

/* Games Preview Section */
.games-preview {
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    padding: 6rem 0;
}

.games-preview-content {
    text-align: center;
}

.games-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.game-preview-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.game-preview-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.game-icon {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.game-preview-card h3 {
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.game-preview-card p {
    color: #666;
    font-size: 0.95rem;
}

.games-cta {
    margin-top: 3rem;
}

.btn-large {
    font-size: 1.2rem;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
    animation: pulse 2s infinite;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    border: none !important;
    text-decoration: none !important;
}

.btn-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    animation: none;
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%) !important;
    color: white !important;
}

.games-features {
    margin-top: 1rem;
    color: #666;
    font-size: 0.95rem;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Minesweeper specific styles */
#mineCanvas {
    border: 2px solid #333;
    border-radius: 8px;
    cursor: pointer;
    background: #f0f0f0;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

#mineCanvas:hover {
    border-color: #007bff;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

#minePlayBtn {
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 1rem 2rem;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

#minePlayBtn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s;
}

#minePlayBtn:hover::before {
    left: 100%;
}

#minePlayBtn:hover {
    background: linear-gradient(135deg, #218838 0%, #1ea384 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.5);
}

#minePlayBtn:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

@keyframes minePulse {
    0% {
        transform: scale(1);
        box-shadow: 0 6px 20px rgba(40, 167, 69, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 8px 25px rgba(40, 167, 69, 0.5);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 6px 20px rgba(40, 167, 69, 0.3);
    }
}

#minePlayBtn {
    animation: minePulse 2s ease-in-out infinite;
}

#minePlayBtn:hover {
    animation: none;
}

.score-item span:last-child {
    color: #667eea;
    font-weight: 700;
    font-size: 1.2rem;
}

/* prefers-reduced-motion: reduce animations globally */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Downloads Section */
.downloads {
    background: white;
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 3rem;
    font-style: italic;
}

.downloads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto 3rem;
}

.download-card {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
    position: relative;
    overflow: hidden;
}

.download-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.download-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.download-icon {
    font-size: 4rem;
    color: #667eea;
    margin-bottom: 1.5rem;
}

.download-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.download-card p {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.download-info {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.file-size,
.file-tech {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #f8f9fa;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #666;
}

.file-tech {
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    color: #667eea;
    font-weight: 500;
}

.tech-info {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #f0f0f0;
}

.tech-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    font-weight: 500;
    color: #555;
    transition: all 0.3s ease;
}

.tech-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.tech-badge i {
    font-size: 1.2rem;
    color: #667eea;
}

/* Personal Battles Section */
.battles {
    background: #f8f9fa;
}

.battles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.battle-category {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.battle-category:hover {
    transform: translateY(-5px);
}

.battle-header {
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: white;
    position: relative;
}

.battle-header.serious {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.battle-header.light {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    color: #333;
}

.battle-header i {
    font-size: 2rem;
}

.battle-header h3 {
    font-size: 1.8rem;
    margin: 0;
    font-weight: 600;
}

.battle-content {
    padding: 2rem;
}

.battle-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #f0f0f0;
}

.battle-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.battle-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #667eea;
    font-size: 1.5rem;
}

.battle-text h4 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    color: #333;
    font-weight: 600;
}

.battle-text p {
    color: #666;
    line-height: 1.7;
    font-size: 1rem;
}

.battles-footer {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    margin-top: 2rem;
}

.battles-footer p {
    font-size: 1.1rem;
    color: #555;
    font-style: italic;
    margin: 0;
}

.battles-footer em {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 500;
}

/* Contact Section */
.contact {
    background: #f8f9fa;
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #333;
}

.contact-info p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
}

.contact-methods {
    display: grid;
    gap: 1rem;
}

.contact-method {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.contact-method i {
    color: #667eea;
    font-size: 1.2rem;
}

.email-link {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.email-link:hover {
    color: #667eea;
}

.copy-btn {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
    margin-left: 0.5rem;
}

.copy-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Footer */
.footer {
    background: #333;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-brand h3 {
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-brand p {
    color: #ccc;
}

.footer-links {
    display: flex;
    gap: 2rem;
    justify-content: flex-end;
    align-items: center;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: none;
    color: #999;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 2rem;
        transition: left 0.3s ease;
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

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

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .game-card {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .game-preview {
        min-height: 300px;
    }

    .game-info {
        padding: 2rem;
    }

    .game-controls {
        flex-direction: column;
    }

    .reset-section {
        margin-top: 0.5rem;
        padding: 1.5rem 1rem !important;
        background: rgba(255, 0, 0, 0.15) !important;
        border: 3px solid #ff4444 !important;
        border-radius: 15px !important;
    }

    .reset-section.show {
        display: block !important;
        animation: mobileFlash 1s ease-in-out infinite alternate;
    }

    .reset-message {
        font-size: 1.2rem !important;
        color: #ff0000 !important;
        font-weight: 700 !important;
        margin-bottom: 1.5rem !important;
        text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    }

    #resetBtn {
        background: linear-gradient(45deg, #ff4444, #ff6666) !important;
        color: white !important;
        border: 3px solid #ff0000 !important;
        font-weight: 700 !important;
        font-size: 1.1rem !important;
        padding: 1rem 2rem !important;
        box-shadow: 0 4px 15px rgba(255, 0, 0, 0.5) !important;
        min-height: 60px !important;
        width: 100% !important;
    }

    #resetBtn:hover, #resetBtn:active, #resetBtn:focus {
        background: linear-gradient(45deg, #ff6666, #ff8888) !important;
        border-color: #ff2222 !important;
        transform: scale(1.05) !important;
        box-shadow: 0 6px 20px rgba(255, 0, 0, 0.7) !important;
    }

    @keyframes mobileFlash {
        0% { background: rgba(255, 0, 0, 0.15); }
        100% { background: rgba(255, 0, 0, 0.25); }
    }

    /* Minesweeper mobile styles */
    #mineCanvas {
        width: 100% !important;
        height: auto !important;
        max-width: 350px !important;
        aspect-ratio: 1;
    }

    #minePlayBtn {
        width: 100% !important;
        margin: 0.5rem 0 !important;
        min-height: 48px !important;
        font-size: 16px !important;
    }

    /* M.U.L.E. mobile styles */
    #muleCanvas {
        width: 100% !important;
        height: auto !important;
        max-width: 350px !important;
    }

    .mule-buttons {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
    }

    .mule-btn {
        justify-content: center !important;
        min-height: 48px !important;
        font-size: 16px !important;
    }

    #mulePlayBtn, #muleResetBtn {
        width: 100% !important;
        margin: 0.5rem 0 !important;
        min-height: 48px !important;
        font-size: 16px !important;
    }

    #muleSkipBtn {
        width: 100% !important;
        margin: 0.5rem 0 !important;
        min-height: 48px !important;
        font-size: 16px !important;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    /* Games Preview Mobile */
    .games-showcase {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .games-hero-content h1 {
        font-size: 2.5rem;
    }

    .games-stats {
        gap: 1.5rem;
    }

    .game-stat {
        font-size: 1rem;
    }

    .btn-large {
        font-size: 1rem;
        padding: 0.8rem 2rem;
    }

    .footer-links {
        justify-content: center;
    }

    .contact-method {
        flex-direction: column;
        text-align: center;
    }

    .copy-btn {
        margin-left: 0;
        margin-top: 0.5rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .container {
        padding: 0 15px;
    }

    .download-card {
        padding: 2rem 1.5rem;
    }

    .downloads-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .battles-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .battle-item {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .battle-icon {
        align-self: center;
    }

    .battle-header {
        padding: 1.5rem;
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .battle-content {
        padding: 1.5rem;
    }

    .tech-info {
        gap: 1rem;
    }

    .tech-badge {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }
}
