/* ============================================
   AllInGamesZone.com — Hardcore Cyberpunk Theme
   Deep Black, Neon Highlights, Clip Paths
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@500;700;900&family=Roboto+Mono:wght@400;500;700&display=swap');

:root {
    --bg-dark: #0B0C10;
    /* Abyss black */
    --bg-panel: #1F2833;
    /* Deep gray-blue */
    --bg-input: #12161D;
    --neon-yellow: #FBEA10;
    /* Cyber yellow */
    --neon-pink: #FF107A;
    /* Magenta */
    --neon-cyan: #00F0FF;
    /* Electric blue */
    --neon-green: #39FF14;
    /* Matrix green */
    --neon-red: #FF003C;
    /* Alert red */
    --text-main: #C5C6C7;
    /* Light industrial gray */
    --text-bright: #FFFFFF;

    --font-heading: 'Orbitron', sans-serif;
    --font-ui: 'Roboto Mono', monospace;

    --clip-angle: polygon(0 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%);
    --clip-angle-reverse: polygon(20px 0, 100% 0, 100% 100%, 0 100%, 0 20px);
    --clip-button: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);

    --glow-cyan: 0 0 10px rgba(0, 240, 255, 0.4), 0 0 20px rgba(0, 240, 255, 0.2);
    --glow-pink: 0 0 10px rgba(255, 16, 122, 0.4), 0 0 20px rgba(255, 16, 122, 0.2);
    --glow-yellow: 0 0 15px rgba(251, 234, 16, 0.5);

    --max-w: 1200px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

/* Grid / Scanline Background */
body {
    background-color: var(--bg-dark);
    background-image:
        linear-gradient(rgba(0, 240, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    color: var(--text-main);
    font-family: var(--font-ui);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Subtle moving scanline overlay */
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.25) 51%);
    background-size: 100% 4px;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.4;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 900;
    color: var(--text-bright);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

a {
    color: var(--neon-cyan);
    text-decoration: none;
    transition: 0.2s;
}

a:hover {
    color: var(--neon-pink);
    text-shadow: var(--glow-pink);
}

.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Top Bar --- */
.topbar {
    border-bottom: 2px solid var(--neon-cyan);
    background: rgba(11, 12, 16, 0.9);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 900;
    box-shadow: 0 4px 20px rgba(0, 240, 255, 0.1);
}

.topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--text-bright);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-shadow: var(--glow-cyan);
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--neon-cyan);
    clip-path: polygon(10px 0, 100% 0, 100% 22px, 22px 100%, 0 100%, 0 10px);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--bg-dark);
    font-size: 1.2rem;
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: inline-block;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--neon-cyan);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--neon-cyan);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
    left: 0;
    right: auto;
}

.nav-links a.active {
    color: var(--neon-cyan);
    text-shadow: var(--glow-cyan);
}

/* --- Hero (Glitch) --- */
.hero {
    padding: 80px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(255, 16, 122, 0.08) 0%, transparent 60%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, rgba(0, 240, 255, 0.06) 0%, transparent 60%);
    pointer-events: none;
}

.sys-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    background: var(--bg-panel);
    color: var(--neon-yellow);
    padding: 4px 12px;
    border-left: 3px solid var(--neon-yellow);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 20px;
    font-weight: 700;
}

.glitch-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
    color: var(--text-bright);
    text-shadow: 2px 0 var(--neon-cyan), -2px 0 var(--neon-pink);
}

/* Subtle static glitch effect on title */
.glitch-title::before,
.glitch-title::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch-title::before {
    left: 2px;
    text-shadow: -1px 0 var(--neon-red);
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

.glitch-title::after {
    left: -2px;
    text-shadow: -1px 0 var(--neon-cyan);
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim 2.5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% {
        clip: rect(42px, 9999px, 44px, 0);
    }

    20% {
        clip: rect(12px, 9999px, 59px, 0);
    }

    40% {
        clip: rect(48px, 9999px, 34px, 0);
    }

    60% {
        clip: rect(89px, 9999px, 14px, 0);
    }

    80% {
        clip: rect(22px, 9999px, 98px, 0);
    }

    100% {
        clip: rect(74px, 9999px, 2px, 0);
    }
}

@keyframes glitch-anim-2 {
    0% {
        clip: rect(65px, 9999px, 100px, 0);
    }

    20% {
        clip: rect(89px, 9999px, 34px, 0);
    }

    40% {
        clip: rect(2px, 9999px, 54px, 0);
    }

    60% {
        clip: rect(33px, 9999px, 86px, 0);
    }

    80% {
        clip: rect(98px, 9999px, 22px, 0);
    }

    100% {
        clip: rect(14px, 9999px, 79px, 0);
    }
}

.hero p {
    font-size: 1.1rem;
    max-width: 650px;
    color: var(--text-main);
    margin-bottom: 40px;
}

.hero-nav {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-nav a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(0, 240, 255, 0.3);
    padding: 12px 24px;
    color: var(--neon-cyan);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    background: rgba(0, 240, 255, 0.05);
    clip-path: var(--clip-button);
    transition: all 0.2s;
}

.hero-nav a:hover {
    background: var(--neon-cyan);
    color: var(--bg-dark);
    box-shadow: var(--glow-cyan);
}

/* --- Cyber Panel (Tool Container) --- */
.cyber-panel {
    background: var(--bg-panel);
    border: 1px solid #33414E;
    margin: 60px 0;
    position: relative;
    clip-path: var(--clip-angle);
    padding: 40px;
    transition: all 0.3s ease;
}

.cyber-panel:hover {
    border-color: rgba(255, 16, 122, 0.5);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(255, 16, 122, 0.05);
}

.cyber-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 40px;
    background: var(--neon-pink);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 20px;
}

