/* ============================================================
   Hunt Royale Leaderboards - Global Stylesheet
   ============================================================ */

/* === Variables === */
:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #0f1628;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.07);
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-medium: rgba(255, 255, 255, 0.12);
    --gold: #FFD700;
    --gold-dim: rgba(255, 215, 0, 0.15);
    --gold-glow: rgba(255, 215, 0, 0.4);
    --crimson: #B22234;
    --crimson-dim: rgba(178, 34, 52, 0.2);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.4);
    --font-heading: 'Orbitron', sans-serif;
    --font-body: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
    --nav-height: 64px;
    --container-max: 1400px;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-pill: 50px;
}

/* === Reset === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
img { max-width: 100%; display: block; }
input, select, button { font-size: inherit; }

/* === Animated Stars Background === */
.stars {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}
.star {
    position: absolute;
    width: 2px; height: 2px;
    background: #fff;
    border-radius: 50%;
    animation: twinkle 3s ease-in-out infinite;
}
@keyframes twinkle {
    0%, 100% { opacity: 0.2; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.3); }
}

/* === Navigation === */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(10, 14, 26, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    height: var(--nav-height);
}
.nav-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-brand {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 18px;
    letter-spacing: 2px;
    color: var(--gold);
    text-shadow: 0 0 20px var(--gold-glow);
    white-space: nowrap;
}
.nav-links {
    display: flex;
    gap: 8px;
    align-items: center;
}
.nav-link {
    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 8px 20px;
    border-radius: var(--radius-pill);
    transition: all 0.3s ease;
    color: var(--text-secondary);
    border: 1px solid transparent;
}
.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}
.nav-link.active {
    color: #000;
    background: linear-gradient(135deg, var(--gold), #FFA500);
    border-color: var(--gold);
    box-shadow: 0 0 15px var(--gold-glow);
}
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
}
.nav-toggle span {
    display: block;
    width: 24px; height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}
.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* === Main Content Container === */
.container {
    position: relative;
    z-index: 1;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 32px 24px;
}

/* === Page Header (non-home pages) === */
.page-header {
    text-align: center;
    padding: 48px 24px 32px;
    position: relative;
    z-index: 1;
}
.page-header h1 {
    font-family: var(--font-heading);
    font-size: 36px;
    font-weight: 900;
    letter-spacing: 3px;
    color: var(--gold);
    text-shadow: 0 0 30px var(--gold-glow);
    margin-bottom: 8px;
}
.page-header p {
    font-size: 15px;
    color: var(--text-secondary);
}

