@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --bg: #0b0f19;
    --surface: rgba(255, 255, 255, 0.015);
    --surface-hover: rgba(255, 255, 255, 0.04);
    --border: rgba(255, 255, 255, 0.06);
    --border-strong: rgba(255, 255, 255, 0.12);
    --text: #ffffff;
    --text-dim: #94a3b8;
    --accent: #5865F2; /* Discord Blurple */
    --accent-glow: rgba(88, 101, 242, 0.2);
    --primary: #ff6a00;
    --primary-glow: rgba(255, 106, 0, 0.2);
    --success: #10b981;
    --danger: #ef4444;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --radius-s: 8px;
    --radius-m: 12px;
    --radius-l: 16px;
    --nav-height: 70px;
}

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

body {
    background: radial-gradient(circle at top, #0f172a 0%, #0b0f19 100%);
    color: var(--text);
    font-family: var(--font);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Typography */
h1 { font-size: 2rem; font-weight: 900; letter-spacing: -0.02em; margin-bottom: 8px; }
h2 { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.01em; }
h3 { font-size: 1.1rem; font-weight: 700; }
.text-dim { color: var(--text-dim); font-size: 0.95rem; }

/* Layout */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px;
}

@media (max-width: 768px) {
    .main-content {
        padding: 24px 16px;
    }
}

/* Navigation */
.navbar {
    height: var(--nav-height);
    background: rgba(11, 15, 25, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text);
}

.nav-brand img {
    height: 36px;
    filter: drop-shadow(0 0 8px rgba(255, 106, 0, 0.3));
}

.nav-brand span {
    font-weight: 800;
    letter-spacing: -0.01em;
    font-size: 1.1rem;
}

.nav-links {
    display: flex;
    gap: 12px;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .nav-links.mobile-active {
        display: flex;
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        bottom: 0;
        background: #0b0f19;
        flex-direction: column;
        padding: 24px;
        gap: 16px;
        z-index: 999;
    }
}

.nav-item {
    padding: 10px 20px;
    text-decoration: none;
    color: var(--text-dim);
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: var(--radius-s);
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.nav-item:hover {
    color: var(--text);
    background: var(--surface-hover);
    border-color: var(--border);
}

.nav-item.active {
    color: white;
    background: linear-gradient(135deg, var(--primary) 0%, #ff8c3a 100%);
    box-shadow: 0 4px 15px rgba(255, 106, 0, 0.2);
}

/* Cards */
.card {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius-m);
    padding: 28px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.card:hover {
    border-color: var(--border-strong);
    background: var(--surface-hover);
    transform: translateY(-2px);
}

/* Grid Layouts */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.user-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

@media (max-width: 480px) {
    .stats-grid, .user-grid {
        grid-template-columns: 1fr;
    }
}

/* Stat Card */
.stat-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
}

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

.stat-value {
    font-size: 1.8rem;
    font-weight: 900;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 22px;
    border-radius: var(--radius-s);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #ff8c3a 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 106, 0, 0.2);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 106, 0, 0.3);
}

.btn-outline {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-outline:hover {
    background: var(--surface-hover);
    border-color: var(--border-strong);
    transform: translateY(-1px);
}

/* Badges */
.badge {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid transparent;
}

.badge-success { 
    background: rgba(16, 185, 129, 0.08); 
    color: var(--success); 
    border-color: rgba(16, 185, 129, 0.15);
}
.badge-danger { 
    background: rgba(239, 68, 68, 0.08); 
    color: var(--danger); 
    border-color: rgba(239, 68, 68, 0.15);
}
.badge-neutral {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-dim);
    border-color: var(--border);
}

/* Forms */
.input {
    width: 100%;
    background: rgba(255,255,255,0.01);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 12px 18px;
    border-radius: var(--radius-s);
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255,255,255,0.03);
    box-shadow: 0 0 12px rgba(255, 106, 0, 0.15);
}

/* Server Cards */
.server-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.server-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 16px;
    border-radius: var(--radius-m);
    transition: all 0.3s ease;
}
.server-card:hover {
    background: var(--surface-hover);
    border-color: var(--border-strong);
    transform: translateY(-1px);
}

.server-icon {
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.server-info {
    flex: 1;
    min-width: 0;
}

.server-name {
    font-weight: 700;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: white;
    margin-bottom: 2px;
}

/* Timeline/Logs */
.timeline {
    position: relative;
    padding-left: 28px;
    margin-left: 10px;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 0; top: 8px; bottom: 8px;
    width: 2px;
    background: linear-gradient(to bottom, rgba(255, 106, 0, 0.4), rgba(88, 101, 242, 0.4), transparent);
}

.timeline-item {
    position: relative;
    padding-bottom: 24px;
    border-bottom: none;
    margin-left: 0;
}
.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -37px;
    top: 4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #0b0f19;
    border: 2px solid var(--primary);
    box-shadow: 0 0 8px var(--primary);
    z-index: 2;
}

.timeline-content {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border);
    border-radius: var(--radius-m);
    padding: 16px 20px;
    transition: all 0.3s ease;
}
.timeline-content:hover {
    background: var(--surface-hover);
    border-color: var(--border-strong);
}

.timeline-time {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-dim);
    background: rgba(0,0,0,0.15);
    padding: 2px 8px;
    border-radius: 4px;
}

/* Discord Profile Header */
.discord-header-card {
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.06) 0%, rgba(11, 15, 25, 0.4) 100%);
    border: 1px solid rgba(88, 101, 242, 0.2);
    border-radius: var(--radius-l);
    padding: 32px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}
.discord-header-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 8px;
    background: linear-gradient(90deg, #5865F2, #a855f7);
}

/* User Card list */
.user-card-link {
    text-decoration: none;
    color: inherit;
}
.user-card-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border);
    object-fit: cover;
    background: rgba(255,255,255,0.03);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.user-card-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 8px;
}

/* Server row list styles */
.server-list-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}
.server-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border);
    border-radius: var(--radius-m);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 16px;
}
.server-row:hover {
    background: rgba(255, 255, 255, 0.035);
    border-color: rgba(255, 255, 255, 0.12);
}
.server-row-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    flex-grow: 1;
}
.server-row-name {
    font-weight: 800;
    color: white;
    font-size: 14.5px;
    line-height: 1.4;
    word-break: break-word;
}
.server-row-id {
    font-family: monospace;
    font-size: 12px;
    color: var(--text-dim);
    background: rgba(0, 0, 0, 0.25);
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    white-space: nowrap;
}

@media (max-width: 640px) {
    .server-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .server-row-id {
        align-self: flex-end;
    }
}

/* Owner highlighting */
.server-row.owner-row {
    border-color: rgba(245, 158, 11, 0.35);
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
    box-shadow: inset 3px 0 0 #f59e0b;
}
.server-row.owner-row:hover {
    border-color: rgba(245, 158, 11, 0.55);
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
}
.badge-owner {
    background: rgba(245, 158, 11, 0.08) !important;
    color: #f59e0b !important;
    border-color: rgba(245, 158, 11, 0.2) !important;
}



