:root {
    --primary: #57ea9d;
    --bg: #0a0a0a;
    --card: #161616;
    --text: #ffffff;
    --danger: #f44336;
    --nav-bg: #121212;
}

body {
    font-family: 'Roboto Mono', monospace;
    background-color: var(--bg); color: var(--text);
    margin: 0; padding: 0; overflow: hidden; height: 100vh;
}

.tab-content { display: none; height: calc(100vh - 70px); overflow-y: auto; padding: 15px; box-sizing: border-box; }
.tab-content.active { display: block; }

.header-tools, .header-simple { width: 100%; max-width: 1200px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.header-simple h2 { margin: 0; font-size: 1.4rem; font-weight: 900; }
.section-title { font-size: 0.85rem; color: #888; text-transform: uppercase; border-bottom: 1px solid #222; padding-bottom: 5px; margin-bottom: 15px; }

.btn-tool { background: #222; color: #888; border: 1px solid #333; padding: 8px 12px; border-radius: 6px; cursor: pointer; font-size: 0.7rem; font-weight: bold; font-family: inherit; }

.bottom-nav { position: fixed; bottom: 0; left: 0; width: 100%; height: 70px; background: var(--nav-bg); border-top: 1px solid #222; display: flex; justify-content: space-around; align-items: center; z-index: 900; }
.nav-item { color: #555; display: flex; flex-direction: column; align-items: center; cursor: pointer; transition: 0.3s; }
.nav-item.active { color: var(--primary); }
.nav-icon { font-size: 1.4rem; margin-bottom: 4px; }
.nav-text { font-size: 0.7rem; font-weight: bold; }

/* CANCHA PRO */
.main-layout { display: grid; grid-template-columns: 1fr 350px; gap: 20px; width: 100%; max-width: 1200px; margin: 0 auto; }
.court-wrapper { position: relative; width: 100%; aspect-ratio: 500 / 350; background: #111; border-radius: 12px; border: 1px solid #333; display: flex; align-items: center; justify-content: center; overflow: hidden; }

.zona-path { transition: all 0.2s ease; stroke: rgba(255,255,255,0.15); stroke-width: 0.5px; cursor: pointer; }
.zona-path:hover { stroke: var(--primary); stroke-width: 1.5px; filter: brightness(1.3); }
.zona-label-text { pointer-events: none; font-weight: 900; fill: white; font-size: 6px; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); font-family: 'Roboto Mono', monospace; }

.sidebar { display: flex; flex-direction: column; gap: 10px; }
@media (max-width: 900px) {
    .main-layout { grid-template-columns: 1fr; }
    .sidebar { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

.stat-card { background: var(--card); padding: 12px; border-radius: 12px; border-left: 4px solid #333; transition: 0.2s; }
.highlight-card { border-left: 4px solid var(--primary); background: rgba(87, 234, 157, 0.05); }
.stat-header { display: flex; justify-content: space-between; align-items: center; }
.stat-header h4 { margin: 0; font-size: 0.65rem; color: #666; text-transform: uppercase; }
.stat-date { font-size: 0.6rem; color: #666; height: 12px; text-align: right; }
.stat-value { font-size: 1.2rem; font-weight: 900; color: var(--primary); }
.chart-container { height: 50px; width: 100%; margin-top: 5px; }

/* TABLAS Y QUICK LOG */
.quick-log-container, .table-container, .leaderboard-container { background: var(--card); border-radius: 12px; padding: 15px; overflow-x: auto; margin-top: 20px; border: 1px solid #222; }
table { width: 100%; border-collapse: collapse; min-width: 300px; }
th { color: #555; font-size: 0.6rem; text-transform: uppercase; padding: 10px; border-bottom: 1px solid #222; text-align: left; }
td { padding: 10px; border-bottom: 1px solid #1a1a1a; font-size: 0.75rem; color: #ccc; }
.btn-icon { background: none; border: none; cursor: pointer; font-size: 0.9rem; margin-right: 5px; }

/* MODAL */
#modal { top: 50%; left: 50%; transform: translate(-50%, -50%); background: #1a1a1a; padding: 15px 18px; border-radius: 16px; width: 75%; max-width: 320px; border: 1px solid #333; position: fixed; z-index: 1001; display: none; }
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.9); backdrop-filter: blur(8px); z-index: 1000; }
.modal-close-btn { position: absolute; top: 10px; right: 15px; color: #555; font-size: 1.2rem; cursor: pointer; border: none; background: none; }
input, textarea, select { width: 100%; background: #252525; border: 1px solid #444; color: white; padding: 8px 10px; border-radius: 8px; margin-bottom: 8px; box-sizing: border-box; font-size: 16px !important; font-family: inherit; }
.btn-save { background: var(--primary); color: #000; border: none; padding: 12px; width: 100%; font-weight: 900; border-radius: 10px; cursor: pointer; text-transform: uppercase; font-family: inherit; }

/* CLUB HEADER & FEED */
.club-header { display: flex; justify-content: space-between; align-items: center; background: var(--card); padding: 15px; border-radius: 12px; border: 1px solid #333; margin-bottom: 20px; }
.club-info { display: flex; align-items: center; gap: 15px; }
.club-logo { width: 50px; height: 50px; background: #222; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }
.club-name { margin: 0; font-size: 1.1rem; color: var(--primary); }
.club-members-count { font-size: 0.7rem; color: #666; }
.btn-switch-club { background: none; border: 1px solid #444; color: #fff; border-radius: 8px; padding: 8px; cursor: pointer; }

/* MIEMBROS & ADMIN */
.members-details { background: var(--card); border-radius: 12px; border: 1px solid #222; margin-bottom: 20px; }
.members-summary { padding: 15px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; outline: none; list-style: none; }
.members-summary::-webkit-details-marker { display: none; }
.btn-invite { background: #222; border: 1px solid #444; color: #fff; padding: 5px 10px; border-radius: 6px; cursor: pointer; font-family: inherit; font-size: 0.7rem; font-weight: bold; }

.admin-panel { padding: 0 15px 15px 15px; border-top: 1px solid #222; }
.member-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid #222; font-size: 0.8rem; }
.member-role { font-size: 0.6rem; padding: 2px 6px; border-radius: 4px; background: #333; color: #aaa; margin-left: 5px; }
.member-role.admin { background: rgba(87, 234, 157, 0.2); color: var(--primary); }
.admin-actions button { background: none; border: 1px solid #444; color: #888; border-radius: 4px; font-size: 0.6rem; padding: 3px 6px; cursor: pointer; margin-left: 5px; }
.admin-actions button:hover { color: #fff; border-color: #666; }

/* LEADERBOARD 2x2 GRID */
.leaderboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.lb-card { background: var(--card); padding: 15px; border-radius: 12px; border: 1px solid #222; }
.lb-card h4 { margin: 0 0 10px 0; font-size: 0.75rem; color: #888; text-transform: uppercase; border-bottom: 1px solid #333; padding-bottom: 5px; }
.lb-leader { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px dashed #333; }
.lb-leader-name { font-size: 1rem; font-weight: bold; color: #fff; }
.lb-leader-val { font-size: 1.4rem; font-weight: 900; color: var(--primary); }
.lb-top5 { list-style: none; padding: 0; margin: 0; }
.lb-top5 li { display: flex; justify-content: space-between; font-size: 0.7rem; color: #aaa; padding: 4px 0; }

@media (max-width: 600px) { .leaderboard-grid { grid-template-columns: 1fr; } }

/* FEED */
.feed-item { padding: 10px 0; border-bottom: 1px dashed #222; display: flex; align-items: center; gap: 10px; font-size: 0.8rem; }
.feed-time { font-size: 0.6rem; color: #666; min-width: 40px; }
.feed-highlight { color: var(--primary); font-weight: bold; }
.feed-emoji { font-size: 1rem; }

/* PERFIL */
.career-stats-container { display: flex; gap: 15px; margin-bottom: 20px; }
.career-box { flex: 1; background: var(--card); padding: 15px; border-radius: 12px; text-align: center; border: 1px solid #222; }
.career-label { display: block; font-size: 0.7rem; color: #666; text-transform: uppercase; margin-bottom: 5px; }
.career-val { font-size: 1.8rem; font-weight: 900; color: #fff; }

.chart-controls { display: flex; gap: 10px; margin-bottom: 10px; }
.filters-container { display: flex; gap: 10px; margin-top: 10px; margin-bottom: 10px; }
.history-details { background: var(--card); padding: 15px; border-radius: 12px; border: 1px solid #222; }
.history-details summary { cursor: pointer; font-weight: bold; color: var(--primary); outline: none; }
