@import url('fonts.css');

:root {
    --bg-main: #07090e;
    --bg-card: rgba(14, 17, 26, 0.85);
    --bg-card-hover: rgba(20, 25, 38, 0.96);
    --border-card: rgba(255, 255, 255, 0.1);
    --border-hover: rgba(0, 210, 255, 0.45);
    --portal-blue: #00d2ff;
    --portal-blue-glow: rgba(0, 210, 255, 0.35);
    --portal-orange: #ff7800;
    --portal-orange-glow: rgba(255, 120, 0, 0.35);
    --glass-blur: 6px; /* Configurable blur for everything behind the glass */
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    --font-heading: 'Space Grotesk', system-ui, sans-serif;
    --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
    --radius-lg: 16px;
    --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    color-scheme: dark;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    line-height: 1.6;
    position: relative;
}

/* Layer 0: High-Tech Blueprint Background Grid & CAD Schematics */
.blueprint-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    opacity: 0.95;
    transform: scale(1);
    transition: opacity 0.3s ease;
}

/* Layer 1: 3D Portal Gun Background & Animated Portal */
.orb-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1;
    filter: drop-shadow(0 0 10px rgba(0, 210, 255, 0.12));
    opacity: 0.98;
    transform: scale(1);
}

/* Layer 1.5: Glass Blur Layer (Blurs everything behind glass, customizable via --glass-blur) */
.glass-blur-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 2;
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    background: rgba(4, 6, 12, 0.05);
}

/* Layer 2: Rain & Condensation On Glass Overlay */
.rain-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 3;
    opacity: 0.98;
}

/* Layer 3: Ambient Glass Vignette */
.glass-vignette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 4;
    background: radial-gradient(circle at 50% 50%, rgba(7, 9, 14, 0) 0%, rgba(7, 9, 14, 0.42) 100%);
}

/* Layer 10: Interactive UI Content */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(7, 9, 14, 0.88);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border-card);
}

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

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 20px;
    letter-spacing: 0.5px;
}

.brand-portal-emblem {
    display: flex;
    align-items: center;
    position: relative;
    width: 26px;
    height: 26px;
}

.emblem-blue {
    position: absolute;
    width: 14px;
    height: 22px;
    border: 2.5px solid var(--portal-blue);
    border-radius: 50%;
    left: 0;
    box-shadow: 0 0 8px var(--portal-blue-glow);
}

.emblem-orange {
    position: absolute;
    width: 14px;
    height: 22px;
    border: 2.5px solid var(--portal-orange);
    border-radius: 50%;
    right: 0;
    box-shadow: 0 0 8px var(--portal-orange-glow);
}

.brand-name .blue { color: var(--portal-blue); }
.brand-name .orange { color: var(--portal-orange); }

.nav-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.nav-tool-btn {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: 8px;
    border: 1px solid var(--border-card);
    background: rgba(255, 255, 255, 0.04);
    transition: var(--transition);
}

.nav-tool-btn:hover {
    color: #fff;
    border-color: var(--portal-blue);
    background: rgba(0, 210, 255, 0.08);
}

.lang-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-card);
    color: var(--text-main);
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    color: #fff;
}

/* Page Header */
.page-header {
    position: relative;
    z-index: 10;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px 20px;
    text-align: center;
}

.page-title {
    font-family: var(--font-heading);
    font-size: clamp(28px, 4vw, 38px);
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.3px;
}

/* Games Grid */
.games-container {
    position: relative;
    z-index: 10;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 24px 70px;
    width: 100%;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 26px;
}

.game-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.game-card:hover {
    transform: translateY(-6px);
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 24px rgba(0, 210, 255, 0.2);
}

.game-media {
    position: relative;
    width: 100%;
    height: 195px;
    overflow: hidden;
    background: #0b0d13;
}

.game-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.game-card:hover .game-media img {
    transform: scale(1.05);
}

.game-body {
    padding: 22px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.game-title {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
}

.game-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.tag-pill {
    font-size: 11px;
    font-weight: 600;
    color: var(--portal-blue);
    background: rgba(0, 210, 255, 0.08);
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid rgba(0, 210, 255, 0.2);
}

.game-desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 22px;
    flex-grow: 1;
}

.game-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
}

