/* =========================================================
   CyberSecPlayground - Page-Specific Styles v3.3
   ========================================================= */

/* =========================================================
   HERO
   ========================================================= */
.hero {
    position: relative;
    padding: clamp(2rem, 5vw, 4rem) 0 clamp(2.5rem, 5vw, 4rem);
    text-align: center;
    background: var(--grad-hero);
    background-size: 200% 200%;
    animation: heroGradient 20s ease infinite;
    overflow: hidden;
    border-bottom: 1px solid var(--border-subtle);
}
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(88, 166, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(88, 166, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 60% 60% at 50% 40%, black, transparent);
    -webkit-mask-image: radial-gradient(ellipse 60% 60% at 50% 40%, black, transparent);
    pointer-events: none;
}
@keyframes heroGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    gap: 0;
    width: 100%;
}

/* Hero badge */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.95rem 0.4rem 0.55rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    font-size: var(--fs-xs);
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 1.1rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    animation: fadeInDown 0.6s var(--ease-out) both;
    position: relative;
    overflow: hidden;
}
.hero-badge::before {
    content: "";
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(88, 166, 255, 0.15), transparent);
    animation: shimmerBadge 3s infinite;
}

.glow-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--success);
    position: relative;
    box-shadow: 0 0 10px var(--success);
    flex-shrink: 0;
}
.glow-dot::before,
.glow-dot::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--success);
    animation: glowPulse 2s ease-out infinite;
}
.glow-dot::after { animation-delay: 1s; }

/* Hero title */
.hero-title {
    font-size: var(--fs-display);
    font-weight: 900;
    line-height: 1.02;
    letter-spacing: -0.045em;
    margin-bottom: 1.25rem;
    animation: fadeInUp 0.7s var(--ease-out) 0.1s both;
    width: 100%;
    max-width: 1100px;
    margin-inline: auto;
    padding-inline: 0.5rem;
    text-wrap: balance;
}

@media (min-width: 1024px) {
    .hero-title {
        font-size: clamp(3.5rem, 6vw + 1rem, 6rem);
        max-width: 1200px;
        line-height: 1;
        letter-spacing: -0.05em;
    }
}

@media (min-width: 1440px) {
    .hero-title {
        font-size: clamp(4rem, 6vw, 7rem);
        max-width: 1300px;
    }
}

.glitch {
    position: relative;
    display: inline-block;
    color: var(--text-primary);
}
.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    overflow: hidden;
}
.glitch::before {
    color: #58a6ff;
    z-index: -1;
    animation: glitchShift 3s infinite linear alternate-reverse;
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
}
.glitch::after {
    color: #f0b429;
    z-index: -1;
    animation: glitchShift 2.5s infinite linear alternate-reverse;
    clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
}

