/* ===== CSS VARIABLES & RESET ===== */
:root {
    /* Colors */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --text-primary: #f0f0f5;
    --text-secondary: #8888a0;
    --text-muted: #55556a;
    --border-color: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);

    /* Tool theme colors */
    --gemini-start: #4285F4;
    --gemini-end: #A855F7;
    --notebook-start: #F97316;
    --notebook-end: #EAB308;
    /* DeepMind / Antigravity Theme */
    --antigravity-start: #06b6d4;
    --antigravity-end: #3b82f6;

    /* Claude Code Theme */
    --claude-start: #f59e0b;
    --claude-end: #d97706;

    /* Nano Banana Theme */
    --nanobanan-start: #ec4899;
    --nanobanan-end: #be185d;

    /* Poker Analyzer Theme */
    --poker-start: #10b981;
    --poker-end: #3b82f6;

    /* Score Recorder Theme */
    --score-start: #facc15;
    --score-end: #ca8a04;

    /* Tianji Fortune Theme */
    --tianji-start: #a855f7;
    --tianji-end: #d946ef;

    /* Typography */
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Outfit', 'Inter', sans-serif;

    /* Spacing */
    --section-padding: 120px 40px;
    --card-radius: 24px;
    --btn-radius: 14px;

    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== SCROLL PROGRESS BAR ===== */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb);
    z-index: 9999;
    transition: width 0.1s linear;
    border-radius: 0 2px 2px 0;
}

/* ===== BACK TO TOP BUTTON ===== */
#back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(18, 18, 26, 0.85);
    backdrop-filter: blur(12px);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 900;
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: all var(--transition-smooth);
}

#back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

#back-to-top:hover {
    background: rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.3);
    color: var(--text-primary);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.2);
}

/* ===== PER-TOOL CARD BORDER GLOW ON HOVER ===== */
[data-tool="gemini"]:hover .card-inner {
    border-color: rgba(66, 133, 244, 0.25);
    box-shadow: inset 0 0 30px rgba(66, 133, 244, 0.04);
}

[data-tool="notebooklm"]:hover .card-inner {
    border-color: rgba(249, 115, 22, 0.25);
    box-shadow: inset 0 0 30px rgba(249, 115, 22, 0.04);
}

[data-tool="antigravity"]:hover .card-inner {
    border-color: rgba(6, 182, 212, 0.25);
    box-shadow: inset 0 0 30px rgba(6, 182, 212, 0.04);
}

[data-tool="claudecode"]:hover .card-inner {
    border-color: rgba(245, 158, 11, 0.25);
    box-shadow: inset 0 0 30px rgba(245, 158, 11, 0.04);
}

[data-tool="nanobanan"]:hover .card-inner {
    border-color: rgba(236, 72, 153, 0.25);
    box-shadow: inset 0 0 30px rgba(236, 72, 153, 0.04);
}

[data-tool="pokeranalyzer"]:hover .card-inner {
    border-color: rgba(16, 185, 129, 0.25);
    box-shadow: inset 0 0 30px rgba(16, 185, 129, 0.04);
}

[data-tool="scorerecorder"]:hover .card-inner {
    border-color: rgba(250, 204, 21, 0.25);
    box-shadow: inset 0 0 30px rgba(250, 204, 21, 0.04);
}

[data-tool="tianjisuan"]:hover .card-inner {
    border-color: rgba(168, 85, 247, 0.25);
    box-shadow: inset 0 0 30px rgba(168, 85, 247, 0.04);
}

/* ===== BACKGROUND CANVAS ===== */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ===== MOUSE GLOW ===== */
#mouse-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(100, 100, 255, 0.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s;
    opacity: 0;
}

body:hover #mouse-glow {
    opacity: 1;
}

/* ===== GRADIENT TEXT ===== */
.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 30%, #f093fb 60%, #4facfe 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 4s ease-in-out infinite;
}

@keyframes gradientShift {

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

    50% {
        background-position: 100% 50%;
    }
}

/* ===== SCROLL ANIMATIONS ===== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== HERO SECTION ===== */
#hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    z-index: 2;
    overflow: hidden;
}

