@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a2e;
    --bg-card-hover: #1f1f35;
    --accent: #6c5ce7;
    --accent-glow: rgba(108, 92, 231, 0.3);
    --accent-light: #a29bfe;
    --green: #00e676;
    --green-glow: rgba(0, 230, 118, 0.2);
    --orange: #ff9100;
    --red: #ff5252;
    --text-primary: #e8e8f0;
    --text-secondary: #8888a0;
    --text-dim: #55556a;
    --border: #2a2a40;
    --gradient-1: linear-gradient(135deg, #6c5ce7, #a29bfe);
    --gradient-2: linear-gradient(135deg, #00e676, #69f0ae);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

a { color: var(--accent-light); text-decoration: none; }
a:hover { color: var(--accent); }

.navbar {
    position: fixed; top: 0; width: 100%; z-index: 1000;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 0 2rem;
}
.navbar-inner {
    max-width: 1200px; margin: 0 auto;
    display: flex; justify-content: space-between; align-items: center;
    height: 64px;
}
.logo {
    font-size: 1.5rem; font-weight: 800;
    background: var(--gradient-1); -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.logo span { font-weight: 400; opacity: 0.7; }
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
    color: var(--text-secondary); font-size: 0.9rem; font-weight: 500;
    transition: color 0.3s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text-primary); }

.hero {
    min-height: 100vh; display: flex; flex-direction: column;
    align-items: center; justify-content: center; text-align: center;
    padding: 6rem 2rem 4rem;
    position: relative;
}
.hero::before {
    content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 600px; height: 600px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    pointer-events: none;
}
.hero-badge {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 50px; padding: 0.4rem 1.2rem;
    font-size: 0.85rem; color: var(--text-secondary);
    margin-bottom: 2rem;
}
.hero-badge .dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--green); animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 var(--green-glow); }
    50% { opacity: 0.7; box-shadow: 0 0 0 8px transparent; }
}
.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 900;
    line-height: 1.1; margin-bottom: 1.5rem;
    max-width: 800px;
}
.hero h1 .gradient {
    background: var(--gradient-1); -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero p {
    font-size: 1.2rem; color: var(--text-secondary);
    max-width: 600px; margin-bottom: 3rem;
}

.live-stats {
    display: flex; gap: 3rem; flex-wrap: wrap; justify-content: center;
    margin-bottom: 3rem;
}
.stat-item { text-align: center; }
.stat-value {
    font-size: 2rem; font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent-light);
}
.stat-value.green { color: var(--green); }
.stat-label {
    font-size: 0.8rem; color: var(--text-dim);
    text-transform: uppercase; letter-spacing: 1px;
}

.btn-group { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }
.btn {
    padding: 0.9rem 2rem; border-radius: 12px; font-size: 1rem;
    font-weight: 600; cursor: pointer; transition: all 0.3s;
    border: none; font-family: 'Inter', sans-serif;
    display: inline-flex; align-items: center; gap: 0.5rem;
}
.btn-primary {
    background: var(--gradient-1); color: white;
    box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px var(--accent-glow); }
.btn-secondary {
    background: var(--bg-card); color: var(--text-primary);
    border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--bg-card-hover); border-color: var(--accent); }
.btn-green {
    background: var(--gradient-2); color: #0a0a0f;
    box-shadow: 0 4px 20px var(--green-glow);
}
.btn-green:hover { transform: translateY(-2px); box-shadow: 0 8px 30px var(--green-glow); }

.features {
    max-width: 1200px; margin: 0 auto; padding: 6rem 2rem;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}
.feature-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 16px; padding: 2rem;
    transition: all 0.3s;
}
.feature-card:hover {
    border-color: var(--accent); transform: translateY(-4px);
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}
.feature-icon {
    width: 48px; height: 48px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; margin-bottom: 1rem;
    background: var(--accent-glow);
}
.feature-card h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.feature-card p { color: var(--text-secondary); font-size: 0.95rem; }

.section {
    max-width: 1000px; margin: 0 auto; padding: 6rem 2rem;
}
.section-title {
    font-size: 2.5rem; font-weight: 800; text-align: center;
    margin-bottom: 1rem;
}
.section-sub {
    text-align: center; color: var(--text-secondary);
    max-width: 600px; margin: 0 auto 3rem;
}
.steps { display: flex; flex-direction: column; gap: 2rem; }
.step {
    display: flex; gap: 1.5rem; align-items: flex-start;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 16px; padding: 1.5rem 2rem;
}
.step-num {
    font-size: 2rem; font-weight: 900; color: var(--accent);
    font-family: 'JetBrains Mono', monospace;
    min-width: 50px;
}
.step h4 { font-size: 1.1rem; margin-bottom: 0.3rem; }
.step p { color: var(--text-secondary); font-size: 0.9rem; }