.gradient-animated {
    background: linear-gradient(
        90deg,
        #58a6ff 0%, #79c0ff 25%, #f0b429 50%, #79c0ff 75%, #58a6ff 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientSlide 4s linear infinite;
}

/* Hero subtitle */
.hero-subtitle {
    font-size: clamp(0.95rem, 1.4vw + 0.85rem, 1.25rem);
    color: var(--text-tertiary);
    max-width: 720px;
    margin: 0 auto 1.75rem;
    line-height: 1.7;
    animation: fadeInUp 0.7s var(--ease-out) 0.2s both;
    padding-inline: 0.5rem;
    text-wrap: balance;
}

/* Hero chips */
.hero-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.45rem;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.7s var(--ease-out) 0.3s both;
    padding-inline: 0.5rem;
    max-width: 800px;
    margin-inline: auto;
}
.hero-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.85rem;
    background: var(--surface-1);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    font-size: var(--fs-xs);
    font-weight: 500;
    color: var(--text-secondary);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all var(--dur-base) var(--ease-out);
    cursor: default;
}
.hero-chip:hover {
    border-color: var(--border-accent);
    background: var(--surface-2);
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* Hero CTAs */
.hero-ctas {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2.25rem;
    animation: fadeInUp 0.7s var(--ease-out) 0.4s both;
    padding-inline: 0.5rem;
    width: 100%;
}

/* Hero stats */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(110px, 45%), 1fr));
    gap: 1rem;
    max-width: 720px;
    width: 100%;
    margin: 2.25rem auto 0;
    padding-top: 1.75rem;
    border-top: 1px solid var(--border-subtle);
    animation: fadeInUp 0.7s var(--ease-out) 0.6s both;
    padding-inline: 0.5rem;
}
.hero-stat { text-align: center; }
.hero-stat-value {
    font-size: clamp(1.4rem, 2vw + 1rem, 2rem);
    font-weight: 800;
    background: var(--grad-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    margin-bottom: 0.35rem;
    font-variant-numeric: tabular-nums;
}
.hero-stat-label {
    font-size: var(--fs-2xs);
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
}

/* =========================================================
   OFFER SECTION (compact)
   ========================================================= */
.offer-section {
    padding: clamp(2rem, 4vw, 3rem) 0;
}
.offer-section .section-header {
    margin-bottom: clamp(1.25rem, 2.5vw, 1.75rem);
}
.offer-grid {
    gap: clamp(0.85rem, 2vw, 1.25rem);
}
.offer-grid .card {
    padding: clamp(1.1rem, 2vw, 1.4rem);
}
.offer-grid .card-description {
    -webkit-line-clamp: 3;
    line-clamp: 3;
    margin-bottom: 0.75rem;
}

/* =========================================================
   PAGE HEADER (sub-pages)
   ========================================================= */
.page-header {
    padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(1.5rem, 3vw, 2rem);
    text-align: center;
    background: linear-gradient(135deg, #0d2b3e 0%, var(--bg-3) 100%);
    border-bottom: 1px solid var(--border-subtle);
}
.page-header h1 {
    font-size: var(--fs-h1);
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -0.03em;
    padding-inline: 0.5rem;
}
.page-header h1 span {
    background: var(--grad-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.page-header p {
    opacity: 0.8;
    margin-bottom: 1rem;
    max-width: 620px;
    margin-inline: auto;
    font-size: var(--fs-small);
    padding-inline: 0.5rem;
}
.back-link {
    display: inline-block;
    margin-top: 0.5rem;
    color: var(--accent);
    font-weight: 500;
    font-size: var(--fs-small);
}
.back-link::before { content: "← "; }

/* =========================================================
   ABOUT PAGE
   ========================================================= */
.about-hero {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}
.about-hero h2 {
    font-size: var(--fs-h2);
    margin-bottom: 1rem;
}
.about-hero p {
    font-size: var(--fs-body);
    color: var(--text-tertiary);
    line-height: 1.8;
    margin-bottom: 1rem;
}
.about-hero .highlight {
    color: var(--accent);
    font-weight: 600;
    background: linear-gradient(transparent 60%, var(--accent-soft) 60%);
    padding: 0 0.15em;
}

.about-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(140px, 45%), 1fr));
    gap: 0.75rem;
    margin-top: 2.5rem;
}

.about-stat-card {
    padding: 1.25rem 1rem;
    background: var(--bg-3);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    text-align: center;
    transition: all var(--dur-base) var(--ease-out);
}
.about-stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-accent);
    box-shadow: var(--shadow-md);
}
.about-stat-card .icon {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 0.4rem;
    transition: transform var(--dur-base) var(--ease-spring);
}
.about-stat-card:hover .icon { transform: scale(1.15) rotate(-5deg); }
.about-stat-card .number {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    background: var(--grad-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    margin-bottom: 0.3rem;
}
.about-stat-card .label {
    font-size: var(--fs-2xs);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}

/* =========================================================
   V2HIVE PAGE
   ========================================================= */
.v2hive-hero {
    text-align: center;
    padding: 1rem 0;
}
.v2hive-hero .logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    font-size: 2rem;
    background: var(--grad-gold);
    border-radius: var(--radius-xl);
    margin-bottom: 1rem;
    box-shadow: 0 8px 24px var(--secondary-glow);
    animation: float 3s ease-in-out infinite;
}

.protocol-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.protocol-card {
    position: relative;
    padding: clamp(1.25rem, 2vw, 1.5rem);
    background: var(--bg-3);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    transition: all var(--dur-base) var(--ease-out);
    overflow: hidden;
}
.protocol-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--dur-slow) var(--ease-out);
}
.protocol-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-accent);
    box-shadow: var(--shadow-lg);
}
.protocol-card:hover::before { transform: scaleX(1); }