.hero-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.12) 0%, rgba(118, 75, 162, 0.06) 40%, transparent 70%);
    animation: heroGlowPulse 6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes heroGlowPulse {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.15);
        opacity: 1;
    }
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 100px;
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.2);
    color: #8e9fff;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    margin-bottom: 32px;
    backdrop-filter: blur(10px);
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.hero-badge:hover {
    background: rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.35);
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.15);
}

.hero-badge::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
    animation: badgeShimmer 3s ease-in-out infinite;
}

@keyframes badgeShimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 200%;
    }
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -2px;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    line-height: 1.8;
    max-width: 600px;
    margin: 0 auto 48px;
    font-weight: 300;
}

.hero-author {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 40px;
    font-weight: 300;
    letter-spacing: 0.5px;
}

.hero-author strong {
    color: var(--text-secondary);
    font-weight: 600;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 36px;
    border-radius: var(--btn-radius);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.15));
    border: 1px solid rgba(102, 126, 234, 0.3);
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition-smooth);
    cursor: pointer;
    backdrop-filter: blur(10px);
    position: relative;
}

.hero-cta::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: calc(var(--btn-radius) + 1px);
    background: linear-gradient(135deg, #667eea, #764ba2, #f093fb, #667eea);
    background-size: 300% 300%;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.4s;
    animation: gradientShift 4s ease-in-out infinite;
}

.hero-cta:hover::before {
    opacity: 0.6;
    filter: blur(8px);
}

.hero-cta:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.25), rgba(118, 75, 162, 0.25));
    border-color: rgba(102, 126, 234, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.25);
}

.hero-cta svg {
    animation: bounceDown 2s ease-in-out infinite;
}

@keyframes bounceDown {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(4px);
    }
}

/* ===== SECTION STYLES ===== */
#tools,
#workflow {
    position: relative;
    z-index: 2;
    padding: var(--section-padding);
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -1px;
}

.section-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
    font-weight: 300;
}

/* ===== TOOL CARDS GRID ===== */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* Grid sub-heading — spans full width */
.grid-subheading {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0 4px;
    margin-top: 8px;
}

.grid-subheading:first-child {
    margin-top: 0;
}

.subheading-icon {
    font-size: 1.15rem;
}

.subheading-text {
    font-family: var(--font-heading);
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.subheading-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.08), transparent 80%);
}

.tool-card {
    position: relative;
    border-radius: var(--card-radius);
    overflow: hidden;
    cursor: pointer;
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

.tool-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}

.card-glow {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity var(--transition-smooth);
    pointer-events: none;
    z-index: 0;
}

.tool-card:hover .card-glow {
    opacity: 1;
}

/* Per-tool glow colors */
[data-tool="gemini"] .card-glow {
    background: radial-gradient(ellipse at 50% 0%, rgba(66, 133, 244, 0.12), transparent 70%);
}

[data-tool="notebooklm"] .card-glow {
    background: radial-gradient(ellipse at 50% 0%, rgba(249, 115, 22, 0.12), transparent 70%);
}

[data-tool="antigravity"] .card-glow {
    background: radial-gradient(ellipse at 50% 0%, rgba(6, 182, 212, 0.12), transparent 70%);
}

[data-tool="claudecode"] .card-glow {
    background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.15), transparent 60%);
}

[data-tool="nanobanan"] .card-glow {
    background: radial-gradient(circle at top right, rgba(236, 72, 153, 0.15), transparent 60%);
}

[data-tool="pokeranalyzer"] .card-glow {
    background: radial-gradient(circle at top right, rgba(16, 185, 129, 0.15), transparent 60%);
}

[data-tool="scorerecorder"] .card-glow {
    background: radial-gradient(circle at top right, rgba(250, 204, 21, 0.15), transparent 60%);
}

[data-tool="tianjisuan"] .card-glow {
    background: radial-gradient(circle at top right, rgba(168, 85, 247, 0.15), transparent 60%);
}

.card-inner {
    position: relative;
    z-index: 1;
    padding: 32px 28px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--card-radius);
    backdrop-filter: blur(20px);
    transition: background var(--transition-smooth), border-color var(--transition-smooth);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.tool-card:hover .card-inner {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
}

.card-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 18px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: transform var(--transition-spring);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