/* === Hero Section (Home only) === */
.hero {
    position: relative;
    z-index: 1;
    padding: 80px 24px 60px;
    text-align: center;
    background: linear-gradient(180deg, rgba(10,14,26,0) 0%, rgba(10,14,26,0.8) 100%),
                radial-gradient(ellipse at 50% 0%, rgba(255,215,0,0.08) 0%, transparent 60%);
}
.hero h1 {
    font-family: var(--font-heading);
    font-size: 48px;
    font-weight: 900;
    letter-spacing: 4px;
    color: var(--text-primary);
    text-shadow: 0 0 40px var(--gold-glow);
    margin-bottom: 12px;
    animation: heroGlow 3s ease-in-out infinite;
}
.hero h1 .accent { color: var(--gold); }
@keyframes heroGlow {
    0%, 100% { text-shadow: 0 0 30px var(--gold-glow); }
    50% { text-shadow: 0 0 60px rgba(255,215,0,0.6), 0 0 100px rgba(255,215,0,0.2); }
}
.hero .subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-weight: 400;
}
.hero-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--gold), #FFA500);
    color: #000;
    padding: 6px 24px;
    border-radius: var(--radius-pill);
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 40px;
    box-shadow: 0 0 30px var(--gold-glow);
}
.hero-nav {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}
.hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    border-radius: var(--radius-pill);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}
.hero-btn:hover {
    transform: translateY(-3px);
}
.hero-btn.primary {
    background: linear-gradient(135deg, var(--gold), #FFA500);
    color: #000;
    box-shadow: 0 4px 20px var(--gold-glow);
}
.hero-btn.primary:hover { box-shadow: 0 8px 35px rgba(255,215,0,0.5); }
.hero-btn.secondary {
    background: linear-gradient(135deg, var(--crimson), #8B1A2B);
    color: #fff;
    box-shadow: 0 4px 20px rgba(178,34,52,0.3);
}
.hero-btn.secondary:hover { box-shadow: 0 8px 35px rgba(178,34,52,0.5); }
.hero-btn.outline {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border-medium);
}
.hero-btn.outline:hover { border-color: var(--gold); background: rgba(255,215,0,0.05); }

/* === Stat Cards === */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold), #FFA500);
    opacity: 0.6;
}
.stat-card:hover {
    border-color: rgba(255,215,0,0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}
.stat-card .stat-icon {
    font-size: 28px;
    margin-bottom: 8px;
}
.stat-card .stat-number {
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 900;
    color: var(--gold);
    text-shadow: 0 0 15px var(--gold-glow);
    margin-bottom: 4px;
    word-break: break-all;
}
.stat-card .stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* === Section Panels === */
.panel {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 28px;
    backdrop-filter: blur(10px);
}
.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}
.panel-title {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 900;
    color: var(--gold);
    text-shadow: 0 0 15px var(--gold-glow);
    letter-spacing: 1px;
}
.panel-link {
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 8px 20px;
    border-radius: var(--radius-pill);
    background: rgba(255,215,0,0.1);
    color: var(--gold);
    border: 1px solid rgba(255,215,0,0.3);
    transition: all 0.3s ease;
}
.panel-link:hover {
    background: rgba(255,215,0,0.2);
    border-color: var(--gold);
    box-shadow: 0 0 15px var(--gold-glow);
}

/* === Search & Filter Bar === */
.filter-bar {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}
.filter-bar.sticky {
    position: sticky;
    top: var(--nav-height);
    z-index: 100;
    background: rgba(10, 14, 26, 0.92);
    backdrop-filter: blur(20px);
}
.search-input {
    flex: 1;
    min-width: 200px;
    padding: 12px 20px;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-pill);
    background: rgba(0, 0, 0, 0.3);
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
}
.search-input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 15px var(--gold-dim);
}
.search-input::placeholder {
    color: var(--text-muted);
}
.filter-select {
    padding: 12px 16px;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-pill);
    background: rgba(0, 0, 0, 0.3);
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
    min-width: 140px;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
    cursor: pointer;
}
.filter-select:focus {
    border-color: var(--gold);
    box-shadow: 0 0 15px var(--gold-dim);
}
.filter-select option {
    background: #1a1f2e;
    color: #fff;
}
.btn-clear {
    padding: 12px 24px;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}
