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

:root {
    --bg-glass: rgba(18, 18, 24, 0.85); /* Fondo oscuro semitransparente */
    --bg-glass-light: rgba(255, 255, 255, 0.1);
    --primary: #5c7cfa;
    --text-main: #ffffff;
    --text-muted: #a5a5a5;
    --radius-xl: 28px;
    --radius-md: 18px;
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background-color: #000;
    color: var(--text-main);
    background-image: url('https://paraloquesea.com/clanmexico/img/bg.png');
    background-repeat: repeat;
    background-size: 120px;
    background-attachment: fixed;
}

/* Oscurecemos el fondo global para que el texto resalte */
body::before {
    content: "";
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Capa oscura */
    z-index: -1;
}

.app-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header { text-align: center; padding: 40px 0 20px 0; }
.clan-logo { width: 130px; filter: drop-shadow(0 0 20px rgba(0,0,0,0.6)); }
h1 { font-size: 2.2rem; margin: 10px 0; letter-spacing: -1px; }
.clan-tag { 
    background: rgba(255,255,255,0.15); 
    padding: 4px 12px; border-radius: 50px; 
    font-size: 0.9rem; color: #ddd; 
}
.clan-desc { color: #ccc; font-size: 0.95rem; margin-top: 15px; max-width: 500px; margin-inline: auto; }

/* Widgets Estadísticas */
.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 30px;
}
.stat-widget {
    background: var(--bg-glass);
    padding: 15px 10px;
    border-radius: var(--radius-md);
    text-align: center;
    border: 1px solid rgba(255,255,255,0.05);
    backdrop-filter: blur(20px);
}
.stat-value { font-size: 1.3rem; font-weight: 800; display: block; margin-bottom: 5px; }
.stat-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }

/* Estado Guerra/Online */
.war-active { color: #ff6b6b; text-shadow: 0 0 10px rgba(255, 107, 107, 0.4); }
.war-peace { color: #51cf66; }
.online-active { color: #5c7cfa; text-shadow: 0 0 10px rgba(92, 124, 250, 0.4); }

/* Líder */
.leader-card {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(0,0,0,0.6));
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: var(--radius-xl);
    padding: 20px;
    display: flex; align-items: center; gap: 15px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
}
.leader-avatar {
    width: 55px; height: 55px;
    background: #ffd700; color: #000;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; font-weight: bold;
}

/* Botones */
.action-buttons { display: flex; gap: 15px; margin-bottom: 40px; }
.btn-pill {
    flex: 1; padding: 16px;
    border-radius: 50px;
    text-align: center; text-decoration: none;
    font-weight: 600; color: white;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    transition: transform 0.2s;
}
.btn-whatsapp { background: #25d366; box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3); }
.btn-game { background: #3b82f6; box-shadow: 0 5px 15px rgba(59, 130, 246, 0.3); }
.btn-pill:active { transform: scale(0.95); }

/* Listas y Paneles */
.section-title { font-size: 1.1rem; margin-bottom: 15px; padding-left: 10px; opacity: 0.9; }
.glass-panel {
    background: var(--bg-glass);
    border-radius: var(--radius-xl);
    padding: 20px;
    margin-bottom: 30px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.05);
}

/* Filas de Top 10 */
.list-row {
    display: flex; align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.list-row:last-child { border-bottom: none; }
.rank-badge {
    width: 28px; height: 28px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem; margin-right: 15px; font-weight: bold;
}
.rank-1 { background: #ffd700; color: black; }
.rank-2 { background: #e0e0e0; color: black; }
.rank-3 { background: #cd7f32; color: black; }

/* TABS (Pestañas) */
.tabs-wrapper {
    background: rgba(0,0,0,0.6);
    padding: 6px;
    border-radius: 50px;
    display: flex;
    margin-bottom: 25px;
    position: sticky; top: 10px; z-index: 100;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255,255,255,0.1);
}
.tab-btn {
    flex: 1; text-align: center;
    padding: 10px 0;
    border-radius: 40px;
    font-size: 0.9rem; font-weight: 600;
    color: #888; cursor: pointer;
    transition: all 0.3s;
}
.tab-btn.active { background: #333; color: white; box-shadow: 0 2px 10px rgba(0,0,0,0.3); }

/* Grid de Miembros */
.members-grid {
    display: none; /* Oculto por defecto */
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    animation: fadeIn 0.4s ease;
}
.members-grid.active-view { display: grid; }

.member-card-mini {
    background: var(--bg-glass);
    padding: 15px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255,255,255,0.05);
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }