/* ============================================================
   Artistic Roller Skating Platform — Design System
   Palette: Navy #0F172A / #1E293B  |  Gold #D4AF37  |  BG #F8FAFC
   Font: Inter (Google Fonts)
   ============================================================ */

/* ---------- Reset & Base ----------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --navy-900:  #0F172A;
    --navy-800:  #1E293B;
    --navy-700:  #334155;
    --navy-600:  #475569;
    --slate-400: #94A3B8;
    --slate-200: #E2E8F0;
    --bg:        #F8FAFC;
    --white:     #FFFFFF;
    --gold:      #D4AF37;
    --gold-light:#F0D060;
    --text:      #111827;
    --muted:     #6B7280;
    --danger:    #DC2626;
    --success:   #16A34A;

    --radius-sm: 6px;
    --radius:    10px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
    --shadow:    0 4px 16px rgba(0,0,0,.10);
    --shadow-lg: 0 8px 32px rgba(0,0,0,.14);
    --transition: .18s ease;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

img { max-width: 100%; height: auto; display: block; }
a   { color: inherit; text-decoration: none; }
ul  { list-style: none; }
main { flex: 1; }

/* ---------- Typography ------------------------------------- */
h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 700; line-height: 1.2; }
h2 { font-size: clamp(1.35rem, 3vw, 1.875rem); font-weight: 600; line-height: 1.3; }
h3 { font-size: 1.25rem; font-weight: 600; }
h4 { font-size: 1.05rem; font-weight: 600; }
p  { color: var(--muted); }

.text-navy  { color: var(--navy-900); }
.text-gold  { color: var(--gold); }
.text-muted { color: var(--muted); }
.text-sm    { font-size: .875rem; }
.text-xs    { font-size: .75rem; }
.fw-600     { font-weight: 600; }

/* ---------- Layout ----------------------------------------- */
.container    { max-width: 1240px; margin: 0 auto; padding: 0 1.5rem; }
.container-sm { max-width: 800px;  margin: 0 auto; padding: 0 1.5rem; }

.section    { padding: 4rem 0; }
.section-sm { padding: 2.5rem 0; }

.flex         { display: flex; }
.flex-center  { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-1 { gap: .5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.gap-4 { gap: 2rem; }
.flex-wrap { flex-wrap: wrap; }

.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 1.5rem; }

@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2,1fr); }
    .grid-3 { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 640px) {
    .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

/* ---------- Navbar ----------------------------------------- */
.navbar {
    background: var(--navy-900);
    border-bottom: 1px solid rgba(255,255,255,.06);
    position: sticky;
    top: 0;
    z-index: 100;
}
.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.navbar-brand {
    display: flex;
    align-items: center;
    gap: .6rem;
    color: var(--white);
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -.01em;
}
.navbar-brand .brand-accent { color: var(--gold); }

.navbar-nav {
    display: flex;
    align-items: center;
    gap: .25rem;
}
.navbar-nav a {
    color: rgba(255,255,255,.75);
    font-size: .875rem;
    font-weight: 500;
    padding: .45rem .85rem;
    border-radius: var(--radius-sm);
    transition: color var(--transition), background var(--transition);
}
.navbar-nav a:hover, .navbar-nav a.active {
    color: var(--white);
    background: rgba(255,255,255,.08);
}
.navbar-nav a.active { color: var(--gold); }

.navbar-actions { display: flex; align-items: center; gap: .5rem; }

.btn-nav {
    font-size: .8rem; font-weight: 600;
    padding: .4rem .9rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    border: none;
}
.btn-nav-ghost {
    color: rgba(255,255,255,.8);
    background: transparent;
    border: 1px solid rgba(255,255,255,.2);
}
.btn-nav-ghost:hover { background: rgba(255,255,255,.08); color: var(--white); }
.btn-nav-gold { background: var(--gold); color: var(--navy-900); }
.btn-nav-gold:hover { background: var(--gold-light); }

.hamburger {
    display: none; flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer; padding: .3rem;
}
.hamburger span { display: block; width: 22px; height: 2px; background: var(--white); border-radius: 2px; transition: all var(--transition); }

@media (max-width: 768px) {
    .hamburger { display: flex; }
    .navbar-nav, .navbar-actions {
        display: none;
        position: absolute; top: 64px; left: 0; right: 0;
        background: var(--navy-800);
        flex-direction: column;
        padding: 1rem 1.5rem;
        border-bottom: 1px solid rgba(255,255,255,.06);
        gap: .25rem;
    }
    .navbar-nav.open, .navbar-actions.open { display: flex; }
    .navbar-nav a { width: 100%; }
}

/* ---------- Hero ------------------------------------------- */
.hero {
    background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-800) 60%, #1a2f4a 100%);
    color: var(--white);
    padding: 5rem 0 4rem;
    position: relative;
    overflow: hidden;
}
.hero-content { position: relative; z-index: 1; max-width: 660px; }
.hero h1 { color: var(--white); margin-bottom: 1rem; }
.hero p   { color: rgba(255,255,255,.75); font-size: 1.125rem; margin-bottom: 2rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ---------- Buttons ---------------------------------------- */
.btn {
    display: inline-flex; align-items: center; gap: .45rem;
    padding: .65rem 1.4rem;
    border-radius: var(--radius-sm);
    font-weight: 600; font-size: .9rem;
    cursor: pointer; border: none;
    transition: all var(--transition);
    white-space: nowrap; text-decoration: none;
}
.btn-primary { background: var(--gold); color: var(--navy-900); }
.btn-primary:hover { background: var(--gold-light); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--white); border: 1.5px solid rgba(255,255,255,.4); }
.btn-outline:hover { border-color: var(--white); background: rgba(255,255,255,.06); }
.btn-navy { background: var(--navy-800); color: var(--white); }
.btn-navy:hover { background: var(--navy-700); }
.btn-sm { padding: .4rem 1rem; font-size: .8rem; }
.btn-lg { padding: .85rem 2rem; font-size: 1rem; }