.panel-title {
    display: flex;
    align-items: center;
    gap: 16px;
}

.panel-icon {
    font-size: 2rem;
    color: var(--neon-pink);
    text-shadow: var(--glow-pink);
}

.panel-title h2 {
    font-size: 1.8rem;
    margin: 0;
}

.panel-title p {
    font-size: 0.85rem;
    color: var(--text-main);
    margin-top: 4px;
}

.panel-id {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.05);
}

/* --- Forms --- */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--neon-cyan);
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
}

.form-label span {
    color: var(--text-main);
    font-weight: 400;
    font-size: 0.7rem;
}

input[type="number"],
input[type="text"],
select {
    background: var(--bg-input);
    border: 1px solid #33414E;
    color: var(--text-bright);
    padding: 14px 16px;
    font-family: var(--font-ui);
    font-size: 1rem;
    border-left: 4px solid #33414E;
    transition: 0.3s;
    clip-path: var(--clip-button);
    appearance: none;
    -webkit-appearance: none;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--neon-cyan);
    border-left-color: var(--neon-cyan);
    box-shadow: inset 0 0 10px rgba(0, 240, 255, 0.1);
}

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23C5C6C7' stroke-width='2' stroke-linecap='square'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
    cursor: pointer;
}

/* Radio Grid for Hardware Selection */
.radio-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.radio-box {
    position: relative;
}

.radio-box input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.radio-label {
    display: block;
    padding: 12px;
    text-align: center;
    border: 1px solid #33414E;
    background: var(--bg-input);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
    clip-path: var(--clip-button);
    color: var(--text-main);
}

.radio-box input:checked~.radio-label {
    border-color: var(--neon-green);
    background: rgba(57, 255, 20, 0.1);
    color: var(--neon-green);
    box-shadow: inset 0 0 10px rgba(57, 255, 20, 0.2);
}

.radio-box input:hover:not(:checked)~.radio-label {
    border-color: var(--neon-cyan);
}

/* --- Action Button --- */
.btn-cyber {
    width: 100%;
    padding: 18px;
    border: none;
    background: var(--neon-pink);
    color: var(--bg-dark);
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    cursor: pointer;
    clip-path: var(--clip-angle-reverse);
    position: relative;
    z-index: 1;
    transition: 0.3s;
}

.btn-cyber::before {
    content: '';
    position: absolute;
    inset: 2px;
    background: var(--bg-dark);
    clip-path: var(--clip-angle-reverse);
    z-index: -1;
    transition: 0.3s;
}

.btn-cyber span {
    background: linear-gradient(90deg, var(--neon-pink), var(--neon-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn-cyber:hover {
    background: var(--neon-cyan);
    box-shadow: var(--glow-cyan);
}

.btn-cyber:hover::before {
    background: rgba(0, 240, 255, 0.1);
}

.btn-cyber:active {
    transform: scale(0.98);
}

/* --- Result HUD --- */
.hud-box {
    margin-top: 30px;
    border: 1px solid var(--neon-cyan);
    background: rgba(0, 240, 255, 0.05);
    padding: 30px;
    position: relative;
    clip-path: var(--clip-angle);
    display: none;
}

.hud-box.visible {
    display: block;
    animation: hudBoot 0.4s steps(6, end) forwards;
}

@keyframes hudBoot {
    0% {
        opacity: 0;
        clip-path: inset(100% 0 0 0);
    }

    30% {
        opacity: 1;
        clip-path: inset(0 40% 0 0);
    }

    60% {
        clip-path: inset(0 0 60% 0);
    }

    100% {
        clip-path: var(--clip-angle);
    }
}

.hud-box::after {
    content: 'SYSTEM.OUT';
    position: absolute;
    bottom: 5px;
    right: 20px;
    font-size: 0.65rem;
    color: var(--neon-cyan);
    opacity: 0.5;
    letter-spacing: 0.2em;
}

.hud-main {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    color: var(--text-bright);
    text-shadow: var(--glow-cyan);
    line-height: 1;
    margin-bottom: 10px;
}

.hud-sub {
    font-size: 1rem;
    color: var(--neon-cyan);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 20px;
}

.hud-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-top: 24px;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
    padding-top: 24px;
}

.hud-stat {
    background: var(--bg-input);
    padding: 16px;
    border-left: 2px solid var(--text-main);
}

.hud-stat .stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-main);
    margin-bottom: 8px;
}