.server-notice {
    max-width: 800px; margin: 2rem auto;
    background: rgba(255, 145, 0, 0.08);
    border: 1px solid rgba(255, 145, 0, 0.3);
    border-radius: 12px; padding: 1.2rem 1.5rem;
    display: flex; align-items: center; gap: 1rem;
    font-size: 0.9rem; color: var(--orange);
}
.server-notice .icon { font-size: 1.5rem; flex-shrink: 0; }

.chat-container {
    max-width: 900px; margin: 80px auto 0; padding: 1rem;
    height: calc(100vh - 80px); display: flex; flex-direction: column;
}
.chat-header {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 16px 16px 0 0; padding: 1rem 1.5rem;
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 0.5rem;
}
.chat-model-info {
    font-size: 0.8rem; color: var(--text-dim);
    font-family: 'JetBrains Mono', monospace;
}
.chat-status { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; }
.chat-status .dot-online { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.chat-status .dot-busy { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); animation: pulse 1s infinite; }
.chat-messages {
    flex: 1; overflow-y: auto; padding: 1.5rem;
    background: var(--bg-secondary); border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    display: flex; flex-direction: column; gap: 1rem;
}
.message {
    max-width: 75%; padding: 1rem 1.2rem;
    border-radius: 16px; font-size: 0.95rem;
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; } }
.message.user {
    align-self: flex-end;
    background: var(--accent); color: white;
    border-bottom-right-radius: 4px;
}
.message.ai {
    align-self: flex-start;
    background: var(--bg-card); border: 1px solid var(--border);
    border-bottom-left-radius: 4px;
}
.message.system {
    align-self: center; max-width: 90%;
    background: rgba(255, 145, 0, 0.08);
    border: 1px solid rgba(255, 145, 0, 0.2);
    color: var(--orange); font-size: 0.85rem;
    text-align: center;
}
.message .response-time {
    font-size: 0.7rem; color: var(--text-dim);
    margin-top: 0.4rem;
}
.typing-indicator {
    display: none; align-self: flex-start;
    padding: 1rem 1.2rem;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 16px; border-bottom-left-radius: 4px;
}
.typing-indicator.active { display: flex; }
.typing-dots { display: flex; gap: 4px; }
.typing-dots span {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--text-dim);
    animation: typing 1.4s infinite;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing {
    0%, 100% { opacity: 0.3; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(-4px); }
}
.chat-input-area {
    display: flex; gap: 0.5rem; padding: 1rem;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 0 0 16px 16px;
}
.chat-input {
    flex: 1; padding: 0.8rem 1.2rem; border-radius: 12px;
    background: var(--bg-secondary); border: 1px solid var(--border);
    color: var(--text-primary); font-size: 0.95rem;
    font-family: 'Inter', sans-serif; outline: none;
    transition: border-color 0.3s;
}
.chat-input:focus { border-color: var(--accent); }
.chat-input:disabled { opacity: 0.5; }
.chat-send {
    padding: 0.8rem 1.5rem; border-radius: 12px;
    background: var(--gradient-1); border: none;
    color: white; font-weight: 600; cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s;
}
.chat-send:hover { transform: scale(1.05); }
.chat-send:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.queue-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(10, 10, 15, 0.9); backdrop-filter: blur(10px);
    display: none; align-items: center; justify-content: center;
    z-index: 2000;
}
.queue-overlay.active { display: flex; }
.queue-box {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 20px; padding: 3rem; text-align: center;
    max-width: 400px;
}
.queue-box h2 { margin-bottom: 1rem; }
.queue-position {
    font-size: 4rem; font-weight: 900;
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent-light);
}
.queue-box p { color: var(--text-secondary); margin-top: 0.5rem; }

.dashboard {
    max-width: 1200px; margin: 80px auto 0; padding: 2rem;
}
.dashboard-grid {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem; margin-bottom: 3rem;
}
.dash-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 16px; padding: 1.5rem;
}
.dash-card .label { font-size: 0.8rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px; }
.dash-card .value {
    font-size: 2rem; font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    margin: 0.3rem 0;
}
.dash-card .value.purple { color: var(--accent-light); }
.dash-card .value.green { color: var(--green); }
.dash-card .value.orange { color: var(--orange); }
.dash-card .change { font-size: 0.85rem; color: var(--green); }