.btn-play {
    flex: 1;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #06080d;
    background: linear-gradient(135deg, var(--portal-blue), #38bdf8);
    box-shadow: 0 4px 14px var(--portal-blue-glow);
    transition: var(--transition);
}

.btn-play:hover {
    filter: brightness(1.15);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 210, 255, 0.5);
}

.btn-privacy {
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    color: var(--text-muted);
    padding: 10px 14px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-card);
    transition: var(--transition);
    white-space: nowrap;
}

.btn-privacy:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Footer */
footer {
    position: relative;
    z-index: 10;
    border-top: 1px solid var(--border-card);
    background: rgba(7, 9, 14, 0.95);
    padding: 35px 24px;
    margin-top: auto;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.footer-links a {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--portal-blue);
}

.footer-copy {
    font-size: 12px;
    color: var(--text-dim);
}

/* Responsive Mobile Styles */
@media (max-width: 768px) {
    .nav-container {
        padding: 12px 16px;
        gap: 10px;
    }

    .brand {
        font-size: 18px;
        gap: 8px;
    }

    .nav-actions {
        gap: 8px;
    }

    .nav-tool-btn {
        font-size: 12px;
        padding: 6px 10px;
    }

    .lang-btn {
        padding: 6px 10px;
        font-size: 12px;
    }

    .page-header {
        padding: 24px 16px 12px;
    }

    .page-title {
        font-size: 26px;
    }

    .games-container {
        padding: 12px 16px 50px;
    }

    .games-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .game-media {
        height: 185px;
    }

    .game-body {
        padding: 18px;
    }

    .game-title {
        font-size: 20px;
    }

    .game-desc {
        font-size: 13.5px;
        line-height: 1.55;
        margin-bottom: 18px;
    }

    .game-actions {
        gap: 8px;
    }

    .btn-play {
        padding: 10px 14px;
        font-size: 12.5px;
    }

    .btn-privacy {
        padding: 10px 10px;
        font-size: 11.5px;
    }

    footer {
        padding: 26px 16px;
    }

    .footer-links {
        gap: 12px 16px;
        font-size: 12.5px;
    }

    .footer-copy-row {
        flex-direction: column;
        gap: 10px;
    }

    .secret-btn {
        position: static;
        transform: none;
        width: 36px;
        height: 36px;
    }

    .secret-btn:hover {
        transform: scale(1.1);
    }
}

.footer-copy-row {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
}

.secret-btn {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(14, 18, 28, 0.45);
    border: 1px solid rgba(0, 210, 255, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    opacity: 0.35;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 5px;
}

.secret-btn img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 6px rgba(0, 210, 255, 0.35));
    transition: transform 0.25s ease;
}

.secret-btn:hover {
    opacity: 0.95;
    transform: translateY(-50%) scale(1.15) rotate(12deg);
    border-color: var(--portal-blue);
    box-shadow: 0 0 16px rgba(0, 210, 255, 0.4);
}

.secret-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(4, 6, 12, 0.78);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 20px;
}

.secret-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.secret-modal-card {
    background: rgba(14, 18, 28, 0.96);
    border: 1px solid rgba(0, 210, 255, 0.4);
    border-radius: 24px;
    max-width: 420px;
    width: 100%;
    padding: 38px 28px 32px;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 35px rgba(0, 210, 255, 0.25);
    transform: scale(0.88) translateY(24px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.secret-modal-overlay.active .secret-modal-card {
    transform: scale(1) translateY(0);
}

.secret-modal-close {
    position: absolute;
    top: 14px;
    right: 18px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.secret-modal-close:hover {
    color: #fff;
}

.secret-modal-icon-wrap {
    width: 86px;
    height: 86px;
    margin: 0 auto 20px;
    animation: secretPulse 3s infinite ease-in-out;
}

@keyframes secretPulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 10px rgba(0, 210, 255, 0.4)); }
    50% { transform: scale(1.08); filter: drop-shadow(0 0 25px rgba(0, 210, 255, 0.85)); }
}

.secret-modal-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.secret-modal-title {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 12px;
    font-family: var(--font-heading);
    letter-spacing: -0.5px;
}

.secret-modal-desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 24px;
}

.secret-modal-action {
    padding: 10px 32px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--portal-blue), #38bdf8);
    color: #06080d;
    font-size: 14px;
    font-weight: 800;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px var(--portal-blue-glow);
    transition: var(--transition);
}

.secret-modal-action:hover {
    filter: brightness(1.15);
    transform: translateY(-1px);
}