.tool-card:hover .card-icon {
    transform: scale(1.08);
}

.card-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: -0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Per-tool title colors */
[data-tool="gemini"] .card-title {
    color: #8eb5ff;
}

[data-tool="notebooklm"] .card-title {
    color: #ffc078;
}

[data-tool="antigravity"] .card-title {
    color: #6ee7d0;
}

[data-tool="claudecode"] .card-title {
    color: #fbbf6e;
}

[data-tool="nanobanan"] .card-title {
    color: #f9a8d4;
}

[data-tool="pokeranalyzer"] .card-title {
    color: #6ee7b7;
}

[data-tool="scorerecorder"] .card-title {
    color: #fde047;
}

[data-tool="tianjisuan"] .card-title {
    color: #e879f9;
}

[data-tool="tianjisuan"] .modal-screenshot {
    background: transparent;
    border: none;
}

[data-tool="tianjisuan"] .modal-screenshot img {
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    object-fit: contain;
}

.card-tagline {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 16px;
    font-weight: 300;
    line-height: 1.5;
}

.card-features {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 20px;
}

.feature-tag {
    padding: 3px 10px;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.tool-card:hover .feature-tag {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Per-tool themed feature-tag accents on hover */
[data-tool="gemini"]:hover .feature-tag {
    background: rgba(66, 133, 244, 0.1);
    border-color: rgba(66, 133, 244, 0.2);
    color: #93b4f8;
}

[data-tool="notebooklm"]:hover .feature-tag {
    background: rgba(249, 115, 22, 0.1);
    border-color: rgba(249, 115, 22, 0.2);
    color: #fbb878;
}

[data-tool="antigravity"]:hover .feature-tag {
    background: rgba(6, 182, 212, 0.1);
    border-color: rgba(6, 182, 212, 0.2);
    color: #67e8f9;
}

[data-tool="claudecode"]:hover .feature-tag {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.2);
    color: #fbbf6e;
}

[data-tool="nanobanan"]:hover .feature-tag {
    background: rgba(236, 72, 153, 0.1);
    border-color: rgba(236, 72, 153, 0.2);
    color: #f9a8d4;
}

[data-tool="pokeranalyzer"]:hover .feature-tag {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
}

[data-tool="scorerecorder"]:hover .feature-tag {
    background: rgba(250, 204, 21, 0.1);
    border-color: rgba(250, 204, 21, 0.2);
    color: #fde68a;
}

[data-tool="tianjisuan"]:hover .feature-tag {
    background: rgba(168, 85, 247, 0.1);
    border-color: rgba(168, 85, 247, 0.2);
    color: #d8b4fe;
}


.card-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: var(--btn-radius);
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    font-family: var(--font-body);
    transition: all var(--transition-smooth);
    margin-top: auto;
    width: max-content;
}

.card-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.card-btn svg {
    transition: transform var(--transition-fast);
}

.card-btn:hover svg {
    transform: translateX(3px);
}

/* Per-tool button hover */
[data-tool="gemini"] .card-btn:hover {
    border-color: rgba(66, 133, 244, 0.4);
    color: #8eb5ff;
}

[data-tool="notebooklm"] .card-btn:hover {
    border-color: rgba(249, 115, 22, 0.4);
    color: #ffc078;
}

[data-tool="antigravity"] .card-btn:hover {
    border-color: rgba(6, 182, 212, 0.4);
    color: #6ee7d0;
}

[data-tool="claudecode"] .card-btn:hover {
    border-color: rgba(245, 158, 11, 0.4);
    color: #fbbf6e;
}

[data-tool="nanobanan"] .card-btn:hover {
    border-color: rgba(236, 72, 153, 0.4);
    color: #f9a8d4;
}

[data-tool="pokeranalyzer"] .card-btn:hover {
    border-color: rgba(16, 185, 129, 0.4);
    color: #6ee7b7;
}

[data-tool="scorerecorder"] .card-btn:hover {
    border-color: rgba(250, 204, 21, 0.4);
    color: #fde047;
}

[data-tool="tianjisuan"] .card-btn:hover {
    border-color: rgba(168, 85, 247, 0.4);
    color: #e879f9;
}