.chart-container {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 16px; padding: 2rem; margin-bottom: 2rem;
    min-height: 300px; position: relative;
}
.chart-container h3 { margin-bottom: 1rem; }
.chart-placeholder {
    display: flex; align-items: center; justify-content: center;
    height: 250px; color: var(--text-dim);
}

.leaderboard {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 16px; padding: 2rem;
}
.leaderboard h3 { margin-bottom: 1.5rem; }
.leader-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.8rem 1rem; border-radius: 10px;
    transition: background 0.2s;
}
.leader-row:hover { background: var(--bg-card-hover); }
.leader-rank { width: 40px; font-weight: 700; color: var(--accent-light); font-family: 'JetBrains Mono', monospace; }
.leader-name { flex: 1; font-weight: 500; }
.leader-blocks { font-family: 'JetBrains Mono', monospace; color: var(--text-secondary); }
.leader-row:first-child .leader-rank { color: #ffd700; }
.leader-row:nth-child(2) .leader-rank { color: #c0c0c0; }
.leader-row:nth-child(3) .leader-rank { color: #cd7f32; }

.donate-hero {
    max-width: 800px; margin: 100px auto 0; padding: 2rem;
    text-align: center;
}
.donate-hero h1 { font-size: 3rem; font-weight: 900; margin-bottom: 1rem; }
.donate-hero p { color: var(--text-secondary); font-size: 1.1rem; margin-bottom: 2rem; }

.requirements {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem; max-width: 800px; margin: 0 auto 3rem;
}
.req-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 12px; padding: 1.2rem; text-align: center;
}
.req-card .req-val { font-size: 1.5rem; font-weight: 700; color: var(--accent-light); }
.req-card .req-label { font-size: 0.8rem; color: var(--text-dim); }

.terminal {
    background: #0d1117; border: 1px solid #30363d;
    border-radius: 12px; padding: 1.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem; text-align: left;
    max-width: 700px; margin: 0 auto 2rem;
    overflow-x: auto;
}
.terminal .comment { color: #8b949e; }
.terminal .cmd { color: var(--green); }
.terminal .output { color: var(--text-secondary); }

.footer {
    text-align: center; padding: 3rem 2rem;
    border-top: 1px solid var(--border);
    color: var(--text-dim); font-size: 0.85rem;
}
.footer a { color: var(--text-secondary); }

/* Hamburger menu */
.hamburger {
    display: none; cursor: pointer; flex-direction: column;
    gap: 5px; padding: 5px; z-index: 1100;
}
.hamburger span {
    width: 24px; height: 2px; background: var(--text-primary);
    transition: all 0.3s;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile menu overlay */
.mobile-menu {
    display: none; position: fixed; top: 64px; left: 0;
    width: 100%; height: calc(100vh - 64px);
    background: rgba(10, 10, 15, 0.95); backdrop-filter: blur(20px);
    z-index: 1050; flex-direction: column;
    align-items: center; justify-content: center; gap: 2rem;
}
.mobile-menu.active { display: flex; }
.mobile-menu a {
    font-size: 1.5rem; font-weight: 600;
    color: var(--text-secondary); transition: color 0.3s;
}
.mobile-menu a:hover, .mobile-menu a.active { color: var(--text-primary); }

/* Phone warning banner */
.phone-warning {
    display: none; position: fixed; bottom: 0; left: 0; width: 100%;
    background: rgba(255, 145, 0, 0.95); color: #0a0a0f;
    text-align: center; padding: 0.8rem 1rem;
    font-size: 0.85rem; font-weight: 600; z-index: 3000;
}
.phone-warning a { color: #0a0a0f; text-decoration: underline; }

@media (max-width: 768px) {
    .nav-links { display: none !important; }
    .hamburger { display: flex; }
    .phone-warning { display: block; }
    .hero h1 { font-size: 2.2rem; }
    .hero { padding-bottom: 6rem; }
    .live-stats { gap: 1.5rem; }
    .stat-value { font-size: 1.5rem; }
    .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
    .step { flex-direction: column; }
    .message { max-width: 90%; }
    .donate-hero h1 { font-size: 2rem; }
    .chat-container { margin-bottom: 50px; }
    .footer { padding-bottom: 5rem; }
}
