/* style.css */

/* =========================================
   1. VARIABLES & THEME SETUP
   ========================================= */
:root {
    /* Light Mode (Default) */
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --text: #0f172a;
    --text-muted: #64748b;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --border: #e2e8f0;
    --input-bg: #ffffff;
    --success: #22c55e;
    --danger: #ef4444;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

body.dark-mode {
    /* Dark Mode Overrides */
    --bg: #0f172a;
    --card-bg: #1e293b;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --primary: #3b82f6;
    --primary-hover: #60a5fa;
    --border: #334155;
    --input-bg: #0f172a;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
}

/* =========================================
   2. GLOBAL RESET
   ========================================= */
* { box-sizing: border-box; }

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    margin: 0;
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 { margin-top: 0; color: var(--text); }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }
.mono { font-family: 'JetBrains Mono', monospace; }

/* =========================================
   3. HEADER & TOGGLE BUTTON
   ========================================= */
.container { max-width: 1000px; margin: 0 auto; padding: 0 20px; }

header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content { display: flex; justify-content: space-between; align-items: center; }
.logo { font-weight: 700; font-size: 1.4rem; color: var(--text); }
.dot { color: var(--primary); }

nav { display: flex; align-items: center; gap: 20px; }
.nav-link { color: var(--text-muted); font-weight: 500; font-size: 0.9rem; }
.nav-link:hover { color: var(--primary); }

/* THEME TOGGLE BUTTON */
.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.btn-icon:hover { background: rgba(0,0,0,0.05); color: var(--primary); }
body.dark-mode .btn-icon:hover { background: rgba(255,255,255,0.1); }

.sun-icon { display: none; }
.moon-icon { display: block; }
body.dark-mode .sun-icon { display: block; }
body.dark-mode .moon-icon { display: none; }

.btn-primary-small {
    background: var(--primary);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* =========================================
   4. PAGE SECTIONS
   ========================================= */
.hero { text-align: center; padding: 80px 0; }
.hero h1 { font-size: 3rem; margin-bottom: 20px; }
.subtitle { color: var(--text-muted); font-size: 1.2rem; margin-bottom: 40px; }

.badge {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 20px;
}

.counter-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px;
    max-width: 450px;
    margin: 0 auto 60px auto;
    box-shadow: var(--shadow);
}
.counter-display {
    font-family: 'JetBrains Mono', monospace;
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 25px;
}

/* Status Pills */
.status-grid { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.status-pill {
    display: inline-flex; align-items: center; padding: 6px 14px;
    border-radius: 50px; font-size: 0.8rem; font-weight: 500;
    background: var(--bg); border: 1px solid var(--border); color: var(--text-muted);
}
.status-pill.online { background: rgba(34, 197, 94, 0.1); color: var(--success); border-color: rgba(34, 197, 94, 0.2); }
.status-pill.offline { background: rgba(239, 68, 68, 0.1); color: var(--danger); border-color: rgba(239, 68, 68, 0.2); }
.pulse { width: 8px; height: 8px; background-color: currentColor; border-radius: 50%; margin-right: 8px; animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0px rgba(34, 197, 94, 0.4); } 100% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); } }

/* Features */
.features { display: flex; justify-content: center; align-items: center; gap: 30px; margin-top: 60px; }
.feature-item p { color: var(--text-muted); font-size: 0.9rem; }
.arrow { font-size: 1.5rem; color: var(--border); }

/* Auth Pages */
.centered-body { min-height: 90vh; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.auth-card { background: var(--card-bg); width: 100%; max-width: 400px; padding: 40px; border-radius: 12px; border: 1px solid var(--border); box-shadow: var(--shadow); }
.subtitle-small { text-align: center; color: var(--text-muted); margin-bottom: 25px; }

input { width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--input-bg); color: var(--text); outline: none; margin-bottom: 20px; }
label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 8px; color: var(--text-muted); }
.btn-primary { width: 100%; padding: 12px; background: var(--primary); color: white; border: none; border-radius: 6px; font-weight: 600; cursor: pointer; }
.auth-footer { text-align: center; margin-top: 25px; color: var(--text-muted); font-size: 0.9rem; }
.alert { background: rgba(239, 68, 68, 0.1); color: var(--danger); padding: 10px; border-radius: 6px; margin-bottom: 20px; text-align: center; }

/* Dashboard Tables */
.table-card { background: var(--card-bg); border-radius: 12px; border: 1px solid var(--border); overflow: hidden; margin-top: 20px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 16px 24px; text-align: left; border-bottom: 1px solid var(--border); color: var(--text); }
th { background: rgba(0,0,0,0.02); color: var(--text-muted); font-size: 0.8rem; text-transform: uppercase; }
.status-badge { padding: 4px 10px; border-radius: 4px; font-size: 0.8rem; font-weight: 600; }
.status-badge.success { background: rgba(34, 197, 94, 0.1); color: var(--success); }
.status-badge.failure { background: rgba(239, 68, 68, 0.1); color: var(--danger); }

/* Wiki/Setup */
.wiki-section { background: var(--card-bg); padding: 30px; border-radius: 8px; border: 1px solid var(--border); margin-bottom: 30px; }
.wiki-section ul { color: var(--text-muted); }

footer { text-align: center; padding: 60px 0; color: var(--text-muted); font-size: 0.9rem; }

@media (max-width: 768px) {
    .features { flex-direction: column; }
    .arrow { transform: rotate(90deg); }
    th, td { padding: 12px 15px; }
}

/* =========================================
   TIMELINE SECTION
   ========================================= */
.timeline-section {
    padding: 80px 0;
    max-width: 600px;
    margin: 0 auto;
}

.timeline-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 50px;
}

.timeline {
    position: relative;
    padding-left: 30px;
    border-left: 2px solid var(--border);
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
    padding-left: 20px;
}

.timeline-dot {
    position: absolute;
    left: -39px; /* Adjust to center on line */
    top: 5px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary);
    border: 4px solid var(--card-bg); /* Creates the "cutout" effect */
    box-shadow: 0 0 0 1px var(--primary);
}

.timeline-dot.start-dot {
    background: var(--text-muted);
    box-shadow: 0 0 0 1px var(--text-muted);
}

.timeline-content {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: transform 0.2s;
}

.timeline-content:hover {
    transform: translateY(-3px);
}

.timeline-date {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.timeline-content h3 {
    margin: 0 0 5px 0;
    font-size: 1.2rem;
}

.timeline-content p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Dark Mode Adjustments */
body.dark-mode .timeline-dot {
    border-color: var(--bg); /* Dot border matches dark background */
}
