/* ============================================================
   HHpoker 德扑圈 — 奢华暗金风 Luxury Dark Gold
   TYPE 2: Black(#0a0a0a) + Gold(#d4a843) + Dark Marble
   ============================================================ */

/* ----- CSS Variables ----- */
:root {
    --gold: #d4a843;
    --gold-light: #e8c97a;
    --gold-dark: #a07d2e;
    --dark: #0a0a0a;
    --dark-2: #111111;
    --dark-3: #1a1a1a;
    --dark-4: #222222;
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ----- Global ----- */
html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--dark);
    color: #d1d5db;
    overflow-x: hidden;
}

::selection {
    background: rgba(212, 168, 67, 0.3);
    color: #fff;
}

/* ----- Gold Gradient Text ----- */
.gold-gradient-text {
    background: linear-gradient(135deg, var(--gold-dark) 0%, var(--gold) 30%, var(--gold-light) 50%, var(--gold) 70%, var(--gold-dark) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: goldShine 4s ease-in-out infinite;
}

@keyframes goldShine {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 200% center; }
}

/* ----- Gold Border Glow ----- */
.gold-border-glow {
    border: 2px solid rgba(212, 168, 67, 0.5);
    box-shadow: 0 0 15px rgba(212, 168, 67, 0.1), inset 0 0 15px rgba(212, 168, 67, 0.05);
}

/* ----- Animations ----- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes floatSlow {
    0%, 100% { transform: translateY(0) translateX(0); opacity: 0.4; }
    25% { transform: translateY(-20px) translateX(10px); opacity: 0.6; }
    50% { transform: translateY(-10px) translateX(-10px); opacity: 0.3; }
    75% { transform: translateY(-30px) translateX(5px); opacity: 0.5; }
}

@keyframes floatMedium {
    0%, 100% { transform: translateY(0) translateX(0); opacity: 0.3; }
    33% { transform: translateY(-15px) translateX(-8px); opacity: 0.5; }
    66% { transform: translateY(-25px) translateX(12px); opacity: 0.2; }
}

@keyframes floatFast {
    0%, 100% { transform: translateY(0) translateX(0); opacity: 0.2; }
    50% { transform: translateY(-35px) translateX(-15px); opacity: 0.4; }
}

@keyframes pulseSlow {
    0%, 100% { box-shadow: 0 0 10px rgba(212, 168, 67, 0.2); }
    50% { box-shadow: 0 0 25px rgba(212, 168, 67, 0.4); }
}

.animate-fadeInUp {
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
}

.animation-delay-200 { animation-delay: 0.2s; }
.animation-delay-400 { animation-delay: 0.4s; }
.animation-delay-600 { animation-delay: 0.6s; }
.animation-delay-800 { animation-delay: 0.8s; }

.animate-float-slow { animation: floatSlow 8s ease-in-out infinite; }
.animate-float-medium { animation: floatMedium 6s ease-in-out infinite; }
.animate-float-fast { animation: floatFast 4s ease-in-out infinite; }
.animate-pulse-slow { animation: pulseSlow 3s ease-in-out infinite; }

/* ----- Navigation ----- */
#navbar {
    transition: background-color var(--transition-base), box-shadow var(--transition-base);
}

#navbar.scrolled {
    background-color: rgba(10, 10, 10, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold);
    transition: width var(--transition-base);
}

.nav-link:hover::after {
    width: 100%;
}

/* ----- Feature Cards ----- */
.feature-card {
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 168, 67, 0.3), transparent);
    transition: width var(--transition-base);
}

.feature-card:hover::before {
    width: 90%;
}

.feature-card .fa-solid,
.feature-card .fa-brands {
    transition: transform var(--transition-base);
}

.feature-card:hover .fa-solid,
.feature-card:hover .fa-brands {
    transform: scale(1.15);
}

/* ----- Game Cards ----- */
.game-card {
    position: relative;
    overflow: hidden;
}

.game-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    opacity: 0;
    transition: opacity var(--transition-base);
}

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

/* ----- Stats Counter Animation ----- */
.stat-counter {
    font-variant-numeric: tabular-nums;
}

/* ----- Testimonial Cards ----- */
.testimonial-card {
    position: relative;
}

.testimonial-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(212, 168, 67, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

/* ----- FAQ Accordion ----- */
.faq-item {
    transition: border-color var(--transition-base);
}

.faq-toggle {
    transition: color var(--transition-base);
}

.faq-item.active {
    border-color: rgba(212, 168, 67, 0.4);
    box-shadow: 0 0 20px rgba(212, 168, 67, 0.05);
}

.faq-item.active .faq-icon {
    background: rgba(212, 168, 67, 0.15);
    border-color: var(--gold);
}

.faq-item.active .faq-icon i {
    transform: rotate(45deg);
    color: var(--gold);
}

.faq-content {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.3s ease, max-height 0.4s ease, padding 0.3s ease;
}

.faq-item.active .faq-content {
    opacity: 1;
    max-height: 500px;
}

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

::-webkit-scrollbar-track {
    background: var(--dark-2);
}

::-webkit-scrollbar-thumb {
    background: rgba(212, 168, 67, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 168, 67, 0.5);
}

/* ----- Gold Divider Lines ----- */
.gold-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 168, 67, 0.4), transparent);
    border: none;
}

/* ----- Foil shimmer effect on hover ----- */
@keyframes foilShimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

.foil-shimmer {
    background: linear-gradient(
        110deg,
        transparent 0%,
        transparent 30%,
        rgba(212, 168, 67, 0.08) 50%,
        transparent 70%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: foilShimmer 3s ease-in-out infinite;
}

/* ----- Responsive Fine-tuning ----- */
@media (max-width: 1024px) {
    .gold-gradient-text {
        background-size: 150% auto;
    }
}

@media (max-width: 640px) {
    h1 { font-size: 2.25rem !important; }
    h2 { font-size: 1.875rem !important; }

    .feature-card {
        padding: 1.5rem;
    }

    .gold-particle {
        display: none;
    }
}

/* ----- Smooth mobile menu ----- */
#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 600px;
    }
}

/* ----- Focus states for accessibility ----- */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ----- Reduced motion preference ----- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
