/* ============================================================
   JH Games — Portfolio Site
   ============================================================ */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #0a0a1a;
    color: #e0e0e8;
    font-family: 'Inter', system-ui, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ---- Background Canvas ---- */
#bg-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

/* ---- Header ---- */
header {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 72px 24px 32px;
}

.logo {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: clamp(2.8rem, 7vw, 5rem);
    letter-spacing: 0.12em;
    background: linear-gradient(135deg, #00c8ff, #7b2ff7, #ff2d95);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 6s ease infinite;
    text-shadow: none;
    filter: drop-shadow(0 0 30px rgba(123, 47, 247, 0.45))
            drop-shadow(0 0 60px rgba(0, 200, 255, 0.2));
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.subtitle {
    font-family: 'Orbitron', sans-serif;
    font-weight: 500;
    font-size: clamp(0.85rem, 2vw, 1.15rem);
    color: #8888aa;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    margin-top: 12px;
}

/* ---- Main ---- */
main {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 24px 48px;
}

/* ---- Games Grid ---- */
.games-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

@media (max-width: 960px) {
    .games-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 580px) {
    .games-grid { grid-template-columns: 1fr; }
}

/* ---- Game Card ---- */
.game-card {
    background: rgba(16, 16, 36, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: default;
}

.game-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 12px 40px rgba(123, 47, 247, 0.25),
                0 0 20px rgba(0, 200, 255, 0.1);
}

/* ---- Card Preview (gradient area) ---- */
.card-preview {
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.card-preview::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 50%, #0a0a1a 100%);
}

.preview-icon {
    font-size: 3.2rem;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 2px 12px rgba(0,0,0,0.5));
    opacity: 0.7;
}

/* Individual card gradients */
.throne-guard    { background: linear-gradient(135deg, #c9920a, #5c3d0e, #2a1a05); }
.realm-of-shadows { background: linear-gradient(135deg, #9b30ff, #3d0066, #12001f); }
.havoc           { background: linear-gradient(135deg, #00e5ff, #004d66, #001a22); }
.nitro-surge     { background: linear-gradient(135deg, #ff2d95, #660033, #1a000d); }
.pixel-dash      { background: linear-gradient(135deg, #ff4444, #ffaa00, #44ff44, #4488ff, #aa44ff); }
.random-song-player { background: linear-gradient(135deg, #00e676, #004d26, #001a0d); }

/* ---- Card Body ---- */
.card-body {
    padding: 20px 22px 24px;
}

.card-title {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: #ffffff;
    margin-bottom: 8px;
    letter-spacing: 0.04em;
}

.card-desc {
    font-size: 0.88rem;
    color: #9999b3;
    line-height: 1.5;
    margin-bottom: 18px;
    min-height: 42px;
}

/* ---- Play Button ---- */
.play-btn {
    display: inline-block;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.18em;
    color: #ffffff;
    background: linear-gradient(135deg, #7b2ff7, #00c8ff);
    padding: 10px 32px;
    border-radius: 8px;
    text-decoration: none;
    transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.play-btn:hover {
    box-shadow: 0 0 20px rgba(123, 47, 247, 0.5),
                0 0 40px rgba(0, 200, 255, 0.25);
    transform: scale(1.05);
}

.play-btn:active {
    transform: scale(0.97);
}

/* ---- Cloud Save Note ---- */
.cloud-note {
    text-align: center;
    margin-top: 48px;
    font-size: 0.85rem;
    color: #5a5a78;
    letter-spacing: 0.04em;
    padding: 14px 20px;
    border: 1px solid rgba(123, 47, 247, 0.15);
    border-radius: 10px;
    background: rgba(123, 47, 247, 0.04);
}

/* ---- Footer ---- */
footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 32px 24px 48px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.footer-text {
    font-size: 0.85rem;
    color: #5a5a78;
    margin-bottom: 16px;
}

.github-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #8888aa;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.github-link:hover {
    color: #ffffff;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0a0a1a;
}
::-webkit-scrollbar-thumb {
    background: #2a2a44;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #3a3a5a;
}
