/* ===== Design Tokens ===== */
:root {
    --bg-primary: #0a0e17;
    --bg-secondary: #111827;
    --bg-card: #151d2e;
    --bg-card-hover: #1a2540;
    --bg-modal: #131b2e;
    --bg-surface: rgba(255, 255, 255, 0.03);

    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-medium: rgba(255, 255, 255, 0.1);
    --border-strong: rgba(255, 255, 255, 0.15);

    --text-primary: #f0f4f8;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --accent-green: #68d391;
    --accent-yellow: #ffd43b;
    --accent-blue: #63b3ed;
    --accent-purple: #a78bfa;
    --accent-gradient: linear-gradient(135deg, #68d391, #63b3ed, #a78bfa);

    --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
    --shadow-xl: 0 16px 48px rgba(0,0,0,0.6);
    --shadow-glow: 0 0 40px rgba(104,211,145,0.15);

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-default: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

ul {
    list-style: none;
}

/* ===== Particle Canvas ===== */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.4;
}

/* ===== Header ===== */
#site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(10, 14, 23, 0.7);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border-bottom: 1px solid var(--border-subtle);
    transition: background var(--transition-default);
}

#site-header.scrolled {
    background: rgba(10, 14, 23, 0.92);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: -0.02em;
    transition: opacity var(--transition-fast);
}

.logo:hover {
    opacity: 0.8;
}

.logo-icon {
    font-size: 1.4rem;
}

.logo-accent {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#main-nav {
    display: flex;
    gap: 8px;
}

.nav-link {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-surface);
}

/* ===== Hero ===== */
#hero {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 24px 80px;
}

.hero-content {
    max-width: 800px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    background: rgba(104, 211, 145, 0.08);
    border: 1px solid rgba(104, 211, 145, 0.2);
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-green);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 24px;
    animation: fadeInUp 0.6s ease-out;
}

h1 {
    font-size: clamp(2.5rem, 6vw, 4.2rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
    animation: fadeInUp 0.6s ease-out 0.1s both;
}

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 36px;
    line-height: 1.7;
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 56px;
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    animation: fadeInUp 0.6s ease-out 0.4s both;
}

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

.stat-value {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    font-family: var(--font-mono);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
}

.stat-divider {
    width: 1px;
    height: 32px;
    background: var(--border-medium);
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all var(--transition-default);
    white-space: nowrap;
    font-family: var(--font-sans);
}

.btn-primary {
    background: var(--accent-gradient);
    color: #0a0e17;
    box-shadow: 0 4px 16px rgba(104, 211, 145, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(104, 211, 145, 0.35);
}

.btn-ghost {
    background: var(--bg-surface);
    border: 1px solid var(--border-medium);
    color: var(--text-primary);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border-strong);
    transform: translateY(-2px);
}

.btn-download {
    background: linear-gradient(135deg, #68d391, #48bb78);
    color: #0a0e17;
    font-weight: 700;
    box-shadow: 0 4px 16px rgba(104, 211, 145, 0.3);
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(104, 211, 145, 0.4);
}

.btn-details {
    background: transparent;
    border: 1px solid var(--border-medium);
    color: var(--text-secondary);
}

.btn-details:hover {
    border-color: var(--border-strong);
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}

.btn-lg {
    padding: 14px 28px;
    font-size: 0.95rem;
}

/* ===== Plugins Section ===== */
#plugins {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 24px 120px;
}

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

.section-header h2 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 10px;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.plugins-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 24px;
}

/* ===== Plugin Card ===== */
.plugin-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all var(--transition-slow);
}

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

.card-glow {
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 2px;
    background: var(--glow-color, var(--accent-green));
    border-radius: 999px;
    opacity: 0;
    transition: opacity var(--transition-slow);
    box-shadow: 0 0 20px var(--glow-color, var(--accent-green));
}

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

.card-header {
    padding: 28px 28px 0;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.plugin-logo {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-md);
    object-fit: cover;
    border: 2px solid var(--border-subtle);
    flex-shrink: 0;
    transition: border-color var(--transition-default);
}

.plugin-card:hover .plugin-logo {
    border-color: var(--border-medium);
}

.card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.badge {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.badge-version {
    background: rgba(167, 139, 250, 0.12);
    color: var(--accent-purple);
    border: 1px solid rgba(167, 139, 250, 0.2);
}

.badge-platform {
    background: rgba(99, 179, 237, 0.1);
    color: var(--accent-blue);
    border: 1px solid rgba(99, 179, 237, 0.15);
}

.card-body {
    padding: 20px 28px;
    flex: 1;
}

.plugin-name {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.plugin-tagline {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 18px;
}

.feature-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.feature-pills li {
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all var(--transition-fast);
}

.plugin-card:hover .feature-pills li {
    border-color: var(--border-medium);
}

.card-footer {
    padding: 20px 28px 28px;
    display: flex;
    gap: 10px;
}

.card-footer .btn {
    flex: 1;
    justify-content: center;
    font-size: 0.85rem;
    padding: 10px 16px;
}

/* ===== Compatibility Section ===== */
#compatibility {
    position: relative;
    z-index: 1;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
}

.compat-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 24px;
    text-align: center;
}