.hud-stat .stat-val {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--text-bright);
}

.hud-stat.danger {
    border-left-color: var(--neon-red);
}

.hud-stat.danger .stat-val {
    color: var(--neon-red);
    text-shadow: 0 0 10px rgba(255, 0, 60, 0.5);
}

.hud-stat.warning {
    border-left-color: var(--neon-yellow);
}

.hud-stat.warning .stat-val {
    color: var(--neon-yellow);
    text-shadow: var(--glow-yellow);
}

.hud-stat.good {
    border-left-color: var(--neon-green);
}

.hud-stat.good .stat-val {
    color: var(--neon-green);
    text-shadow: 0 0 10px rgba(57, 255, 20, 0.5);
}

/* Progress Bar (Bottleneck) */
.meter {
    height: 12px;
    background: var(--bg-input);
    margin: 10px 0;
    border: 1px solid #33414E;
    position: relative;
    overflow: hidden;
}

.meter-fill {
    height: 100%;
    width: 0;
    background: repeating-linear-gradient(45deg, var(--neon-green), var(--neon-green) 10px, rgba(57, 255, 20, 0.7) 10px, rgba(57, 255, 20, 0.7) 20px);
    transition: width 1s ease-out, background 0.3s;
}

.meter-fill.warn {
    background: repeating-linear-gradient(45deg, var(--neon-yellow), var(--neon-yellow) 10px, rgba(251, 234, 16, 0.7) 10px, rgba(251, 234, 16, 0.7) 20px);
}

.meter-fill.crit {
    background: repeating-linear-gradient(45deg, var(--neon-red), var(--neon-red) 10px, rgba(255, 0, 60, 0.7) 10px, rgba(255, 0, 60, 0.7) 20px);
}

.hud-msg {
    margin-top: 20px;
    font-size: 0.9rem;
    padding: 16px;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    color: var(--text-main);
    background: rgba(0, 0, 0, 0.3);
}

.hud-msg strong {
    color: var(--text-bright);
}

/* --- Ads (Hologram placeholders) --- */
.ad-hologram {
    background: repeating-linear-gradient(0deg, rgba(0, 240, 255, 0.02) 0px, rgba(0, 240, 255, 0.02) 2px, transparent 2px, transparent 4px), rgba(11, 12, 16, 0.8);
    border: 1px solid var(--neon-cyan);
    box-shadow: inset 0 0 20px rgba(0, 240, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--neon-cyan);
    font-family: var(--font-heading);
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 0.8;
    margin: 40px 0;
    min-height: 120px;
    padding: 10px;
    position: relative;
    clip-path: var(--clip-angle);
}

.ad-hologram::before {
    content: 'AD_SYS_LINK';
    position: absolute;
    top: 4px;
    left: 8px;
    font-size: 0.5rem;
    opacity: 0.5;
    font-family: var(--font-ui);
}

/* --- Footer --- */
.foot-zone {
    border-top: 2px solid var(--neon-pink);
    background: #07080A;
    padding: 60px 0 30px;
    margin-top: 80px;
}

.foot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.foot-col h4 {
    color: var(--text-bright);
    font-size: 1.1rem;
    margin-bottom: 20px;
    border-bottom: 1px solid #33414E;
    padding-bottom: 10px;
    display: inline-block;
}

.foot-links {
    list-style: none;
}

.foot-links li {
    margin-bottom: 12px;
}

.foot-links a {
    font-size: 0.9rem;
    color: var(--text-main);
}

.foot-links a:hover {
    color: var(--neon-pink);
    text-shadow: var(--glow-pink);
    padding-left: 8px;
}

.foot-bot {
    text-align: center;
    border-top: 1px solid #33414E;
    padding-top: 20px;
    font-size: 0.8rem;
    color: #5B6B7A;
}

/* --- Subpages --- */
.content-sys {
    background: var(--bg-panel);
    border: 1px solid #33414E;
    padding: 40px;
    border-left: 4px solid var(--neon-green);
    margin: 60px 0;
}

.content-sys h2 {
    color: var(--neon-green);
    font-size: 1.5rem;
    margin-bottom: 20px;
    margin-top: 30px;
}

.content-sys h2:first-child {
    margin-top: 0;
}

.content-sys p,
.content-sys li {
    font-size: 1rem;
    margin-bottom: 16px;
    color: var(--text-main);
}

.content-sys ul {
    padding-left: 20px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    /* Mobile nav hidden for pure tool focus on simple build */
    .hero {
        padding: 40px 0;
    }

    .glitch-title {
        font-size: 2.2rem;
    }

    .cyber-panel {
        padding: 24px;
        clip-path: none;
        border-radius: 8px;
    }

    .radio-grid {
        grid-template-columns: 1fr;
    }

    .hud-box {
        padding: 20px;
        clip-path: none;
        border-radius: 8px;
    }

    .hud-main {
        font-size: 2rem;
    }
}