.protocol-name {
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.protocol-name .protocol-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--accent);
}
.protocol-count {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    letter-spacing: -0.04em;
    margin-bottom: 0.5rem;
    font-variant-numeric: tabular-nums;
}
.protocol-file {
    font-family: var(--font-mono);
    font-size: var(--fs-2xs);
    padding: 0.2rem 0.55rem;
    background: var(--bg-4);
    border-radius: var(--radius-xs);
    color: var(--text-tertiary);
    display: inline-block;
    margin-bottom: 0.75rem;
    word-break: break-all;
}
.protocol-update {
    font-size: var(--fs-xs);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.country-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(150px, 45%), 1fr));
    gap: 0.75rem;
}
.country-card {
    position: relative;
    padding: 1rem 0.75rem;
    background: var(--bg-3);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    text-align: center;
    transition: all var(--dur-base) var(--ease-out);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
}
.country-card:hover {
    background: var(--bg-4);
    border-color: var(--secondary);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(240, 180, 41, 0.15);
    text-decoration: none;
}
.country-card .flag {
    font-size: 1.6rem;
    line-height: 1;
    transition: transform var(--dur-base) var(--ease-spring);
}
.country-card:hover .flag { transform: scale(1.15) rotate(5deg); }
.country-card .country-name {
    font-size: var(--fs-small);
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.country-card .country-code {
    font-family: var(--font-mono);
    font-size: var(--fs-2xs);
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.folder-tree {
    padding: clamp(1rem, 2vw, 1.5rem);
    background: var(--bg-0);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    line-height: 1.8;
    color: var(--text-secondary);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.folder-tree pre {
    margin: 0;
    white-space: pre;
    min-width: max-content;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
    gap: 1rem;
    counter-reset: step;
}
.step {
    position: relative;
    padding: 1.75rem 1.25rem 1.25rem;
    background: var(--bg-3);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    counter-increment: step;
    transition: all var(--dur-base) var(--ease-out);
}
.step::before {
    content: counter(step, decimal-leading-zero);
    position: absolute;
    top: -1px;
    left: 1rem;
    transform: translateY(-50%);
    padding: 0.2rem 0.7rem;
    background: var(--accent);
    color: var(--text-inverse);
    border-radius: var(--radius-full);
    font-family: var(--font-mono);
    font-size: var(--fs-2xs);
    font-weight: 700;
    letter-spacing: 0.05em;
}
.step:hover {
    transform: translateY(-4px);
    border-color: var(--border-accent);
    box-shadow: var(--shadow-md);
}
.step h4 {
    font-size: var(--fs-body);
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}
.step p {
    font-size: var(--fs-small);
    color: var(--text-tertiary);
    line-height: 1.7;
}
.step code {
    font-family: var(--font-mono);
    font-size: 0.85em;
    padding: 0.15rem 0.4rem;
    background: var(--bg-0);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xs);
    color: var(--accent);
}

.client-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
    gap: 0.6rem;
}
.client-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--bg-4);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    font-size: var(--fs-small);
    transition: all var(--dur-fast);
}
.client-item:hover {
    background: var(--bg-hover);
    border-color: var(--border-accent);
    transform: translateY(-2px);
}
.client-item .platform { font-size: 1.1rem; flex-shrink: 0; }

/* =========================================================
   404 PAGE
   ========================================================= */
.error-page {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(2rem, 5vw, 4rem) 1rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.error-page::before {
    content: "404";
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(10rem, 40vw, 25rem);
    font-weight: 900;
    color: rgba(88, 166, 255, 0.03);
    z-index: 0;
    line-height: 1;
    pointer-events: none;
    letter-spacing: -0.05em;
}
.error-page-inner {
    position: relative;
    z-index: 1;
    max-width: 520px;
    width: 100%;
}
.error-code {
    font-size: clamp(3.5rem, 15vw, 7rem);
    font-weight: 900;
    background: var(--grad-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    letter-spacing: -0.05em;
    margin-bottom: 1rem;
}
.error-page h1 {
    font-size: var(--fs-h2);
    margin-bottom: 0.75rem;
}
.error-page p {
    color: var(--text-tertiary);
    margin-bottom: 2rem;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 768px) {
    .hero-ctas { gap: 0.6rem; }
    .hero-ctas .btn-lg {
        padding: 0.75rem 1.25rem;
        font-size: var(--fs-small);
    }
    .hero-title { padding-inline: 0.25rem; }
    .hero-subtitle { padding-inline: 0.25rem; }
}

@media (max-width: 640px) {
    .hero-ctas {
        flex-direction: column;
        align-items: stretch;
        max-width: 340px;
        margin-inline: auto;
    }
    .hero-ctas .btn { width: 100%; }
    .hero-chips { gap: 0.35rem; }
    .hero-chip {
        font-size: 0.72rem;
        padding: 0.35rem 0.7rem;
    }
}

@media (max-width: 480px) {
    .page-header h1 { font-size: 1.5rem; }
    .protocol-count { font-size: 1.75rem; }
}

@media (max-width: 400px) {
    .hero-stats { grid-template-columns: repeat(2, 1fr); }
    .hero-chip { font-size: 0.68rem; padding: 0.3rem 0.6rem; }
}