/* ============================================================
   HHPoker 德扑圈 - 科技未来风 (Violet/Purple Tech Theme)
   Landing Page 0020 - Custom Stylesheet
   ============================================================ */

/* ---------- CSS Variables ---------- */
:root {
    --purple-400: #a78bfa;
    --purple-500: #8b5cf6;
    --purple-600: #7c3aed;
    --purple-700: #6d28d9;
    --indigo-500: #6366f1;
    --indigo-700: #4338ca;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    --white: #ffffff;
    --glow-purple: 0 0 20px rgba(139, 92, 246, 0.5), 0 0 40px rgba(139, 92, 246, 0.3), 0 0 80px rgba(139, 92, 246, 0.15);
    --glow-purple-sm: 0 0 10px rgba(139, 92, 246, 0.4), 0 0 20px rgba(139, 92, 246, 0.2);
}

/* ---------- Smooth Scroll ---------- */
html {
    scroll-behavior: smooth;
}

/* ---------- Selection ---------- */
::selection {
    background-color: var(--purple-600);
    color: var(--white);
}

/* ---------- Scrollbar Styling ---------- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--slate-900);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--purple-600), var(--purple-700));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--purple-500), var(--purple-600));
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--purple-600) var(--slate-900);
}

/* ============================================================
   NAVBAR
   ============================================================ */

/* Navbar glow bottom line effect */
#navbar {
    box-shadow: 0 1px 0 0 rgba(139, 92, 246, 0.15), 0 4px 20px rgba(139, 92, 246, 0.08);
    transition: box-shadow 0.3s ease, background-color 0.3s ease;
}

/* Navbar scrolled state (applied via JS) */
#navbar.navbar-scrolled {
    box-shadow: 0 1px 0 0 rgba(139, 92, 246, 0.3), 0 4px 30px rgba(139, 92, 246, 0.15), 0 8px 60px rgba(0, 0, 0, 0.4);
    background-color: rgba(15, 23, 42, 0.98);
}

/* ============================================================
   HERO SECTION
   ============================================================ */

/* Neon text glow effect */
.neon-glow {
    text-shadow:
        0 0 7px rgba(139, 92, 246, 0.6),
        0 0 14px rgba(139, 92, 246, 0.4),
        0 0 28px rgba(139, 92, 246, 0.25),
        0 0 56px rgba(139, 92, 246, 0.15),
        0 0 112px rgba(139, 92, 246, 0.08);
}

.neon-glow .text-purple-500 {
    text-shadow:
        0 0 10px rgba(139, 92, 246, 0.8),
        0 0 20px rgba(139, 92, 246, 0.6),
        0 0 40px rgba(139, 92, 246, 0.4),
        0 0 80px rgba(139, 92, 246, 0.2);
}

/* Image glow border (purple ring) */
.hero-image-glow {
    position: relative;
    display: inline-block;
}

.hero-image-glow::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--purple-500), var(--indigo-500), var(--purple-600), var(--purple-400));
    background-size: 300% 300%;
    animation: gradientRotate 4s ease infinite;
    z-index: 0;
}

.hero-image-glow::after {
    content: '';
    position: absolute;
    inset: 0px;
    border-radius: 14px;
    box-shadow:
        0 0 30px rgba(139, 92, 246, 0.5),
        0 0 60px rgba(139, 92, 246, 0.3),
        0 0 100px rgba(139, 92, 246, 0.15),
        inset 0 0 20px rgba(139, 92, 246, 0.1);
    z-index: 5;
    pointer-events: none;
}

@keyframes gradientRotate {
    0%, 100% { background-position: 0% 50%; }
    25% { background-position: 100% 0%; }
    50% { background-position: 100% 100%; }
    75% { background-position: 0% 100%; }
}

/* ---------- Floating Geometric Shapes ---------- */
.floating-shape {
    position: absolute;
    opacity: 0.15;
    pointer-events: none;
    z-index: 1;
}

/* Circle 1 - Large, upper left */
.shape-circle-1 {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, var(--purple-400), var(--purple-700));
    top: 15%;
    left: 5%;
    animation: floatCircle1 8s ease-in-out infinite;
}

/* Triangle 1 - Medium, upper right area */
.shape-triangle-1 {
    width: 0;
    height: 0;
    border-left: 40px solid transparent;
    border-right: 40px solid transparent;
    border-bottom: 80px solid var(--indigo-500);
    background: none;
    top: 20%;
    right: 8%;
    animation: floatTriangle 10s ease-in-out infinite;
}

/* Square 1 - Small to medium, lower left */
.shape-square-1 {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--purple-500), var(--indigo-600));
    border-radius: 12px;
    transform: rotate(25deg);
    bottom: 20%;
    left: 10%;
    animation: floatSquare 9s ease-in-out infinite;
}

/* Circle 2 - Small, lower right */
.shape-circle-2 {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 40%, var(--purple-300), var(--purple-600));
    bottom: 25%;
    right: 12%;
    animation: floatCircle2 7s ease-in-out infinite;
}

