/* ============================================
   GLOBAL & RESET
   ============================================ */
   * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #050505; /* Deep rich black */
    color: #ffffff;
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    cursor: default;
    -webkit-font-smoothing: antialiased;
    position: relative;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #000; }
::-webkit-scrollbar-thumb { background: #DAA520; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #FFD700; }

/* ============================================
   BACKGROUND: GOLDEN STARS
   ============================================ */
.starfield {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0; pointer-events: none;
}

.star {
    position: absolute;
    background: #FFD700;
    border-radius: 50%;
    box-shadow: 0 0 4px rgba(255, 215, 0, 0.4);
    animation: twinkle ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.2; transform: scale(0.8); }
    50% { opacity: 0.8; transform: scale(1.2); }
}

.shooting-star {
    position: fixed;
    width: 2px; height: 80px;
    background: linear-gradient(transparent, #FFD700, transparent);
    z-index: 0; pointer-events: none;
    animation: shoot linear infinite;
    opacity: 0;
}

@keyframes shoot {
    0% { opacity: 0; transform: translateX(0) translateY(0) rotate(-35deg); }
    5% { opacity: 1; }
    15% { opacity: 0; }
    100% { opacity: 0; transform: translateX(-500px) translateY(500px) rotate(-35deg); }
}

/* ============================================
   TOP ACTIONS (Share & Version)
   ============================================ */
.top-actions {
    position: fixed;
    top: 1.5rem; right: 1.5rem;
    z-index: 1000;
    display: flex; gap: 1rem;
}

.action-btn {
    position: relative;
    background: rgba(20, 20, 20, 0.8);
    border: 1px solid rgba(218, 165, 32, 0.3);
    color: rgba(255, 255, 255, 0.8);
    padding: 0.6rem 1.2rem;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    display: flex; align-items: center; gap: 0.5rem;
}

.action-btn:hover {
    background: rgba(30, 30, 30, 0.9);
    border-color: #FFD700;
    color: #FFD700;
    box-shadow: 0 4px 15px rgba(218, 165, 32, 0.15);
    transform: translateY(-2px);
}

.new-badge {
    position: absolute;
    top: -2px; right: -2px;
    width: 10px; height: 10px;
    background: #FFD700;
    border-radius: 50%;
    box-shadow: 0 0 10px #FFD700;
    animation: pulseGold 2s infinite;
}

@keyframes pulseGold {
    0% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(255, 215, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0); }
}

/* ============================================
   MODALS (Changelog & Share)
   ============================================ */
.modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex; justify-content: center; align-items: center;
    opacity: 0; visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.active { opacity: 1; visibility: visible; }
.modal.closing { opacity: 0; }

.modal-content {
    background: #111;
    border: 1px solid rgba(218, 165, 32, 0.4);
    border-radius: 16px;
    padding: 2.5rem;
    max-width: 600px; width: 90%; max-height: 80vh;
    overflow-y: auto; position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), 0 0 30px rgba(218, 165, 32, 0.05);
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal.active .modal-content { transform: translateY(0); }

.modal-content h2 {
    font-size: 1.8rem; margin-bottom: 1.5rem;
    color: #FFD700; font-weight: 700; letter-spacing: 1px;
}

.close-modal {
    position: absolute;
    top: 1.2rem; right: 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff; width: 35px; height: 35px;
    border-radius: 50%; cursor: pointer;
    font-size: 1rem; transition: all 0.3s ease;
}

.close-modal:hover {
    background: rgba(218, 165, 32, 0.2);
    border-color: #FFD700; color: #FFD700;
    transform: rotate(90deg);
}

/* Changelog Items */
.version-item {
    background: rgba(20, 20, 20, 0.6);
    border-left: 3px solid #DAA520;
    border-radius: 0 8px 8px 0;
    padding: 1.2rem; margin-bottom: 1rem;
    transition: background 0.3s ease;
}
.version-item:hover { background: rgba(30, 30, 30, 0.8); }
.version-header { display: flex; justify-content: space-between; margin-bottom: 0.5rem; }
.version-number { font-weight: 700; color: #FFD700; }
.version-date { font-size: 0.8rem; color: rgba(255, 255, 255, 0.4); }
.version-title { font-weight: 600; margin-bottom: 0.3rem; font-size: 1.1rem; }
.version-text { color: rgba(255, 255, 255, 0.6); font-size: 0.95rem; line-height: 1.5; }

/* Share Grid */
.text-center { text-align: center; }
.share-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem; margin-top: 1rem;
}
.share-option {
    display: flex; flex-direction: column; align-items: center; gap: 0.8rem;
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.05);
    padding: 1.2rem 1rem; border-radius: 12px;
    color: #fff; text-decoration: none; cursor: pointer;
    transition: all 0.3s ease;
}
.share-option:hover {
    background: rgba(218, 165, 32, 0.1); border-color: #FFD700;
    transform: translateY(-3px); box-shadow: 0 5px 15px rgba(218, 165, 32, 0.1);
}
.share-icon { font-size: 1.8rem; }

/* Toast */
.toast {
    position: fixed; bottom: -100px; left: 50%; transform: translateX(-50%);
    background: #FFD700; color: #000; font-weight: 600;
    padding: 1rem 2rem; border-radius: 30px;
    box-shadow: 0 5px 20px rgba(218, 165, 32, 0.4);
    transition: bottom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10000;
}
.toast.show { bottom: 40px; }

/* ============================================
   MAIN LAYOUT
   ============================================ */
.container { position: relative; z-index: 1; max-width: 1400px; margin: 0 auto; padding: 2rem; }