/* ===== WORKFLOW SECTION ===== */
.workflow-steps {
    max-width: 700px;
    margin: 0 auto;
}

.workflow-step {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 28px 32px;
    border-radius: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(20px);
    transition: all var(--transition-smooth);
}

.workflow-step:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateX(8px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.step-number {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    min-width: 50px;
}

.step-content {
    flex: 1;
}

.step-content h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.step-content p {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.6;
    font-weight: 300;
}

.step-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

.step-icon {
    font-size: 1.8rem;
}

.workflow-connector {
    width: 2px;
    height: 32px;
    margin: 0 auto;
    background: linear-gradient(to bottom, rgba(102, 126, 234, 0.4), rgba(118, 75, 162, 0.15));
    border-radius: 1px;
    position: relative;
    overflow: hidden;
}

.workflow-connector::after {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(102, 126, 234, 0.8), transparent);
    animation: connectorPulse 2s ease-in-out infinite;
}

@keyframes connectorPulse {
    0% {
        top: -100%;
    }

    100% {
        top: 200%;
    }
}

/* ===== MODALS ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    padding: 20px;
}

#feature-modal-overlay {
    z-index: 1050;
    /* Ensure it stays above main modal */
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    position: relative;
    max-width: 720px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    background: #16161f;
    border: 1px solid var(--border-color);
    border-radius: 28px;
    padding: 48px;
    transform: translateY(30px) scale(0.95);
    transition: transform var(--transition-spring);
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.modal-container::-webkit-scrollbar {
    width: 6px;
}

.modal-container::-webkit-scrollbar-track {
    background: transparent;
}

.modal-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.modal-overlay.active .modal-container {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    z-index: 10;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border-color: var(--border-hover);
}

/* Modal content styles */
.modal-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.2));
}

.modal-title-group h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

.modal-title-group p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 300;
}

.modal-section {
    margin-bottom: 28px;
}

.modal-section h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-section h3 .icon {
    font-size: 1.2rem;
}

.feature-list {
    list-style: none;
    display: grid;
    gap: 12px;
}

.feature-list li {
    padding: 14px 18px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: all var(--transition-fast);
    animation: featureSlideIn 0.4s ease-out both;
}

.feature-list li:nth-child(1) {
    animation-delay: 0.05s;
}

.feature-list li:nth-child(2) {
    animation-delay: 0.1s;
}

.feature-list li:nth-child(3) {
    animation-delay: 0.15s;
}

.feature-list li:nth-child(4) {
    animation-delay: 0.2s;
}

.feature-list li:nth-child(5) {
    animation-delay: 0.25s;
}

.feature-list li:nth-child(6) {
    animation-delay: 0.3s;
}