.btn-clear:hover {
    border-color: var(--crimson);
    color: #ff6b6b;
    background: rgba(178,34,52,0.1);
}
.search-status {
    width: 100%;
    font-size: 13px;
    color: var(--text-secondary);
    padding-top: 4px;
}
.search-status.success { color: #00ff88; }
.search-status.error { color: #ff6b6b; }

/* Quick Search (Home page) */
.quick-search {
    max-width: 600px;
    margin: 0 auto 40px;
    position: relative;
}
.quick-search .search-input {
    width: 100%;
    padding: 16px 24px;
    font-size: 15px;
    border: 2px solid var(--border-medium);
}
.quick-search-results {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    margin-top: 8px;
    background: rgba(15, 22, 40, 0.98);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius);
    max-height: 400px;
    overflow-y: auto;
    z-index: 200;
    display: none;
    backdrop-filter: blur(20px);
}
.quick-search-results.visible { display: block; }
.quick-search-group {
    padding: 12px 16px 4px;
    font-family: var(--font-heading);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold);
}
.quick-search-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    transition: background 0.2s;
    cursor: pointer;
    gap: 12px;
}
.quick-search-item:hover {
    background: rgba(255,215,0,0.08);
}
.quick-search-item .qs-name {
    font-weight: 600;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.quick-search-item .qs-meta {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
}
.quick-search-empty {
    padding: 20px 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}

/* === Tables === */
.table-wrap {
    overflow-x: auto;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
}
table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
}
thead {
    background: linear-gradient(135deg, #1a1f30 0%, #15192a 100%);
    position: sticky;
    top: 0;
    z-index: 10;
}
th {
    padding: 16px 14px;
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-align: left;
    color: var(--gold);
    border-bottom: 2px solid rgba(255,215,0,0.15);
    white-space: nowrap;
    user-select: none;
}
th.center, td.center { text-align: center; }
th.right, td.right { text-align: right; }
td {
    padding: 14px;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 14px;
    vertical-align: middle;
}
tbody tr {
    transition: background 0.2s ease;
}
tbody tr:hover {
    background: rgba(255, 215, 0, 0.04);
}
tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.01);
}
tbody tr:nth-child(even):hover {
    background: rgba(255, 215, 0, 0.04);
}
.cell-name {
    font-weight: 600;
    max-width: 250px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cell-id {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 12px;
    color: var(--text-muted);
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cell-trophies {
    font-weight: 700;
    color: var(--gold);
    white-space: nowrap;
}
.cell-score {
    font-weight: 700;
    color: var(--gold);
    white-space: nowrap;
}
.cell-country {
    white-space: nowrap;
}
.cell-time {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
}
.cell-clan-link {
    color: var(--gold);
    font-weight: 600;
    transition: color 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
    display: inline-block;
    vertical-align: middle;
}
.cell-clan-link:hover {
    color: #fff;
    text-decoration: underline;
}

/* Clickable rows */
tr.clickable { cursor: pointer; }
tr.clickable:hover { background: rgba(255, 215, 0, 0.06); }

/* === Medals === */
.medal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px; height: 34px;
    border-radius: 50%;
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 14px;
}
.medal-gold {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
    box-shadow: 0 0 15px rgba(255,215,0,0.5);
}
.medal-silver {
    background: linear-gradient(135deg, #C0C0C0, #969696);
    color: #000;
    box-shadow: 0 0 12px rgba(192,192,192,0.4);
}
.medal-bronze {
    background: linear-gradient(135deg, #CD7F32, #A0522D);
    color: #000;
    box-shadow: 0 0 12px rgba(205,127,50,0.4);
}
.rank-num {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 15px;
    color: var(--text-secondary);
}

/* === Role Badges === */
.role-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    white-space: nowrap;
}
.role-leader {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
    box-shadow: 0 0 10px var(--gold-glow);
}
.role-colead {
    background: linear-gradient(135deg, #FF6B35, #E55A2B);
    color: #fff;
}
.role-elder {
    background: rgba(192, 192, 192, 0.2);
    color: #C0C0C0;
    border: 1px solid rgba(192,192,192,0.3);
}
.role-member {
    background: rgba(107, 130, 153, 0.15);
    color: #8899aa;
    border: 1px solid rgba(107,130,153,0.2);
}

/* === Clan Detail Header === */
.clan-header {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 36px;
    margin-bottom: 28px;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    z-index: 1;
}
.clan-header::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--gold), #FFA500, var(--crimson));
}
.clan-header-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 24px;
}
.clan-header-info h1 {
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 900;
    color: var(--gold);
    text-shadow: 0 0 20px var(--gold-glow);
    margin-bottom: 8px;
    word-break: break-word;
}
.clan-header-info .clan-id {
    font-family: 'Consolas', monospace;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.clan-rank-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: var(--radius-pill);
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 1px;
    background: linear-gradient(135deg, var(--gold), #FFA500);
    color: #000;
    box-shadow: 0 0 25px var(--gold-glow);
    white-space: nowrap;
}
.clan-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
}
.clan-stat {
    background: rgba(0,0,0,0.2);
    border-radius: var(--radius-sm);
    padding: 16px;
    text-align: center;
}
.clan-stat .val {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 900;
    color: var(--gold);
    margin-bottom: 2px;
}
.clan-stat .lbl {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* === Pagination === */
.pagination-wrap {
    margin-top: 20px;
    text-align: center;
}
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
}
.page-btn {
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 700;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}
.page-btn:hover:not(.disabled):not(.active) {
    border-color: var(--gold);
    color: var(--gold);
    background: rgba(255,215,0,0.05);
}
.page-btn.active {
    background: linear-gradient(135deg, var(--gold), #FFA500);
    color: #000;
    border-color: var(--gold);
    box-shadow: 0 0 10px var(--gold-glow);
}
.page-btn.disabled {
    opacity: 0.3;
    cursor: default;
}
.page-ellipsis {
    padding: 0 6px;
    color: var(--text-muted);
    font-size: 14px;
}
.pagination-info {
    margin-top: 12px;
    font-size: 13px;
    color: var(--text-muted);
}

/* === Loading / Error / Empty === */
.state-message {
    text-align: center;
    padding: 60px 20px;
}
.state-message .spinner {
    width: 48px; height: 48px;
    border: 4px solid var(--border-subtle);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 20px;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
.state-message .msg {
    font-size: 16px;
    color: var(--text-secondary);
}
.state-message .msg-detail {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 8px;
}
.state-message.error .msg { color: #ff6b6b; }

/* === Preview Grid (Home page) === */
.preview-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
    margin-bottom: 28px;
}

/* === Footer === */
.footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 40px 24px;
    border-top: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-size: 13px;
}

/* === Utility === */
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}
.text-gold { color: var(--gold); }
.text-muted { color: var(--text-muted); }
.flag { margin-right: 4px; }
.highlight-row {
    background: rgba(255, 215, 0, 0.12) !important;
    border-left: 3px solid var(--gold);
}