.header { text-align: center; padding: 4rem 1rem 2rem; display: flex; align-items: center; justify-content: center; gap: 2rem; flex-wrap: wrap; }
.side-gif { height: clamp(50px, 8vw, 90px); border-radius: 10px; filter: drop-shadow(0 0 10px rgba(218, 165, 32, 0.2)); transition: all 0.3s ease; cursor: pointer; }
.side-gif:hover { transform: scale(1.1); filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.4)); }

.logo-wrapper { display: flex; flex-direction: column; align-items: center; }
.logo {
    display: inline-block; font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 900;
    letter-spacing: 2px; cursor: pointer; text-decoration: none;
    /* Gold Shimmer Effect */
    background: linear-gradient(to right, #B8860B 20%, #FFD700 40%, #FFF8D6 50%, #FFD700 60%, #B8860B 80%);
    background-size: 200% auto;
    color: #000; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
    animation: shine 4s linear infinite;
    transition: transform 0.3s ease;
}
@keyframes shine { to { background-position: 200% center; } }
.logo:hover { transform: scale(1.05); text-shadow: 0 0 20px rgba(255, 215, 0, 0.2); }
.logo:active { transform: scale(0.98); }

.subtitle {
    font-size: 1rem; color: rgba(218, 165, 32, 0.7);
    margin-top: 0.8rem; font-weight: 400; letter-spacing: 0.2em;
}

.gold-separator {
    height: 1px; width: 100%; max-width: 800px; margin: 2rem auto;
    background: linear-gradient(90deg, transparent, rgba(218, 165, 32, 0.3), transparent);
}

/* ============================================
   GAME CARDS
   ============================================ */
.game-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem; padding: 2rem 0; position: relative; z-index: 2;
}

.game-card {
    background: #0a0a0a;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px; overflow: hidden;
    cursor: pointer; text-decoration: none; color: inherit;
    transition: all 0.4s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    opacity: 0; transform: translateY(30px);
    animation: cardAppear 0.6s ease forwards;
}

@keyframes cardAppear { to { opacity: 1; transform: translateY(0); } }

.game-card:hover {
    transform: translateY(-8px);
    border-color: #DAA520;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(218, 165, 32, 0.15);
}

.game-card-image-wrapper { position: relative; overflow: hidden; border-bottom: 1px solid rgba(255,255,255,0.02); }
.game-card-image { width: 100%; aspect-ratio: 16/10; object-fit: cover; transition: transform 0.6s ease; }
.game-card:hover .game-card-image { transform: scale(1.08); }

.game-card-image-wrapper::after {
    content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 60px;
    background: linear-gradient(transparent, #0a0a0a); pointer-events: none;
}

.game-card-body { padding: 1.5rem; }
.game-card-title {
    font-size: 1.25rem; font-weight: 600; color: #eee;
    transition: color 0.3s ease; margin-bottom: 0.8rem;
}
.game-card:hover .game-card-title { color: #FFD700; }

.play-indicator {
    display: inline-flex; align-items: center; gap: 0.4rem;
    color: #DAA520; font-weight: 500; font-size: 0.9rem;
    opacity: 0; transform: translateX(-10px); transition: all 0.3s ease;
}
.game-card:hover .play-indicator { opacity: 1; transform: translateX(0); }

/* ============================================
   EASTER EGG & FOOTER
   ============================================ */
.easter-egg-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 99999;
    display: none; justify-content: center; align-items: center;
    background: #000; pointer-events: none;
}
.easter-egg-overlay.active { display: flex; animation: pulseBlackGold 1s infinite alternate; }

@keyframes pulseBlackGold {
    0% { background: rgba(0,0,0,0.9); }
    100% { background: rgba(30, 20, 0, 0.95); }
}

.easter-egg-text {
    font-size: 5rem; font-weight: 900; color: #FFD700;
    text-shadow: 0 0 40px rgba(255, 215, 0, 0.6);
    animation: easterBounce 0.5s ease-in-out infinite alternate;
}
@keyframes easterBounce {
    from { transform: scale(1); }
    to { transform: scale(1.2); }
}

.footer {
    text-align: center; padding: 2rem; color: rgba(255, 255, 255, 0.3);
    font-size: 0.85rem; transition: color 0.3s ease;
}
.footer:hover { color: #DAA520; }

/* Click Ripple */
.click-ripple {
    position: fixed; border-radius: 50%;
    background: radial-gradient(rgba(255, 215, 0, 0.4), transparent);
    pointer-events: none; z-index: 9999;
    animation: rippleOut 0.6s ease-out forwards;
}
@keyframes rippleOut {
    from { width: 0; height: 0; opacity: 1; transform: translate(-50%, -50%); }
    to { width: 150px; height: 150px; opacity: 0; transform: translate(-50%, -50%); }
}

/* Gold Particles */
.gold-particle {
    position: fixed; pointer-events: none; z-index: 9999;
    background: #FFD700; border-radius: 50%;
    animation: explode 0.8s ease-out forwards;
}
@keyframes explode {
    0% { opacity: 1; transform: translate(0, 0) scale(1); }
    100% { opacity: 0; transform: translate(var(--tx), var(--ty)) scale(0); }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    .header { padding: 5rem 0.5rem 1.5rem; gap: 1rem; }
    .side-gif { height: clamp(35px, 6vw, 55px); }
    .logo { font-size: clamp(2rem, 5vw, 2.5rem); }
    .top-actions { top: 1rem; right: 1rem; gap: 0.5rem; }
    .action-btn { padding: 0.5rem 0.8rem; font-size: 0.75rem; }
    .game-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
    .modal-content { padding: 1.5rem; }
}