@keyframes featureSlideIn {
    from {
        opacity: 0;
        transform: translateX(-12px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.feature-list li:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.feature-list li:hover svg {
    opacity: 1 !important;
    transform: translate(2px, -2px);
}

.feature-list li a:hover svg {
    opacity: 1 !important;
    transform: translate(2px, -2px);
    color: var(--text-primary);
}

.feature-list .feat-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.feature-list .feat-text {
    flex: 1;
}

.feature-list .feat-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.feature-list .feat-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    font-weight: 300;
}

.modal-tip {
    padding: 18px 22px;
    border-radius: 16px;
    border-left: 3px solid;
    font-size: 0.9rem;
    line-height: 1.6;
    font-weight: 300;
}

.modal-tip strong {
    font-weight: 600;
    display: block;
    margin-bottom: 6px;
    font-size: 0.95rem;
}

/* Per-tool modal colors */
.modal-content[data-tool="gemini"] .modal-title-group h2 {
    color: #8eb5ff;
}

.modal-content[data-tool="gemini"] .modal-tip {
    border-color: var(--gemini-start);
    background: rgba(66, 133, 244, 0.06);
    color: #b0c8ff;
}

.modal-content[data-tool="gemini"] .modal-section h3 {
    color: #8eb5ff;
}

.modal-content[data-tool="notebooklm"] .modal-title-group h2 {
    color: #ffc078;
}

.modal-content[data-tool="notebooklm"] .modal-tip {
    border-color: var(--notebook-start);
    background: rgba(249, 115, 22, 0.06);
    color: #ffd4a0;
}

.modal-content[data-tool="notebooklm"] .modal-section h3 {
    color: #ffc078;
}

.modal-content[data-tool="antigravity"] .modal-title-group h2 {
    color: #6ee7d0;
}

.modal-content[data-tool="antigravity"] .modal-tip {
    border-color: var(--antigravity-start);
    background: rgba(6, 182, 212, 0.06);
    color: #a0f0e0;
}

.modal-content[data-tool="antigravity"] .modal-section h3 {
    color: #6ee7d0;
}

.modal-content[data-tool="claudecode"] .modal-title-group h2 {
    color: #fbbf6e;
}

.modal-content[data-tool="claudecode"] .modal-tip {
    border-color: var(--claude-start);
    background: rgba(245, 158, 11, 0.06);
    color: #ffd9a0;
}

.modal-content[data-tool="claudecode"] .modal-section h3 {
    color: #fbbf6e;
}

.modal-content[data-tool="nanobanan"] .modal-title-group h2 {
    color: #f9a8d4;
}

.modal-content[data-tool="nanobanan"] .modal-tip {
    border-color: var(--nanobanan-start);
    background: rgba(236, 72, 153, 0.06);
    color: #fbb6d0;
}

.modal-content[data-tool="nanobanan"] .modal-section h3 {
    color: #f9a8d4;
}

.modal-content[data-tool="pokeranalyzer"] .modal-title-group h2 {
    color: #6ee7b7;
}

.modal-content[data-tool="pokeranalyzer"] .modal-tip {
    border-color: var(--poker-start);
    background: rgba(16, 185, 129, 0.06);
    color: #a7f3d0;
}

.modal-content[data-tool="pokeranalyzer"] .modal-section h3 {
    color: #6ee7b7;
}

.modal-content[data-tool="scorerecorder"] .modal-title-group h2 {
    color: #fde047;
}

.modal-content[data-tool="scorerecorder"] .modal-tip {
    border-color: var(--score-start);
    background: rgba(250, 204, 21, 0.06);
    color: #fef08a;
}

.modal-content[data-tool="scorerecorder"] .modal-section h3 {
    color: #fde047;
}

.modal-content[data-tool="tianjisuan"] .modal-title-group h2 {
    color: #e879f9;
}

.modal-content[data-tool="tianjisuan"] .modal-tip {
    border-color: var(--tianji-start);
    background: rgba(168, 85, 247, 0.06);
    color: #f0abfc;
}

.modal-content[data-tool="tianjisuan"] .modal-section h3 {
    color: #e879f9;
}

/* Feature specific highlighted text styles */
.feature-highlight-border {
    transition: border-color var(--transition-fast);
}

#feature-modal-content .modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

#feature-modal-content .modal-section p {
    margin-bottom: 16px;
}

#feature-modal-content .modal-section p:last-child {
    margin-bottom: 0;
}

#feature-modal-content .modal-section strong {
    color: var(--text-primary);
    font-weight: 500;
}

/* Modal screenshot */
.modal-screenshot {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    cursor: zoom-in;
}

.modal-screenshot img {
    width: 100%;
    flex: 1;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.modal-screenshot:hover img {
    transform: scale(1.02);
}

.screenshot-caption {
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.5);
    color: var(--text-muted);
    font-size: 0.75rem;
    text-align: center;
    font-weight: 400;
    letter-spacing: 0.3px;
}

/* Reference list */
.reference-list {
    list-style: none;
    display: grid;
    gap: 8px;
}

.reference-list li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 400;
    transition: all var(--transition-fast);
}

.reference-list li a:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.ref-icon {
    font-size: 0.9rem;
    flex-shrink: 0;
}

.ref-title {
    flex: 1;
}

.ref-arrow {
    flex-shrink: 0;
    opacity: 0;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.reference-list li a:hover .ref-arrow {
    opacity: 1;
    transform: translate(2px, -2px);
}

.audience-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.audience-tag {
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 0.82rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    backdrop-filter: blur(8px);
    transition: all var(--transition-fast);
}

.audience-tag:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    transform: translateY(-1px);
}