.compat-inner h2 {
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 40px;
}

.compat-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

.compat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    transition: all var(--transition-default);
}

.compat-item:hover {
    border-color: var(--border-medium);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.compat-icon {
    font-size: 1.3rem;
}

.compat-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* ===== Footer ===== */
#site-footer {
    position: relative;
    z-index: 1;
    padding: 48px 24px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.footer-links a {
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: color var(--transition-fast);
    font-weight: 500;
}

.footer-links a:hover {
    color: var(--text-primary);
}

.footer-copy {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ===== Modal ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-default);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal {
    background: var(--bg-modal);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 800px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(20px) scale(0.97);
    transition: transform var(--transition-default);
    box-shadow: var(--shadow-xl);
}

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

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

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

.modal::-webkit-scrollbar-thumb {
    background: var(--border-medium);
    border-radius: 999px;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border-subtle);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    z-index: 10;
    line-height: 1;
}

.modal-close:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--border-medium);
}

.modal-header {
    padding: 32px 32px 0;
    display: flex;
    align-items: center;
    gap: 20px;
}

.modal-logo {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-md);
    object-fit: cover;
    border: 2px solid var(--border-subtle);
    flex-shrink: 0;
}

.modal-title-area h2 {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.modal-badges {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.modal-body {
    padding: 28px 32px;
}

.modal-body h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-top: 28px;
    margin-bottom: 12px;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.modal-body h3:first-child {
    margin-top: 0;
}

.modal-body p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 12px;
}

.modal-body .feature-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

.modal-body .feature-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
}

.feature-item-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.feature-item-content {
    flex: 1;
}

.feature-item-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.feature-item-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.modal-body .commands-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
    font-size: 0.85rem;
}

.commands-table th {
    text-align: left;
    padding: 10px 14px;
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.commands-table td {
    padding: 9px 14px;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-secondary);
}

.commands-table td:first-child {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent-green);
    white-space: nowrap;
}

.modal-body .config-block {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 18px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    line-height: 1.7;
    color: var(--text-secondary);
    overflow-x: auto;
    white-space: pre;
    margin-bottom: 16px;
}

.modal-body .note-block {
    padding: 14px 18px;
    background: rgba(255, 212, 59, 0.06);
    border: 1px solid rgba(255, 212, 59, 0.15);
    border-radius: var(--radius-md);
    font-size: 0.84rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.note-block strong {
    color: var(--accent-yellow);
}

.modal-body .modal-bullet-list {
    list-style: none;
    padding: 0;
    margin: 0 0 16px 0;
}

.modal-body .modal-bullet-list li {
    position: relative;
    padding: 8px 0 8px 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
    border-bottom: 1px solid var(--border-subtle);
}

.modal-body .modal-bullet-list li:last-child {
    border-bottom: none;
}

.modal-body .modal-bullet-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent-green);
    font-weight: 700;
    font-size: 1rem;
}

.modal-body code {
    font-family: var(--font-mono);
    font-size: 0.82em;
    background: rgba(104, 211, 145, 0.08);
    color: var(--accent-green);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(104, 211, 145, 0.12);
}

.modal-body a {
    color: var(--accent-blue);
    text-decoration: underline;
    text-decoration-color: rgba(99, 179, 237, 0.3);
    text-underline-offset: 2px;
    transition: text-decoration-color var(--transition-fast);
}

.modal-body a:hover {
    text-decoration-color: var(--accent-blue);
}

.feature-item-desc code {
    font-size: 0.78em;
}

.modal-footer {
    padding: 0 32px 32px;
    display: flex;
    gap: 12px;
}

.modal-footer .btn {
    flex: 1;
    justify-content: center;
}

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

/* Card entrance animation */
.plugin-card {
    animation: fadeInUp 0.5s ease-out both;
}

.plugin-card:nth-child(1) { animation-delay: 0.1s; }
.plugin-card:nth-child(2) { animation-delay: 0.2s; }
.plugin-card:nth-child(3) { animation-delay: 0.3s; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .plugins-grid {
        grid-template-columns: 1fr;
    }

    .hero-stats {
        gap: 20px;
    }

    .stat-value {
        font-size: 1.2rem;
    }

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

    .modal-footer {
        flex-direction: column;
    }

    .card-header {
        flex-direction: column;
    }

    .compat-grid {
        gap: 10px;
    }

    .compat-item {
        padding: 10px 16px;
    }
}

@media (max-width: 420px) {
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .card-footer {
        flex-direction: column;
    }

    .modal {
        border-radius: var(--radius-lg);
    }

    .modal-body,
    .modal-header,
    .modal-footer {
        padding-left: 20px;
        padding-right: 20px;
    }
}
