/* dashboard.css */

/* === STICKY FOOTER FIX === */
html, body {
    height: 100%;
    margin: 0;
}

/* Override the default .page style to be a flex container */
.page {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Force it to be at least the full screen height */
}

/* This makes the middle section grow to fill empty space, pushing footer down */
.dashboard-container {
    flex: 1; 
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
    padding-top: 40px; 
    padding-bottom: 60px;
}

/* === Login Screen === */
.login-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 20px;
    background: radial-gradient(circle at center, rgba(52, 211, 153, 0.08) 0%, transparent 70%);
    border-radius: 32px;
    border: 1px solid var(--border);
    margin-top: 20px;
}

/* === Server List (Guilds) === */
.guild-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 32px;
}

.guild-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.guild-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    background: rgba(30, 41, 59, 0.8);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.guild-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    background: #0f172a;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    flex-shrink: 0;
}

.guild-info h3 {
    margin: 0 0 4px;
    font-size: 1.05rem;
    color: var(--text-main);
}

.guild-info p {
    margin: 0;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: monospace;
}

.guild-arrow {
    color: var(--text-soft);
    font-size: 1.2rem;
    transition: transform 0.2s;
}
.guild-card:hover .guild-arrow {
    color: var(--accent);
    transform: translateX(4px);
}

/* === Dashboard Detail View === */
.detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.detail-title h2 { margin: 0; font-size: 1.8rem; }
.detail-title span { font-size: 0.9rem; color: var(--text-muted); margin-left: 10px; }

/* === Status Indicator (Red/Green Dot) === */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.6);
    color: var(--text-muted);
    transition: all 0.3s ease;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #64748b; /* Gray default */
    transition: all 0.3s ease;
}

.status-online {
    border-color: rgba(34, 197, 94, 0.3);
    color: #4ade80;
    background: rgba(34, 197, 94, 0.1);
}
.status-online .status-dot {
    background-color: #4ade80;
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.8);
}

.status-offline {
    border-color: rgba(239, 68, 68, 0.3);
    color: #f87171;
    background: rgba(239, 68, 68, 0.1);
}
.status-offline .status-dot {
    background-color: #f87171;
    box-shadow: 0 0 8px rgba(248, 113, 113, 0.8);
}

/* === Stats Cards === */
.stat-card {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stat-header {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.stat-value { font-size: 1.6rem; font-weight: 700; color: var(--text-main); }
.stat-sub { font-size: 0.8rem; color: var(--text-muted); margin-top: auto; }

.mascot-row { display: flex; align-items: center; gap: 16px; }
.mascot-thumb { width: 48px; height: 48px; border-radius: 12px; border: 1px solid var(--border); }

/* === Terminal / JSON Box === */
.terminal-box {
    background: #020617;
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
}
.terminal-header {
    background: rgba(30, 41, 59, 0.5);
    padding: 8px 16px;
    font-size: 0.75rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    cursor: pointer;
}
#d_json {
    margin: 0; padding: 20px; color: #6ee7b7; font-family: monospace; font-size: 0.8rem;
    overflow-x: auto; display: none;
}
#d_json.open { display: block; }

/* === Error Box === */
#errorBox {
    display: none;
    padding: 16px;
    margin-bottom: 20px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid #ef4444;
    color: #fca5a5;
    border-radius: 12px;
    text-align: center;
}

/* === Mobile Menu Styling === */
.nav-mobile {
    padding: 16px;
    background: #0f172a; /* Darker background for contrast */
    border: 1px solid #1f2937;
    gap: 8px; /* Space between items */
}

/* The Shared "Menu Item" Look */
.mobile-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    
    background-color: transparent;
    border: 1px solid transparent; 
    border-radius: 12px;
    
    font-size: 0.95rem;
    font-weight: 500;
    color: #e5e7eb; /* Standard text color */
    text-decoration: none;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Hover Effect */
.mobile-item:hover {
    background-color: #1e293b; /* Slightly lighter on hover */
    transform: translateX(4px); /* Little slide animation */
}

/* Specific Red Style for Logout */
.mobile-item.text-red {
    color: #f87171;
}

.mobile-item.text-red:hover {
    background-color: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
}