/* ===== 寄语 (CLOSING MESSAGE) ===== */
.message-section {
    position: relative;
    z-index: 2;
    padding: 100px 40px 80px;
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
    overflow: hidden;
}

.message-glow {
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(244, 114, 71, 0.1) 0%, rgba(234, 88, 12, 0.04) 40%, transparent 70%);
    pointer-events: none;
    animation: heroGlowPulse 6s ease-in-out infinite;
}

.message-emoji {
    font-size: 3.5rem;
    margin-bottom: 24px;
    animation: bounceDown 2s ease-in-out infinite;
    display: inline-block;
}

.message-title {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 28px;
    letter-spacing: -0.5px;
}

.message-body {
    font-size: 1.05rem;
    line-height: 2;
    color: var(--text-secondary);
    font-weight: 300;
    margin-bottom: 32px;
}

.message-body strong {
    color: var(--text-primary);
    font-weight: 600;
}

.message-quote {
    position: relative;
    display: inline-block;
    text-align: left;
    padding: 20px 28px;
    margin: 0 auto 20px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-left: 3px solid;
    border-image: linear-gradient(to bottom, #667eea, #764ba2) 1;
    font-style: italic;
    font-size: 1.05rem;
    line-height: 1.9;
    color: #c4b5fd;
    font-weight: 400;
}

.message-sign {
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 400;
    letter-spacing: 0.5px;
    margin-top: 16px;
}

/* ===== FOOTER ===== */
#footer {
    position: relative;
    z-index: 2;
    padding: 60px 40px;
    text-align: center;
    border-top: 1px solid var(--border-color);
    overflow: hidden;
}

.footer-glow {
    position: absolute;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 160px;
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.04) 50%, transparent 80%);
    pointer-events: none;
}

.footer-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 32px;
    margin-bottom: 32px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 400;
    letter-spacing: 0.3px;
}

.stat-divider {
    width: 1px;
    height: 36px;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.footer-text {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.footer-sub {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 300;
    letter-spacing: 0.5px;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    #bg-canvas,
    #mouse-glow {
        display: none !important;
    }

    .tool-card:hover,
    .workflow-step:hover,
    .feature-list li:hover,
    .modal-screenshot:hover img {
        transform: none !important;
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1100px) {
    .tools-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 860px) {
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 80px 20px;
    }

    .card-inner {
        padding: 28px 24px;
    }

    .workflow-step {
        padding: 20px 24px;
        gap: 16px;
    }

    .step-number {
        font-size: 1.5rem;
        min-width: 40px;
    }

    .modal-container {
        padding: 32px 24px;
        border-radius: 20px;
        margin: 16px;
    }

    .modal-overlay {
        padding: 16px;
    }

    .modal-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    #feature-modal-container {
        max-width: 100% !important;
        border-radius: 16px;
    }

    .hero-subtitle br {
        display: none;
    }

    .message-section {
        padding: 60px 20px 40px;
    }

    .message-body {
        font-size: 0.95rem;
        line-height: 1.8;
    }

    .message-quote {
        font-size: 0.95rem;
    }

    .footer-stats {
        gap: 20px;
    }

    .stat-number {
        font-size: 1.6rem;
    }

    #back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 540px) {
    .tools-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-title {
        letter-spacing: -1px;
    }

    .hero-cta {
        padding: 14px 28px;
    }

    .section-header {
        margin-bottom: 48px;
    }
}

/* ===== IMAGE VIEWER ===== */
.image-viewer {
    display: flex;
    position: fixed;
    z-index: 2000;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    align-items: center;
    justify-content: center;
    padding: 20px;
    transition: all var(--transition-smooth);
    cursor: zoom-out;
}

.image-viewer.active {
    opacity: 1;
    visibility: visible;
}

.viewer-content {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    background: #000;
    transform: scale(0.95);
    transition: transform var(--transition-spring);
    cursor: default;
    object-fit: contain;
}

.image-viewer.active .viewer-content {
    transform: scale(1);
}

.viewer-close {
    position: absolute;
    top: 30px;
    right: 40px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 40px;
    cursor: pointer;
    transition: color 0.2s;
}

.viewer-close:hover {
    color: #fff;
}