/* ============================================
   Pink Horizon - Gamemode Subpages
   ENHANCED Edition
   ============================================ */

/* ── Hero Banner ──────────────────────────── */
.gm-hero {
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 140px 20px 80px;
    position: relative;
    overflow: hidden;
}

.gm-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 40%, var(--gm-glow, rgba(255,105,180,0.12)) 0%, transparent 55%),
        radial-gradient(ellipse at 70% 60%, rgba(168,85,247,0.08) 0%, transparent 50%);
    pointer-events: none;
    animation: heroGlowShift 8s ease-in-out infinite alternate;
}

@keyframes heroGlowShift {
    0% { opacity: 1; transform: scale(1); }
    100% { opacity: 0.7; transform: scale(1.05); }
}

/* Animated grid overlay */
.gm-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 105, 180, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 105, 180, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridScroll 20s linear infinite;
    pointer-events: none;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

@keyframes gridScroll {
    0% { transform: translate(0, 0); }
    100% { transform: translate(60px, 60px); }
}

.gm-hero-content {
    position: relative;
    z-index: 1;
}

.gm-hero-icon {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, var(--pink), var(--purple));
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 2rem;
    margin: 0 auto 24px;
    box-shadow:
        0 10px 40px rgba(255, 105, 180, 0.35),
        0 0 0 1px rgba(255, 105, 180, 0.1);
    animation: heroIconFloat 4s ease-in-out infinite;
    transition: transform 0.3s ease;
}

.gm-hero-icon:hover {
    transform: scale(1.1) rotate(5deg);
}

@keyframes heroIconFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-8px) rotate(2deg); }
    75% { transform: translateY(4px) rotate(-1deg); }
}

.gm-hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 900;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--pink), var(--pink-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleReveal 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

@keyframes titleReveal {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
        filter: blur(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

.gm-hero .tagline {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
    animation: titleReveal 1s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
}

.gm-hero .feature-tags {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    animation: titleReveal 1s cubic-bezier(0.16, 1, 0.3, 1) 0.6s both;
}

.gm-hero .feature-tags span {
    background: rgba(255, 105, 180, 0.08);
    border: 1px solid rgba(255, 105, 180, 0.2);
    color: var(--pink-light);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: default;
}

.gm-hero .feature-tags span:hover {
    background: rgba(255, 105, 180, 0.15);
    border-color: rgba(255, 105, 180, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 105, 180, 0.15);
}

/* ── Back Link ────────────────────────────── */
.gm-back {
    position: absolute;
    top: 90px;
    left: 20px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    z-index: 2;
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid transparent;
}

.gm-back:hover {
    color: var(--pink);
    background: rgba(255, 105, 180, 0.05);
    border-color: rgba(255, 105, 180, 0.15);
    transform: translateX(-3px);
}

/* ── Content Sections ─────────────────────── */
.gm-section {
    padding: 90px 0;
    position: relative;
    z-index: 1;
}

.gm-section.alt {
    background: var(--bg-secondary);
}

/* Section separator line */
.gm-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--pink), var(--purple));
    border-radius: 2px;
    opacity: 0.5;
}

.gm-section:first-of-type::before {
    display: none;
}

.gm-section-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.gm-section-title .accent {
    background: linear-gradient(135deg, var(--pink), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gm-section-sub {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 45px;
    max-width: 700px;
    line-height: 1.7;
}

/* ── Feature Grid ─────────────────────────── */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
}

/* Shimmer sweep on hover */
.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 105, 180, 0.04),
        transparent
    );
    transition: none;
    pointer-events: none;
}

.feature-card:hover::before {
    animation: shimmerSweep 0.8s ease forwards;
}

@keyframes shimmerSweep {
    from { left: -100%; }
    to { left: 200%; }
}

/* Mouse-follow glow */
.feature-card::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 105, 180, 0.08) 0%, transparent 70%);
    pointer-events: none;
    left: var(--mouse-x, 50%);
    top: var(--mouse-y, 50%);
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card:hover::after {
    opacity: 1;
}

.feature-card > * {
    position: relative;
    z-index: 1;
}

.feature-card:hover {
    border-color: rgba(255, 105, 180, 0.3);
    transform: translateY(-6px);
    box-shadow:
        0 15px 40px rgba(255, 105, 180, 0.1),
        0 0 0 1px rgba(255, 105, 180, 0.05);
}

.feature-card h4 {
    color: var(--pink);
    font-size: 1.05rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Accent dot before heading */
.feature-card h4::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--pink), var(--purple));
    flex-shrink: 0;
    box-shadow: 0 0 8px var(--pink-glow);
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
}

.feature-card p code {
    font-family: 'JetBrains Mono', monospace;
    color: var(--pink);
    font-size: 0.8rem;
    font-weight: 600;
    background: rgba(255, 105, 180, 0.1);
    padding: 2px 7px;
    border-radius: 4px;
}

/* ── Tutorial Section ─────────────────────── */
.tutorial-section {
    max-width: 750px;
}

.tutorial-steps-lg {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
}

/* Animated connecting line */
.tutorial-steps-lg::before {
    content: '';
    position: absolute;
    left: 21px;
    top: 32px;
    bottom: 32px;
    width: 2px;
    background: linear-gradient(180deg,
        var(--pink) 0%,
        var(--purple) 50%,
        var(--pink) 100%);
    opacity: 0.2;
    border-radius: 1px;
}

