/* TCG Theme Styling - Dark Mode Cyber Aesthetic, 3D WebGL integrated */
:root {
    --tcg-bg: #030712;
    --tcg-surface: rgba(15, 23, 42, 0.6);
    /* make surface semi transparent for WebGL to show through */
    --tcg-glow: #00f0ff;
    --tcg-glow-alt: #f000ff;
    --tcg-text: #f8fafc;
    --tcg-border: rgba(0, 240, 255, 0.3);
}

body {
    background-color: var(--tcg-bg);
    color: var(--tcg-text);
}

.home-tcg-theme {
    background-color: transparent;
    overflow: hidden;
    /* Prevent absolute SVGs from inflating doc scrollHeight */
}

/* WebGL Background */
.webgl-bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}

/* Utilities */
.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.z-10 {
    z-index: 10;
}

.z-0 {
    z-index: 0;
}

.top-0 {
    top: 0;
}

.left-0 {
    left: 0;
}

.right-0 {
    right: 0;
}

.w-full {
    width: 100%;
}

.pointer-events-none {
    pointer-events: none;
}

/* Fix footer overlap with webgl */
.site-footer {
    position: relative;
    z-index: 20;
    background-color: var(--tcg-bg) !important;
}

.top-\[-50px\] {
    top: -50px;
}

.left-\[50\%\] {
    left: 50%;
    transform: translateX(-50%);
}

/* Make main sections transparent so WebGL shines */
.tcg-hero {
    position: relative;
    height: 100vh;
    min-height: 800px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent !important;
}

.hero-overlay-cyber {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Slight gradient to read text clearly, but mainly transparent to see webgl */
    background: radial-gradient(circle at center, rgba(3, 7, 18, 0.2) 0%, rgba(3, 7, 18, 0.8) 100%);
    box-shadow: inset 0 0 100px rgba(0, 240, 255, 0.1);
}

.cyber-badge {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid var(--tcg-glow);
    border-radius: 20px;
    color: var(--tcg-glow);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

.cyber-glitch {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.2;
    color: #fff;
    text-shadow: 0 0 20px rgba(0, 240, 255, 0.5);
    margin-bottom: 30px;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 40px;
}

.cyber-btn {
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
}

.hover-glow {
    background: linear-gradient(90deg, #00f0ff, #0077ff);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.5);
    border: none;
    color: #000;
}

.hover-glow:hover {
    box-shadow: 0 0 35px rgba(0, 240, 255, 0.8);
    color: #000;
    transform: translateY(-2px);
}

.outline-glow {
    background: transparent;
    border: 1px solid var(--tcg-glow);
    color: var(--tcg-glow);
}

.outline-glow:hover {
    background: rgba(0, 240, 255, 0.1);
    box-shadow: inset 0 0 15px rgba(0, 240, 255, 0.3);
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* 3D Services Grid (TCG card style) */
.services-3d-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    perspective: 1000px;
}

.service-tcg-card {
    height: 400px;
    perspective: 1000px;
    display: block;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    cursor: pointer;
}

.service-tcg-card:hover .card-inner {
    transform: rotateY(180deg) scale(1.05);
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 12px;
    border: 2px solid rgba(0, 240, 255, 0.2);
}

.card-front {
    background-color: var(--tcg-surface);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.card-icon {
    font-size: 3rem;
    color: var(--tcg-glow);
    margin-bottom: 20px;
    filter: drop-shadow(0 0 10px rgba(0, 240, 255, 0.8));
}

.card-front h3 {
    color: #fff;
    font-size: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    z-index: 2;
}

.card-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(0, 240, 255, 0.2) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
}

.service-tcg-card:hover .card-glow {
    opacity: 1;
}

.card-back {
    background: linear-gradient(135deg, #0f172a, #1e293b);
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 30px;
    text-align: center;
}

.card-back p {
    color: #e2e8f0;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.read-more {
    color: var(--tcg-glow);
    font-weight: bold;
    font-size: 0.9rem;
    text-transform: uppercase;
}

/* Sections Global */
.section-padding {
    padding: 120px 0;
}

.section-title h2 {
    color: #fff;
    font-size: 3rem;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

/* About Rockets */
.about-rockets-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-rockets-text h3 {
    color: var(--tcg-glow);
    font-size: 2rem;
    margin-bottom: 20px;
}

.check-list li {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 3px solid var(--tcg-glow);
}

.neon-text {
    color: var(--tcg-glow);
}

.cyber-frame-img {
    width: 100%;
    border-radius: 12px;
    border: 2px solid rgba(0, 240, 255, 0.4);
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.2);
}

.floating-hologram {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid var(--tcg-glow);
    padding: 20px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
    animation: floatParticle 4s ease-in-out infinite alternate;
}

.floating-hologram i {
    font-size: 2rem;
    color: var(--tcg-glow);
    margin-bottom: 10px;
}

.floating-hologram span {
    font-weight: bold;
    font-size: 1.2rem;
}

/* Cases Slider Approximation (Flex Grid) */
.cases-slider {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.cyber-panel {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(0, 240, 255, 0.1);
    border-radius: 12px;
    padding: 30px;
    backdrop-filter: blur(10px);
    transition: all 0.3s;
}

.cyber-panel:hover {
    border-color: rgba(0, 240, 255, 0.5);
    box-shadow: 0 10px 30px rgba(0, 240, 255, 0.1);
    transform: translateY(-5px);
}

.neon-badge {
    background: rgba(0, 240, 255, 0.1);
    color: var(--tcg-glow);
    border: 1px solid var(--tcg-glow);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    display: inline-block;
    margin-bottom: 15px;
}

.case-body {
    margin-top: 20px;
}

.data-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: bold;
}

.label {
    color: #94a3b8;
}

.val.bad {
    color: #f87171;
}

.val.good {
    color: #4ade80;
    font-size: 1.2rem;
    text-shadow: 0 0 5px rgba(74, 222, 128, 0.4);
}

.case-desc {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 15px;
    margin-top: 15px;
    font-size: 0.9rem;
    color: #cbd5e1;
}

/* Flow Steps */
.flow-steps {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
}

.flow-steps .step {
    flex: 1;
    position: relative;
    text-align: center;
}

.step-num {
    position: absolute;
    top: -15px;
    right: -15px;
    font-size: 3rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.05);
}

.step-icon {
    font-size: 2.5rem;
    color: var(--tcg-glow);
    margin-bottom: 20px;
}

.step-connector {
    display: flex;
    align-items: center;
    height: 150px;
    color: rgba(0, 240, 255, 0.3);
    font-size: 1.5rem;
}

/* Bottom CTA */
.bottom-cta {
    text-align: center;
    border-top: 1px solid rgba(0, 240, 255, 0.2);
}

.cta-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.cta-bg-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.2;
    filter: grayscale(100%);
    mix-blend-mode: luminosity;
}

.cta-overlay.glass {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(3, 7, 18, 1), rgba(3, 7, 18, 0.7));
}