/* Ring - Outline circle, mid right */
.shape-ring-1 {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 3px solid var(--purple-400);
    background: transparent;
    top: 50%;
    right: 4%;
    animation: floatRing 11s ease-in-out infinite;
}

@keyframes floatCircle1 {
    0%, 100% { transform: translateY(0px) translateX(0px) scale(1); }
    25% { transform: translateY(-30px) translateX(15px) scale(1.05); }
    50% { transform: translateY(-15px) translateX(-10px) scale(0.95); }
    75% { transform: translateY(-40px) translateX(-20px) scale(1.08); }
}

@keyframes floatTriangle {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-35px) rotate(120deg); }
    66% { transform: translateY(-10px) rotate(240deg); }
}

@keyframes floatSquare {
    0%, 100% { transform: translateY(0px) translateX(0px) rotate(25deg); }
    30% { transform: translateY(-25px) translateX(-20px) rotate(45deg); }
    60% { transform: translateY(-45px) translateX(10px) rotate(15deg); }
    85% { transform: translateY(-20px) translateX(25px) rotate(35deg); }
}

@keyframes floatCircle2 {
    0%, 100% { transform: translateY(0px) translateX(0px); }
    40% { transform: translateY(20px) translateX(25px); }
    80% { transform: translateY(-20px) translateX(-15px); }
}

@keyframes floatRing {
    0%, 100% { transform: translateY(0px) rotate(0deg) scale(1); }
    30% { transform: translateY(-20px) rotate(45deg) scale(1.1); }
    60% { transform: translateY(15px) rotate(135deg) scale(0.9); }
    85% { transform: translateY(-30px) rotate(225deg) scale(1.05); }
}

/* Tech grid overlay */
.tech-grid {
    background-image:
        linear-gradient(rgba(139, 92, 246, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(139, 92, 246, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
}

/* Slow spin for decorative ring */
@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-spin-slow {
    animation: spin-slow 20s linear infinite;
}

/* ============================================================
   FEATURE CARDS
   ============================================================ */

/* Animated gradient border on hover (::before pseudo-element) */
.feature-card {
    z-index: 1;
}

.feature-card .feature-card-border {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 17px;
    background: linear-gradient(135deg, var(--purple-500), var(--indigo-500), var(--purple-600), var(--purple-400));
    background-size: 400% 400%;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.feature-card:hover .feature-card-border {
    opacity: 1;
    animation: gradientRotate 3s ease infinite;
}

.feature-card-dark::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    background: var(--slate-800);
    z-index: 2;
}

.feature-card-light::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    background: #ffffff;
    z-index: 2;
}

.feature-card > .relative.z-10 {
    z-index: 3;
}

/* ============================================================
   STATS / GLASS CARDS
   ============================================================ */

.glass-card {
    border: 1px solid rgba(139, 92, 246, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(139, 92, 246, 0.2), 0 4px 15px rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.4);
}

/* Particle dot background pattern */
.particle-dots {
    background-image: radial-gradient(circle, rgba(139, 92, 246, 0.35) 1px, transparent 1px);
    background-size: 24px 24px;
}

/* ============================================================
   COUNTER ANIMATION STYLES
   ============================================================ */

.counter {
    display: inline-block;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
    transition: none;
}

.counter.counting {
    color: #c4b5fd;
    text-shadow: var(--glow-purple-sm);
}

/* ============================================================
   FAQ ACCORDION
   ============================================================ */

.faq-item {
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.1);
}

.faq-toggle {
    cursor: pointer;
    user-select: none;
}

.faq-toggle:focus-visible {
    outline: 2px solid var(--purple-500);
    outline-offset: -2px;
    border-radius: 12px;
}

/* Icon rotation (rotate 45deg = plus becomes X) */
.faq-toggle[aria-expanded="true"] .faq-icon {
    transform: rotate(45deg);
    background-color: #7c3aed !important;
    color: #ffffff !important;
}

/* Accordion content animation */
.faq-content {
    overflow: hidden;
    max-height: 500px;
    opacity: 1;
    transition: max-height 0.4s ease-in-out, opacity 0.3s ease-in-out, padding 0.3s ease;
}

.faq-content.hidden {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
}

/* ============================================================
   CTA SECTION
   ============================================================ */

/* Additional glow for white CTA button */
#contact a.bg-white {
    box-shadow: 0 8px 40px rgba(139, 92, 246, 0.4), 0 0 80px rgba(139, 92, 246, 0.2);
}

#contact a.bg-white:hover {
    box-shadow: 0 12px 50px rgba(139, 92, 246, 0.5), 0 0 100px rgba(139, 92, 246, 0.3);
}

/* ============================================================
   FOOTER
   ============================================================ */

footer .border-t.border-purple-500\/20 {
    border-top-color: rgba(139, 92, 246, 0.2) !important;
}

/* ============================================================
   RESPONSIVE - Mobile (375px)
   ============================================================ */