.tutorial-step-lg {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    padding: 20px;
    margin-bottom: 4px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.tutorial-step-lg:hover {
    border-color: rgba(255, 105, 180, 0.3);
    background: rgba(26, 26, 46, 0.8);
    transform: translateX(8px);
    box-shadow: -4px 0 20px rgba(255, 105, 180, 0.05);
}

.step-num {
    min-width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--pink), var(--purple));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(255, 105, 180, 0.3);
    transition: all 0.4s ease;
    position: relative;
    z-index: 1;
}

.tutorial-step-lg:hover .step-num {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(255, 105, 180, 0.4);
}

.step-body h4 {
    color: var(--text-primary);
    font-size: 1.05rem;
    margin-bottom: 8px;
}

.step-body p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 0;
}

.step-body code {
    font-family: 'JetBrains Mono', monospace;
    color: var(--pink);
    font-size: 0.82rem;
    font-weight: 600;
    background: rgba(255, 105, 180, 0.1);
    padding: 2px 7px;
    border-radius: 4px;
}

.step-body a {
    transition: var(--transition);
}

.step-body a:hover {
    text-shadow: 0 0 10px var(--pink-glow);
}

/* ── Command Reference ────────────────────── */
.cmd-ref-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.cmd-ref-category h4 {
    color: var(--pink);
    font-size: 1.05rem;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(255, 105, 180, 0.15);
    display: flex;
    align-items: center;
    gap: 8px;
}

.cmd-ref-category h4::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--pink);
    box-shadow: 0 0 8px var(--pink-glow);
}

.cmd-ref-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cmd-ref {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--bg-card);
    border-radius: 8px;
    border: 1px solid var(--border);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cmd-ref:hover {
    border-color: rgba(255, 105, 180, 0.3);
    background: rgba(255, 105, 180, 0.04);
    transform: translateX(6px);
}

.alt .cmd-ref {
    background: var(--bg-primary);
}

.cmd-ref code {
    font-family: 'JetBrains Mono', monospace;
    color: var(--pink);
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
}

.cmd-ref span {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* ── Info Boxes ───────────────────────────── */
.info-box {
    background: rgba(255, 105, 180, 0.04);
    border: 1px solid rgba(255, 105, 180, 0.15);
    border-left: 3px solid var(--pink);
    border-radius: var(--radius);
    padding: 22px 26px;
    margin-top: 30px;
    transition: all 0.4s ease;
}

.info-box:hover {
    background: rgba(255, 105, 180, 0.06);
    border-left-color: var(--purple);
    transform: translateX(4px);
}

.info-box h4 {
    color: var(--pink);
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.info-box p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
}

.info-box p code {
    font-family: 'JetBrains Mono', monospace;
    color: var(--pink);
    font-size: 0.82rem;
    font-weight: 600;
    background: rgba(255, 105, 180, 0.1);
    padding: 2px 7px;
    border-radius: 4px;
}

/* ── CTA Banner ───────────────────────────── */
.gm-cta {
    text-align: center;
    padding: 60px 30px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-top: 60px;
    position: relative;
    overflow: hidden;
}

/* Animated gradient border */
.gm-cta::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: conic-gradient(
        from var(--angle, 0deg),
        var(--pink),
        var(--purple),
        transparent,
        transparent,
        var(--pink)
    );
    border-radius: calc(var(--radius-lg) + 2px);
    animation: borderRotate 4s linear infinite;
    z-index: -2;
    opacity: 0.4;
}

@keyframes borderRotate {
    from { --angle: 0deg; }
    to { --angle: 360deg; }
}

.gm-cta::after {
    content: '';
    position: absolute;
    inset: 2px;
    background: var(--bg-card);
    border-radius: calc(var(--radius-lg) - 2px);
    z-index: -1;
}

.gm-cta h3 {
    font-size: 1.6rem;
    margin-bottom: 12px;
    position: relative;
}

.gm-cta p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    position: relative;
}

.gm-cta .ip-highlight {
    font-family: 'JetBrains Mono', monospace;
    color: var(--pink);
    font-weight: 600;
    font-size: 1.2rem;
    position: relative;
    animation: ipPulse 3s ease-in-out infinite;
}

/* ── Responsive ───────────────────────────── */
@media (max-width: 768px) {
    .gm-hero {
        min-height: 40vh;
        padding: 120px 20px 50px;
    }

    .gm-section {
        padding: 60px 0;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .cmd-ref-grid {
        grid-template-columns: 1fr;
    }

    .tutorial-step-lg {
        flex-direction: column;
        gap: 12px;
    }

    .tutorial-steps-lg::before {
        display: none;
    }

    .gm-back {
        top: 75px;
    }

    .gm-hero-icon {
        width: 70px;
        height: 70px;
        font-size: 1.6rem;
    }

    .tutorial-step-lg:hover {
        transform: translateX(4px);
    }
}

@media (max-width: 480px) {
    .gm-cta {
        padding: 40px 20px;
    }

    .gm-section-title {
        font-size: 1.6rem;
    }

    .feature-card {
        padding: 22px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .gm-hero-icon {
        animation: none;
    }

    .gm-hero::after {
        animation: none;
    }

    .gm-cta::before {
        animation: none;
    }
}