@media (max-width: 900px) {

    .about-rockets-grid,
    .flow-steps {
        flex-direction: column;
        grid-template-columns: 1fr;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .step-connector {
        display: none;
    }

    .cyber-glitch {
        font-size: 2.5rem;
    }
}

/* --- Hideout Corridor (Team Rocket Base) for TOP page --- */
.hideout-corridor {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background: #050102;
    /* Very dark red/black */
    perspective: 800px;
}

.corridor-tunnel {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    transform-style: preserve-3d;
}

.corridor-tunnel .ring {
    position: absolute;
    top: -300px;
    left: -500px;
    width: 1000px;
    height: 600px;
    border: 4px solid rgba(168, 85, 247, 0.5);
    /* Purple Accent */
    box-shadow: 0 0 30px rgba(168, 85, 247, 0.2), inset 0 0 30px rgba(168, 85, 247, 0.2);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.2);
    transform-origin: center;
    animation: corridorMove 6s infinite linear;
}

/* Floor Path Light */
.corridor-tunnel .ring::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 30%;
    width: 40%;
    height: 8px;
    background: #a855f7;
    /* Purple */
    box-shadow: 0 0 20px #a855f7;
    border-radius: 4px;
}

/* Occasional silver rings for variety */
.corridor-tunnel .ring:nth-child(1) {
    animation-delay: 0s;
    border-color: rgba(255, 255, 255, 0.3);
}

.corridor-tunnel .ring:nth-child(2) {
    animation-delay: -0.6s;
}

.corridor-tunnel .ring:nth-child(3) {
    animation-delay: -1.2s;
}

.corridor-tunnel .ring:nth-child(4) {
    animation-delay: -1.8s;
}

.corridor-tunnel .ring:nth-child(5) {
    animation-delay: -2.4s;
}

.corridor-tunnel .ring:nth-child(6) {
    animation-delay: -3.0s;
    border-color: rgba(255, 255, 255, 0.3);
}

.corridor-tunnel .ring:nth-child(7) {
    animation-delay: -3.6s;
}

.corridor-tunnel .ring:nth-child(8) {
    animation-delay: -4.2s;
}

.corridor-tunnel .ring:nth-child(9) {
    animation-delay: -4.8s;
}

.corridor-tunnel .ring:nth-child(10) {
    animation-delay: -5.4s;
}

@keyframes corridorMove {
    0% {
        transform: translateZ(-4000px);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    80% {
        opacity: 1;
    }

    100% {
        transform: translateZ(800px);
        opacity: 0;
    }
}

.hideout-corridor .fog-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, transparent 30%, #050102 100%);
    pointer-events: none;
}

/* Scroll Down Indicator */
.scroll-down-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 20;
}

.scroll-down-indicator span {
    font-size: 0.8rem;
    letter-spacing: 2px;
    margin-bottom: 10px;
    font-weight: bold;
}

.scroll-down-indicator .mouse {
    width: 26px;
    height: 40px;
    border: 2px solid;
    border-radius: 13px;
    position: relative;
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.2);
}

.scroll-down-indicator .wheel {
    width: 4px;
    height: 8px;
    border-radius: 2px;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollWheel 1.5s infinite;
}

@keyframes scrollWheel {
    0% {
        top: 6px;
        opacity: 1;
    }

    100% {
        top: 20px;
        opacity: 0;
    }
}