/* ---------- Cards ------------------------------------------ */
.card {
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--slate-200);
    overflow: hidden;
    transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card-body  { padding: 1.25rem; }
.card-img   { width: 100%; height: 180px; object-fit: cover; }

/* ---------- Section Headers -------------------------------- */
.section-header { margin-bottom: 2rem; }
.section-header h2 { color: var(--navy-900); }
.section-header h1 { color: var(--navy-900); }
.section-header p  { margin-top: .4rem; }
.section-divider {
    display: inline-block; width: 40px; height: 3px;
    background: var(--gold); border-radius: 2px;
    margin: .6rem 0 1rem;
}

/* ---------- Badges ----------------------------------------- */
.badge {
    display: inline-flex; align-items: center;
    padding: .2rem .6rem;
    border-radius: 999px;
    font-size: .7rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: .04em;
}
.badge-navy   { background: var(--navy-800); color: var(--white); }
.badge-gold   { background: var(--gold);     color: var(--navy-900); }
.badge-slate  { background: var(--slate-200);color: var(--navy-700); }
.badge-green  { background: #DCFCE7; color: #166534; }
.badge-red    { background: #FEE2E2; color: #991B1B; }
.badge-blue   { background: #EFF6FF; color: #1D4ED8; }
.badge-yellow { background: #FEF9C3; color: #854D0E; }

/* Competition level colors */
.level-national      { color: var(--gold); }
.level-international { color: #8B5CF6; }
.level-regional      { color: #2563EB; }
.level-local         { color: var(--muted); }

/* ---------- Rankings Table --------------------------------- */
.rankings-table { width: 100%; border-collapse: collapse; }
.rankings-table th {
    background: var(--navy-900); color: rgba(255,255,255,.7);
    font-size: .75rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: .06em;
    padding: .75rem 1rem; text-align: left;
}
.rankings-table td {
    padding: .85rem 1rem;
    border-bottom: 1px solid var(--slate-200);
    font-size: .9rem; vertical-align: middle;
}
.rankings-table tr:hover td { background: #F1F5F9; }

.rank-number { font-size: 1.1rem; font-weight: 700; color: var(--navy-900); width: 48px; }
.rank-1 { color: var(--gold); }
.rank-2 { color: #9CA3AF; }
.rank-3 { color: #B45309; }

.rank-move-up   { color: var(--success); font-size: .8rem; }
.rank-move-down { color: var(--danger);  font-size: .8rem; }
.rank-move-same { color: var(--muted);   font-size: .8rem; }

/* ---------- Avatar ----------------------------------------- */
.avatar { border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.avatar-sm { width: 36px; height: 36px; }
.avatar-md { width: 56px; height: 56px; }
.avatar-lg { width: 80px; height: 80px; }
.avatar-xl { width: 120px; height: 120px; }

.avatar-placeholder {
    border-radius: 50%; background: var(--navy-800); color: var(--white);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; flex-shrink: 0;
}

/* ---------- Profile Header --------------------------------- */
.profile-cover {
    height: 200px;
    background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
    background-size: cover; background-position: center;
}
.profile-header {
    background: var(--white);
    border-bottom: 1px solid var(--slate-200);
    padding-bottom: 1.5rem;
}
.profile-header-inner {
    display: flex; align-items: flex-end; gap: 1.5rem;
    margin-top: -48px; padding: 0 0 0 1rem;
}
.profile-avatar {
    width: 96px; height: 96px; border-radius: 50%;
    border: 4px solid var(--white); object-fit: cover;
    background: var(--navy-700);
}
.profile-info { padding-top: 56px; }
.profile-info h1 { font-size: 1.5rem; }

.profile-tabs {
    display: flex; gap: 0;
    border-bottom: 2px solid var(--slate-200);
    background: var(--white); overflow-x: auto;
}
.profile-tab {
    padding: .75rem 1.25rem; font-size: .875rem; font-weight: 500;
    color: var(--muted); cursor: pointer;
    border-bottom: 2px solid transparent; margin-bottom: -2px;
    white-space: nowrap; transition: all var(--transition);
}
.profile-tab.active, .profile-tab:hover {
    color: var(--navy-900); border-bottom-color: var(--gold);
}

/* ---------- Timeline --------------------------------------- */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
    content: ''; position: absolute; left: 7px; top: 0; bottom: 0;
    width: 2px; background: var(--slate-200);
}
.timeline-item { position: relative; margin-bottom: 1.5rem; }
.timeline-dot {
    position: absolute; left: -2rem; top: .3rem;
    width: 14px; height: 14px; border-radius: 50%;
    background: var(--navy-800); border: 2px solid var(--white);
    box-shadow: 0 0 0 2px var(--slate-200);
}
.timeline-dot.gold { background: var(--gold); }
.timeline-item h4 { color: var(--navy-900); }
.timeline-item p  { font-size: .875rem; margin-top: .2rem; }

/* ---------- Forms ------------------------------------------ */
.form-group { margin-bottom: 1.25rem; }
.form-label {
    display: block; font-size: .875rem; font-weight: 500;
    color: var(--navy-800); margin-bottom: .4rem;
}
.form-control {
    width: 100%; padding: .6rem .9rem;
    border: 1.5px solid var(--slate-200); border-radius: var(--radius-sm);
    font-size: .9rem; font-family: inherit; color: var(--text);
    background: var(--white); outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus {
    border-color: var(--navy-700);
    box-shadow: 0 0 0 3px rgba(15,23,42,.08);
}
.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B7280' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right .8rem center; padding-right: 2rem;
}

/* ---------- Filters Bar ------------------------------------ */
.filters-bar {
    background: var(--white); border: 1px solid var(--slate-200);
    border-radius: var(--radius); padding: 1rem 1.25rem;
    display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
    margin-bottom: 2rem;
}
.filters-bar select, .filters-bar input { flex: 1; min-width: 140px; }

/* ---------- Pagination ------------------------------------- */
.pagination {
    display: flex; align-items: center; gap: .25rem;
    justify-content: center; margin-top: 2.5rem;
}
.page-btn {
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: var(--radius-sm);
    font-size: .875rem; font-weight: 500; color: var(--navy-800);
    border: 1px solid var(--slate-200); background: var(--white);
    cursor: pointer; transition: all var(--transition); text-decoration: none;
}
.page-btn:hover  { background: var(--slate-200); }
.page-btn.active { background: var(--navy-900); color: var(--white); border-color: var(--navy-900); }
.page-btn.disabled { opacity: .4; cursor: not-allowed; pointer-events: none; }

/* ---------- Alerts ----------------------------------------- */
.alert { padding: .85rem 1rem; border-radius: var(--radius-sm); font-size: .875rem; margin-bottom: 1.25rem; }
.alert-danger  { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }
.alert-success { background: #F0FDF4; color: #166534; border: 1px solid #BBF7D0; }
.alert-info    { background: #EFF6FF; color: #1E40AF; border: 1px solid #BFDBFE; }

/* ---------- Score Box -------------------------------------- */
.score-box { background: var(--navy-900); color: var(--white); border-radius: var(--radius-sm); padding: .5rem .85rem; text-align: center; }
.score-box .score-num   { font-size: 1.4rem; font-weight: 700; color: var(--gold); }
.score-box .score-label { font-size: .7rem; color: rgba(255,255,255,.5); text-transform: uppercase; }

/* ---------- Stats Strip ------------------------------------ */
.stats-strip { background: var(--navy-800); padding: 2rem 0; }
.stats-strip .stat-item  { text-align: center; }
.stats-strip .stat-num   { font-size: 2rem; font-weight: 700; color: var(--gold); }
.stats-strip .stat-label { font-size: .8rem; color: rgba(255,255,255,.6); text-transform: uppercase; letter-spacing: .05em; }

/* ---------- Footer ----------------------------------------- */
.footer { background: var(--navy-900); color: rgba(255,255,255,.6); padding: 3rem 0 1.5rem; }
.footer-grid {
    display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem;
    padding-bottom: 2rem; border-bottom: 1px solid rgba(255,255,255,.08);
}
.footer h4 { color: var(--white); margin-bottom: .75rem; font-size: .9rem; }
.footer a  { color: rgba(255,255,255,.6); font-size: .875rem; display: block; margin-bottom: .4rem; transition: color var(--transition); }
.footer a:hover { color: var(--gold); }
.footer-brand { font-weight: 700; font-size: 1.1rem; color: var(--white); margin-bottom: .5rem; }
.footer-brand span { color: var(--gold); }
.footer-bottom { padding-top: 1.25rem; font-size: .8rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem; }

@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Utilities -------------------------------------- */
.mt-1{margin-top:.5rem} .mt-2{margin-top:1rem} .mt-3{margin-top:1.5rem} .mt-4{margin-top:2rem}
.mb-1{margin-bottom:.5rem} .mb-2{margin-bottom:1rem} .mb-3{margin-bottom:1.5rem} .mb-4{margin-bottom:2rem}
.text-center{text-align:center} .text-right{text-align:right}
.w-100{width:100%} .d-none{display:none}
.bg-white{background:var(--white)} .bg-light{background:var(--bg)}
.border-bottom{border-bottom:1px solid var(--slate-200)}
.rounded{border-radius:var(--radius)} .shadow{box-shadow:var(--shadow)}
