/* ============================================================
   德扑圈官方客服 — 专属扑克助手
   SaaS-Style Landing Page Custom Styles
   ============================================================ */

/* --- CSS Variables / Design Tokens --- */
:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --primary-light: #6366f1;
    --primary-50: #eef2ff;
    --accent: #f59e0b;
    --accent-light: #fef3c7;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --radius-xl: 1rem;
    --radius-2xl: 1.25rem;
    --radius-3xl: 1.5rem;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 40px rgba(79, 70, 229, 0.15);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* --- Base Typography --- */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* --- Navbar Styles --- */
.navbar {
    transition: all var(--transition);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    box-shadow: var(--shadow-lg) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-link {
    position: relative;
    font-weight: 500;
    color: var(--gray-700);
    transition: color var(--transition);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 20px;
    height: 2.5px;
    background: var(--primary);
    border-radius: 9999px;
    transition: transform var(--transition);
}

.nav-link:hover {
    color: var(--primary);
}

.nav-link:hover::after {
    transform: translateX(-50%) scaleX(1);
}

.nav-link.active {
    color: var(--primary);
}

.nav-link.active::after {
    transform: translateX(-50%) scaleX(1);
}

/* --- Mobile Menu --- */
.mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
}

.mobile-menu.open {
    max-height: 500px;
}

/* --- Hero Section --- */
.hero-badge {
    animation: fadeInUp 0.6s ease forwards;
}

.hero-title {
    animation: fadeInUp 0.6s ease 0.1s forwards;
    opacity: 0;
    animation-fill-mode: forwards;
}

.hero-subtitle {
    animation: fadeInUp 0.6s ease 0.2s forwards;
    opacity: 0;
    animation-fill-mode: forwards;
}

.hero-buttons {
    animation: fadeInUp 0.6s ease 0.3s forwards;
    opacity: 0;
    animation-fill-mode: forwards;
}

.hero-image {
    animation: fadeInRight 0.8s ease 0.2s forwards;
    opacity: 0;
    animation-fill-mode: forwards;
}

/* --- Floating Animation --- */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

.float-animation {
    animation: float 4s ease-in-out infinite;
}

/* --- Pulse Ring for CTA --- */
@keyframes pulse-ring {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.5); }
    70% { transform: scale(1); box-shadow: 0 0 0 15px rgba(79, 70, 229, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(79, 70, 229, 0); }
}

.pulse-ring {
    animation: pulse-ring 2s infinite;
}

/* --- Feature Cards --- */
.feature-card {
    transition: all var(--transition);
    border: 1px solid transparent;
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-50);
}

.feature-card .icon-wrapper {
    transition: all var(--transition);
}

.feature-card:hover .icon-wrapper {
    transform: scale(1.1);
    box-shadow: var(--shadow-glow);
}

/* --- Stats Bar --- */
.stats-gradient {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 25%, #818cf8 50%, #6366f1 75%, #4f46e5 100%);
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* --- Stat Counter --- */
.stat-number {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
}

/* --- Testimonial Cards --- */
.testimonial-card {
    transition: all var(--transition);
    position: relative;
}

.testimonial-card::before {
    content: '\201C';
    position: absolute;
    top: -10px;
    left: 20px;
    font-size: 5rem;
    color: var(--primary);
    opacity: 0.1;
    font-family: Georgia, serif;
    line-height: 1;
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

/* --- FAQ Accordion --- */
.faq-item {
    border: 1px solid var(--gray-200);
    transition: all var(--transition);
}

.faq-item:hover {
    border-color: var(--primary-50);
}

.faq-item.active {
    border-color: var(--primary-50);
    box-shadow: var(--shadow-md);
}

.faq-question {
    cursor: pointer;
    user-select: none;
    transition: color var(--transition);
}

.faq-question:hover {
    color: var(--primary);
}

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

.faq-item.active .faq-answer {
    max-height: 300px;
}

.faq-icon {
    transition: transform var(--transition);
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

/* --- CTA Section --- */
.cta-section {
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at center, rgba(79, 70, 229, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

/* --- Footer --- */
.footer-link {
    position: relative;
    transition: color var(--transition);
}

.footer-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--primary-light);
    transition: width var(--transition);
}

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

.social-icon {
    transition: all var(--transition);
}

.social-icon:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

/* --- Page Header (for secondary pages) --- */
.page-header {
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 50%, rgba(79, 70, 229, 0.12) 0%, transparent 60%);
    pointer-events: none;
}

/* --- Contact Cards --- */
.contact-method-card {
    transition: all var(--transition);
}

.contact-method-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary);
}

/* --- Timeline / Steps --- */
.step-connector {
    position: relative;
}

.step-connector::before {
    content: '';
    position: absolute;
    top: 40px;
    left: 24px;
    width: 2px;
    height: calc(100% - 80px);
    background: linear-gradient(to bottom, var(--primary), rgba(79, 70, 229, 0.2));
}

/* --- Reveal on Scroll --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Button Hover Effects --- */
.btn-primary-glow {
    transition: all var(--transition);
}

.btn-primary-glow:hover {
    box-shadow: 0 0 25px rgba(79, 70, 229, 0.4);
    transform: translateY(-2px);
}

.btn-outline-hover {
    transition: all var(--transition);
}

.btn-outline-hover:hover {
    transform: translateY(-2px);
}

/* --- Card Grid --- */
.card-hover-lift {
    transition: all var(--transition);
}

.card-hover-lift:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
}

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

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-200);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

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

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* --- Responsive Tweaks --- */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .stats-gradient .grid > div {
        padding: 1rem 0.5rem;
    }
}

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