/* === Responsive === */
@media (max-width: 1024px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .preview-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    :root { --nav-height: 56px; }

    .nav-toggle { display: flex; }
    .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0; right: 0;
        background: rgba(10, 14, 26, 0.95);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 16px;
        border-bottom: 1px solid var(--border-subtle);
        gap: 4px;
    }
    .nav-links.active { display: flex; }
    .nav-link { width: 100%; text-align: center; padding: 12px; }

    .hero { padding: 50px 20px 40px; }
    .hero h1 { font-size: 28px; letter-spacing: 2px; }
    .hero .subtitle { font-size: 15px; }
    .hero-nav { flex-direction: column; align-items: center; }
    .hero-btn { width: 100%; max-width: 280px; justify-content: center; }

    .page-header h1 { font-size: 24px; }
    .panel { padding: 20px 16px; }
    .panel-title { font-size: 18px; }

    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .stat-card { padding: 16px 12px; }
    .stat-card .stat-number { font-size: 24px; }
    .stat-card .stat-label { font-size: 11px; }

    .filter-bar {
        flex-direction: column;
    }
    .filter-bar .search-input,
    .filter-bar .filter-select,
    .filter-bar .btn-clear {
        width: 100%;
        min-width: unset;
    }

    th { padding: 12px 10px; font-size: 10px; }
    td { padding: 10px; font-size: 13px; }
    .cell-name { max-width: 150px; }
    .cell-id { max-width: 100px; font-size: 11px; }

    .clan-header { padding: 24px 16px; }
    .clan-header-info h1 { font-size: 22px; }
    .clan-stats-row { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .clan-stat .val { font-size: 18px; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .stat-card .stat-number { font-size: 20px; }

    .page-header { padding: 32px 16px 20px; }
    .page-header h1 { font-size: 20px; }

    .pagination { gap: 2px; }
    .page-btn { min-width: 32px; height: 32px; font-size: 11px; }
}