@media (max-width: 640px) {
    /* Reduce floating shapes on mobile */
    .shape-circle-1 {
        width: 60px;
        height: 60px;
        top: 10%;
        left: 2%;
        opacity: 0.08;
    }

    .shape-triangle-1 {
        border-left-width: 20px;
        border-right-width: 20px;
        border-bottom-width: 40px;
        top: 12%;
        right: 3%;
        opacity: 0.08;
    }

    .shape-square-1 {
        width: 35px;
        height: 35px;
        border-radius: 8px;
        bottom: 15%;
        left: 5%;
        opacity: 0.08;
    }

    .shape-circle-2 {
        width: 25px;
        height: 25px;
        bottom: 20%;
        right: 5%;
        opacity: 0.08;
    }

    .shape-ring-1 {
        display: none;
    }

    /* Smaller neon glow on mobile */
    .neon-glow {
        text-shadow:
            0 0 5px rgba(139, 92, 246, 0.4),
            0 0 10px rgba(139, 92, 246, 0.25),
            0 0 20px rgba(139, 92, 246, 0.15);
    }

    /* Reduce hero image glow */
    .hero-image-glow::after {
        box-shadow:
            0 0 15px rgba(139, 92, 246, 0.3),
            0 0 30px rgba(139, 92, 246, 0.15);
    }

    /* Tighter padding for sections */
    section {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }

    #home {
        padding-top: 5rem !important;
        min-height: auto;
    }

    /* FAQ text size */
    .faq-toggle span {
        font-size: 0.9375rem;
    }

    /* Feature cards full width spacing */
    .feature-card {
        padding: 1.5rem;
    }

    /* Glass cards smaller */
    .glass-card {
        padding: 1.5rem;
    }

    .glass-card .text-4xl {
        font-size: 1.875rem;
    }

    /* CTA buttons stacked */
    #contact .flex-col a {
        width: 100%;
    }

    /* Navbar mobile adjustments */
    #navbar {
        padding-top: 0;
        padding-bottom: 0;
    }
}

@media (max-width: 375px) {
    /* Further reductions for 375px */
    .neon-glow {
        font-size: 1.75rem !important;
    }

    .hero-image-glow img {
        max-width: 100%;
    }

    #contact h2 {
        font-size: 1.625rem;
    }

    #contact p {
        font-size: 0.875rem;
    }
}

/* ============================================================
   RESPONSIVE - Tablet (640px - 1024px)
   ============================================================ */

@media (min-width: 641px) and (max-width: 1023px) {
    .shape-circle-1 {
        width: 80px;
        height: 80px;
    }

    .shape-triangle-1 {
        border-left-width: 30px;
        border-right-width: 30px;
        border-bottom-width: 60px;
    }

    .shape-square-1 {
        width: 50px;
        height: 50px;
    }
}

/* ============================================================
   ACCESSIBILITY: Reduced Motion
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
    .floating-shape,
    .shape-circle-1,
    .shape-triangle-1,
    .shape-square-1,
    .shape-circle-2,
    .shape-ring-1 {
        animation: none !important;
    }

    .hero-image-glow::before {
        animation: none !important;
    }

    .feature-card:hover .feature-card-border {
        animation: none !important;
    }

    .animate-spin-slow {
        animation: none !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* ============================================================
   PRINT STYLES
   ============================================================ */

@media print {
    #navbar {
        position: static;
    }

    .floating-shape,
    .particle-dots,
    .tech-grid {
        display: none;
    }

    body {
        color: #000;
        background: #fff;
    }
}

/* ============================================================
   HOVER TRANSITIONS & EFFECTS
   ============================================================ */

/* Smooth link hover */
a {
    transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

/* Button hover lift */
a[href]:not(.mobile-nav-link):hover {
    transform: translateY(-1px);
}

/* Feature card reveal */
.feature-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
}

.feature-card-dark:hover {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3), 0 0 30px rgba(139, 92, 246, 0.15);
}

.feature-card-light:hover {
    box-shadow: 0 20px 50px rgba(139, 92, 246, 0.15), 0 0 30px rgba(139, 92, 246, 0.08);
}

/* ============================================================
   DARK SECTION ACCENTS
   ============================================================ */

.bg-slate-900 section,
section.bg-slate-900 {
    background-color: var(--slate-900);
}

/* Section divider effect between dark/light */
#features {
    position: relative;
}

#features::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--purple-500), var(--indigo-500), var(--purple-500), transparent);
    opacity: 0.6;
}

#faq {
    position: relative;
}

#faq::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--purple-400), var(--indigo-400), var(--purple-400), transparent);
    opacity: 0.4;
}

/* ============================================================
   MOBILE MENU TRANSITIONS
   ============================================================ */

#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease-in-out;
}

#mobile-menu:not(.hidden) {
    max-height: 600px;
}

/* Mobile nav link active indicator */
.mobile-nav-link:active {
    background-color: rgba(124, 58, 237, 0.15);
}

/* ============================================================
   END OF CUSTOM CSS
   ============================================================ */
