/* ==========================================================================
   DRIVERANK.TOP - STREET FIGHTER 6 MODERN AESTHETIC THEME
   Inspired by SF6 Drive System (Impact Magenta, Rush Cyan, Gauge Lime, Master Gold)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Teko:wght@500;600;700&family=Chakra+Petch:ital,wght@0,500;0,700;1,700&display=swap');

:root {
    /* Base Arena Dark Palette */
    --sf-bg: #0a0b12;
    --sf-bg-alt: #0f121d;
    --sf-card-bg: rgba(19, 23, 36, 0.85);
    --sf-card-solid: #131724;
    --sf-card-hover: rgba(26, 32, 51, 0.95);
    --sf-border: #262c42;
    --sf-border-light: rgba(255, 255, 255, 0.08);

    /* SF6 Drive System Vibrant Accents */
    --sf-drive-impact: #ff0055;
    --sf-drive-impact-glow: rgba(255, 0, 85, 0.45);
    --sf-drive-rush: #00f0ff;
    --sf-drive-rush-glow: rgba(0, 240, 255, 0.45);
    --sf-drive-gauge: #00ff88;
    --sf-drive-gauge-glow: rgba(0, 255, 136, 0.4);
    --sf-gold: #ffaa00;
    --sf-gold-glow: rgba(255, 170, 0, 0.4);
    --sf-purple: #b026ff;
    
    /* Semantic Compatibility Variables */
    --bg-color: var(--sf-bg);
    --card-bg: var(--sf-card-bg);
    --accent-color: var(--sf-drive-rush);
    --accent-hover: #00d0e6;
    --text-main: #f8fafc;
    --text-muted: #8e9bb0;
    --border-color: var(--sf-border);
    --danger-color: var(--sf-drive-impact);
    --danger-hover: #e0004c;
    --success-color: var(--sf-drive-gauge);
    --success-hover: #00d974;
    --rank-gold: var(--sf-gold);
    --input-bg: rgba(10, 11, 18, 0.8);

    /* Typography */
    --font-heading: 'Teko', 'Chakra Petch', sans-serif;
    --font-display: 'Chakra Petch', 'Teko', sans-serif;
    --font-body: 'Outfit', sans-serif;

    /* Chamfer & Clip Angles */
    --clip-chamfer: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
    --clip-chamfer-lg: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
    --clip-slant: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
}

/* Global Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
}

body {
    background-color: var(--sf-bg);
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(255, 0, 85, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 85% 85%, rgba(0, 240, 255, 0.08) 0%, transparent 40%),
        linear-gradient(rgba(10, 11, 18, 0.95), rgba(10, 11, 18, 0.95)),
        repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.015) 0, rgba(255, 255, 255, 0.015) 1px, transparent 0, transparent 24px);
    background-attachment: fixed;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ==========================================================================
   HEADER & NAVIGATION - SF6 TOURNAMENT BROADCAST STYLE
   ========================================================================== */
header {
    width: 100%;
    background: rgba(15, 18, 29, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 2px solid var(--sf-border);
    padding: 12px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.6);
    position: sticky;
    top: 0;
    z-index: 100;
    flex-wrap: wrap;
    gap: 16px;
}

header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--sf-drive-impact) 20%, var(--sf-drive-rush) 80%, transparent 100%);
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.6rem;
    font-style: italic;
    color: #ffffff;
    text-decoration: none;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-shadow: 0 0 15px rgba(0, 240, 255, 0.5);
    transition: transform 0.2s ease;
}

.logo:hover {
    transform: scale(1.03) skewX(-4deg);
}

.logo-drive {
    color: var(--sf-drive-rush);
    text-shadow: 0 0 12px var(--sf-drive-rush-glow);
}

.logo-rank {
    color: var(--sf-drive-impact);
    text-shadow: 0 0 12px var(--sf-drive-impact-glow);
}

nav {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 8px 16px;
    border-radius: 4px;
    border: 1px solid transparent;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

nav a:hover {
    color: #ffffff;
    background: rgba(0, 240, 255, 0.1);
    border-color: rgba(0, 240, 255, 0.3);
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.25);
    transform: translateY(-1px);
}

nav a.active {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(255, 0, 85, 0.25), rgba(0, 240, 255, 0.25));
    border-color: var(--sf-drive-rush);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.35);
}

#nav-login-btn {
    background: linear-gradient(135deg, var(--sf-drive-impact), #ff3377);
    color: #ffffff !important;
    font-weight: 700;
    padding: 8px 20px;
    clip-path: var(--clip-slant);
    border: none !important;
    box-shadow: 0 0 15px var(--sf-drive-impact-glow);
}

#nav-login-btn:hover {
    background: linear-gradient(135deg, #ff1a66, #ff4d88);
    box-shadow: 0 0 25px rgba(255, 0, 85, 0.7);
    transform: translateY(-2px);
}

/* User Badge / Profile in Navbar (SF6 Challenger Badge) */
.user-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(10, 11, 18, 0.9);
    padding: 5px 14px;
    border-radius: 6px;
    border: 1px solid var(--sf-border);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5), 0 0 12px rgba(0, 240, 255, 0.15);
}

.user-avatar-mini {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    object-fit: cover;
    border: 2px solid var(--sf-drive-rush);
    box-shadow: 0 0 10px var(--sf-drive-rush-glow);
    background-color: var(--sf-bg);
}

.user-info-group {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.user-nick {
    color: #ffffff;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.user-cfn {
    color: var(--sf-drive-rush);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.user-stats-group {
    display: flex;
    align-items: center;
    gap: 10px;
    border-left: 2px solid var(--sf-border);
    padding-left: 10px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.9rem;
}

.stat-energy {
    color: var(--sf-drive-gauge);
    text-shadow: 0 0 8px var(--sf-drive-gauge-glow);
}

.stat-rp {
    color: var(--sf-gold);
    text-shadow: 0 0 8px var(--sf-gold-glow);
}

.btn-logout {
    background: none;
    border: 1px solid rgba(255, 0, 85, 0.4);
    color: var(--sf-drive-impact);
    cursor: pointer;
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.btn-logout:hover {
    background: var(--sf-drive-impact);
    color: #ffffff;
    box-shadow: 0 0 10px var(--sf-drive-impact-glow);
}

/* ==========================================================================
   CONTAINERS & CARDS (FIGHT ARENA PANELS)
   ========================================================================== */
.main-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 32px 16px 48px;
    flex: 1;
}

.container {
    width: 100%;
    max-width: 820px;
    background: var(--sf-card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--sf-border);
    border-top: 3px solid var(--sf-drive-rush);
    border-radius: 8px;
    padding: 32px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7), 0 0 20px rgba(0, 240, 255, 0.1);
    position: relative;
}

.container::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 3px;
    background: var(--sf-drive-impact);
    box-shadow: 0 0 12px var(--sf-drive-impact-glow);
}

h1, h2 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
    color: #ffffff;
    margin-bottom: 24px;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

h2 span.highlight {
    color: var(--sf-drive-impact);
    text-shadow: 0 0 15px var(--sf-drive-impact-glow);
}

/* ==========================================================================
   BUTTONS & CONTROLS (SF6 IMPACT BUTTONS)
   ========================================================================== */
.btn, .btn-submit, #btn-queue {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 12px 28px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--sf-drive-rush), #0099ff);
    box-shadow: 0 4px 15px var(--sf-drive-rush-glow);
    position: relative;
    overflow: hidden;
}

.btn:hover:not(:disabled), .btn-submit:hover:not(:disabled), #btn-queue:hover:not(:disabled) {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 25px rgba(0, 240, 255, 0.7);
    filter: brightness(1.15);
}

.btn:active:not(:disabled), #btn-queue:active:not(:disabled) {
    transform: translateY(1px) scale(0.98);
}

.btn-danger, .btn-danger:hover {
    background: linear-gradient(135deg, var(--sf-drive-impact), #b8003d) !important;
    box-shadow: 0 4px 15px var(--sf-drive-impact-glow) !important;
}

.btn-success, .btn-success:hover {
    background: linear-gradient(135deg, var(--sf-drive-gauge), #00aa55) !important;
    color: #0a0b12 !important;
    font-weight: 800 !important;
    box-shadow: 0 4px 15px var(--sf-drive-gauge-glow) !important;
}

.btn-disabled, .btn:disabled, #btn-queue:disabled {
    background: #1f2538 !important;
    color: #555f75 !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
    transform: none !important;
    filter: none !important;
}

/* ==========================================================================
   FORMAT SELECTOR (FT1, FT2, FT3, FT5, ANY%) - SF6 ARCADE CARTRIDGES
   ========================================================================== */
.format-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 12px;
    width: 100%;
    margin-top: 8px;
}

.format-btn {
    background: rgba(15, 18, 29, 0.9);
    border: 2px solid var(--sf-border);
    border-radius: 6px;
    padding: 14px 10px;
    text-align: center;
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.25s ease;
    user-select: none;
    position: relative;
    overflow: hidden;
}

.format-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: transparent;
    transition: background 0.25s ease;
}

.format-btn:hover {
    border-color: rgba(0, 240, 255, 0.5);
    color: #ffffff;
    transform: translateY(-2px);
    background: rgba(22, 28, 45, 0.95);
    box-shadow: 0 4px 15px rgba(0, 240, 255, 0.2);
}

.format-btn.active-format {
    background: linear-gradient(135deg, rgba(255, 0, 85, 0.2), rgba(0, 240, 255, 0.2));
    border-color: var(--sf-drive-rush);
    color: #ffffff;
    box-shadow: 0 0 20px var(--sf-drive-rush-glow), inset 0 0 10px rgba(0, 240, 255, 0.2);
    transform: translateY(-2px);
}

.format-btn.active-format::before {
    background: linear-gradient(90deg, var(--sf-drive-impact), var(--sf-drive-rush));
}

/* ==========================================================================
   STATUS CARD & OPPONENT VS DISPLAY
   ========================================================================== */
.status-card {
    background: rgba(10, 11, 18, 0.7);
    border: 1px solid var(--sf-border);
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    margin: 24px 0;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.5);
    position: relative;
}

.status-text {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Opponent VS Card */
.opponent-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    background: linear-gradient(135deg, rgba(255, 0, 85, 0.15), rgba(0, 240, 255, 0.15));
    border: 2px solid var(--sf-drive-impact);
    border-radius: 8px;
    padding: 18px;
    margin-top: 16px;
    box-shadow: 0 0 25px var(--sf-drive-impact-glow);
    animation: vsPulse 2s infinite ease-in-out;
}

@keyframes vsPulse {
    0%, 100% { box-shadow: 0 0 20px var(--sf-drive-impact-glow); }
    50% { box-shadow: 0 0 35px rgba(255, 0, 85, 0.75); }
}

.opponent-avatar {
    width: 64px;
    height: 64px;
    border-radius: 6px;
    border: 2px solid var(--sf-drive-impact);
    box-shadow: 0 0 15px var(--sf-drive-impact-glow);
    object-fit: cover;
}

.opponent-details {
    text-align: left;
}

.opponent-name {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.1;
    letter-spacing: 1px;
}

.opponent-cfn {
    color: var(--sf-drive-rush);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
}

/* ==========================================================================
   ROUND REPORTING PILLS (SF6 ROUND WIN COUNTER)
   ========================================================================== */
.round-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 12px;
    padding: 10px;
    background: rgba(15, 18, 29, 0.6);
    border-radius: 6px;
    border: 1px solid var(--sf-border);
}

.round-label {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    min-width: 80px;
    text-transform: uppercase;
}

.round-btn-group,
.round-buttons {
    display: flex;
    gap: 8px;
}

.round-btn {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 8px 18px;
    border-radius: 4px;
    border: 1px solid var(--sf-border);
    background: rgba(20, 24, 38, 0.8);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
}

.round-btn:hover {
    border-color: var(--sf-drive-rush);
    color: #ffffff;
}

.round-btn.win:hover {
    border-color: var(--sf-drive-gauge);
    color: var(--sf-drive-gauge);
}

.round-btn.loss:hover {
    border-color: var(--sf-drive-impact);
    color: var(--sf-drive-impact);
}

.round-btn.selected-win,
.round-btn.win.active,
.round-btn.active.win {
    background: var(--sf-drive-gauge) !important;
    border-color: var(--sf-drive-gauge) !important;
    color: #0a0b12 !important;
    font-weight: 900 !important;
    box-shadow: 0 0 16px var(--sf-drive-gauge-glow) !important;
    transform: translateY(-1px);
}

.round-btn.selected-loss,
.round-btn.loss.active,
.round-btn.active.loss {
    background: var(--sf-drive-impact) !important;
    border-color: var(--sf-drive-impact) !important;
    color: #ffffff !important;
    font-weight: 900 !important;
    box-shadow: 0 0 16px var(--sf-drive-impact-glow) !important;
    transform: translateY(-1px);
}

/* ==========================================================================
   LEADERBOARD TABLE (TOURNAMENT STANDINGS)
   ========================================================================== */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 6px;
    border: 1px solid var(--sf-border);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 540px;
}

th, td {
    padding: 14px 12px;
    text-align: left;
    border-bottom: 1px solid var(--sf-border);
    font-size: 0.9rem;
}

th {
    font-family: var(--font-display);
    color: var(--sf-drive-rush);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    background: rgba(10, 11, 18, 0.9);
    white-space: nowrap;
    border-bottom: 2px solid var(--sf-border);
}

tbody tr {
    transition: background 0.15s ease;
}

tbody tr:hover {
    background: rgba(0, 240, 255, 0.05);
}

/* Podium Ranks (Master Gold, Silver, Bronze) */
.rank-1 td {
    background: linear-gradient(90deg, rgba(255, 170, 0, 0.15), transparent 60%);
    font-weight: 700;
}
.rank-1 .rank {
    color: var(--sf-gold) !important;
    text-shadow: 0 0 10px var(--sf-gold-glow);
}

.rank-2 td {
    background: linear-gradient(90deg, rgba(220, 230, 242, 0.1), transparent 60%);
}
.rank-2 .rank {
    color: #e2e8f0 !important;
}

.rank-3 td {
    background: linear-gradient(90deg, rgba(205, 127, 50, 0.1), transparent 60%);
}
.rank-3 .rank {
    color: #cd7f32 !important;
}

.rank {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-muted);
}

/* ==========================================================================
   INPUT FIELDS & FORMS
   ========================================================================== */
.form-group {
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    text-align: left;
}

.form-group label, .config-label {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 6px;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="url"],
select {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--sf-border);
    border-radius: 4px;
    padding: 12px 14px;
    color: #ffffff;
    font-size: 0.95rem;
    font-family: var(--font-body);
    transition: all 0.25s ease;
    outline: none;
}

input:focus, select:focus {
    border-color: var(--sf-drive-rush);
    box-shadow: 0 0 12px var(--sf-drive-rush-glow);
    background: rgba(15, 18, 29, 0.95);
}

/* ==========================================================================
   DOM ALERTS & WARNINGS
   ========================================================================== */
.unlogged-warning {
    background: linear-gradient(135deg, rgba(255, 0, 85, 0.15), rgba(255, 170, 0, 0.15));
    border: 1px solid var(--sf-drive-impact);
    border-left: 4px solid var(--sf-drive-impact);
    border-radius: 4px;
    padding: 14px 18px;
    color: #ffffff;
    font-size: 0.9rem;
    margin-bottom: 24px;
    text-align: center;
}

.unlogged-warning a {
    color: var(--sf-drive-rush);
    font-weight: 700;
    text-decoration: underline;
}

#dom-alert-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.dom-alert {
    pointer-events: auto;
    min-width: 320px;
    max-width: 440px;
    padding: 14px 18px;
    border-radius: 8px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    color: #ffffff;
    background: #0f172a;
    border: 1px solid #334155;
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.95), 0 0 1px rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.dom-alert.warning {
    background: #1e1305;
    border: 1px solid #f59e0b;
    border-left: 6px solid #f59e0b;
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.95), 0 0 20px rgba(245, 158, 11, 0.4);
    color: #fef3c7;
}

.dom-alert.error {
    background: #1f0714;
    border: 1px solid var(--sf-drive-impact);
    border-left: 6px solid var(--sf-drive-impact);
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.95), 0 0 20px var(--sf-drive-impact-glow);
    color: #ffe4e6;
}

.dom-alert.success {
    background: #061f14;
    border: 1px solid var(--sf-drive-gauge);
    border-left: 6px solid var(--sf-drive-gauge);
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.95), 0 0 20px var(--sf-drive-gauge-glow);
    color: #d1fae5;
}

.dom-alert.info {
    background: #071626;
    border: 1px solid var(--sf-drive-rush);
    border-left: 6px solid var(--sf-drive-rush);
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.95), 0 0 20px var(--sf-drive-rush-glow);
    color: #e0f2fe;
}

.dom-alert-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.3rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
    transition: color 0.2s, transform 0.2s;
}

.dom-alert-close:hover {
    color: #ffffff;
    transform: scale(1.15);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer {
    width: 100%;
    padding: 24px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    border-top: 1px solid var(--sf-border);
    background: rgba(10, 11, 18, 0.9);
}

footer a {
    color: var(--sf-drive-rush);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

footer a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* ==========================================================================
   STATS PAGE - FIGHTER ROSTER & METRICS CARDS
   ========================================================================== */
.search-input {
    width: 100%;
    padding: 12px 18px;
    background: var(--input-bg);
    border: 1px solid var(--sf-border);
    border-radius: 6px;
    color: #ffffff;
    font-size: 1rem;
    font-family: var(--font-body);
    outline: none;
    transition: all 0.25s ease;
    margin-bottom: 8px;
}

.search-input:focus {
    border-color: var(--sf-drive-rush);
    box-shadow: 0 0 15px var(--sf-drive-rush-glow);
    background: rgba(15, 18, 29, 0.95);
}

.players-scroll-container {
    max-height: 640px;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 6px 8px 14px 4px;
}

.players-scroll-container::-webkit-scrollbar {
    width: 6px;
}
.players-scroll-container::-webkit-scrollbar-track {
    background: rgba(10, 11, 18, 0.6);
    border-radius: 4px;
}
.players-scroll-container::-webkit-scrollbar-thumb {
    background: var(--sf-border);
    border-radius: 4px;
}
.players-scroll-container::-webkit-scrollbar-thumb:hover {
    background: var(--sf-drive-rush);
}

.player-stat-card {
    background: rgba(15, 18, 29, 0.9);
    border: 1px solid var(--sf-border);
    border-left: 4px solid var(--sf-drive-rush);
    border-radius: 6px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-sizing: border-box;
    width: 100%;
}

.player-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(0, 240, 255, 0.04) 0%, transparent 60%);
    pointer-events: none;
    border-radius: 6px;
}

.player-stat-card:hover {
    border-color: var(--sf-drive-rush);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 240, 255, 0.2);
}

.player-identity {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 180px;
    flex: 1 1 220px;
}

.player-avatar {
    width: 52px;
    height: 52px;
    min-width: 52px;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    border: 2px solid var(--sf-drive-rush);
    object-fit: cover;
    background-color: var(--sf-card-solid);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.35);
    flex-shrink: 0;
}

#main-stage-avatar {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    max-width: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    aspect-ratio: 1 / 1 !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    flex-shrink: 0 !important;
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.4);
}

.player-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    flex: 1;
}

.player-nick {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-meta {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-family: var(--font-body);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(70px, 1fr));
    gap: 8px;
    flex: 1 1 320px;
    min-width: 260px;
}

.metric-box {
    background: rgba(10, 11, 18, 0.7);
    border: 1px solid var(--sf-border);
    border-radius: 4px;
    padding: 8px 10px;
    text-align: center;
    min-width: 0;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.metric-box:hover {
    border-color: var(--sf-border-light);
}

.metric-title {
    font-family: var(--font-display);
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.metric-value {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    margin-top: 2px;
    color: #ffffff;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* ==========================================================================
   AUTH PAGE - TABS & SIGN-IN / REGISTER CARDS
   ========================================================================== */
.auth-wrapper {
    width: 100%;
    max-width: 480px;
    margin: 40px auto;
    padding: 0 16px;
}

.auth-header {
    text-align: center;
    margin-bottom: 24px;
}

.auth-header h1 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    font-style: italic;
    color: #ffffff;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.auth-header p {
    font-size: 0.85rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
    font-family: var(--font-display);
    margin-top: 4px;
}

.tabs {
    display: flex;
    border-bottom: 2px solid var(--sf-border);
    margin-bottom: 24px;
    gap: 8px;
}

.tab-btn {
    flex: 1;
    padding: 12px 16px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.25s ease;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}

.tab-btn:hover {
    color: #ffffff;
}

.tab-btn.active {
    color: var(--sf-drive-rush);
    border-bottom: 3px solid var(--sf-drive-rush);
    text-shadow: 0 0 12px var(--sf-drive-rush-glow);
}

.form-row {
    display: flex;
    gap: 14px;
}

.form-row .form-group {
    flex: 1;
}

.avatar-preview-container {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 10px;
    padding: 10px 14px;
    background: rgba(10, 11, 18, 0.6);
    border: 1px solid var(--sf-border);
    border-radius: 4px;
}

.avatar-preview-img {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 2px solid var(--sf-drive-rush);
    object-fit: cover;
    background-color: var(--sf-card-solid);
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.35);
}

.btn-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--sf-drive-impact), #ff2266);
    color: #ffffff;
    border: none;
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.25s ease;
    margin-top: 12px;
    clip-path: var(--clip-slant);
    box-shadow: 0 4px 15px var(--sf-drive-impact-glow);
}

.btn-submit:hover {
    background: linear-gradient(135deg, #ff1a66, #ff4080);
    box-shadow: 0 6px 25px rgba(255, 0, 85, 0.6);
    transform: translateY(-1px);
}

.link-action {
    display: inline-block;
    margin-top: 12px;
    font-size: 0.85rem;
    color: var(--sf-drive-rush);
    text-decoration: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.link-action:hover {
    color: #ffffff;
    text-shadow: 0 0 8px var(--sf-drive-rush-glow);
    text-decoration: underline;
}

.alert {
    padding: 12px 16px;
    border-radius: 4px;
    font-size: 0.88rem;
    margin-bottom: 20px;
    display: none;
    font-weight: 500;
}

.alert-danger {
    background: rgba(255, 0, 85, 0.15);
    border: 1px solid var(--sf-drive-impact);
    border-left: 4px solid var(--sf-drive-impact);
    color: #ff99bb;
}

.alert-success {
    background: rgba(0, 255, 136, 0.15);
    border: 1px solid var(--sf-drive-gauge);
    border-left: 4px solid var(--sf-drive-gauge);
    color: #99ffd0;
}

/* ==========================================================================
   ACCOUNT SETTINGS PAGE - PROFILE LAYOUT
   ========================================================================== */
.profile-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 30px;
}

.profile-sidebar {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(10, 11, 18, 0.8);
    border: 1px solid var(--sf-border);
    padding: 28px 20px;
    border-radius: 8px;
    text-align: center;
    height: fit-content;
    position: relative;
    overflow: hidden;
}

.profile-sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--sf-drive-impact), var(--sf-drive-rush));
}

.profile-avatar {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    border: 3px solid var(--sf-drive-rush);
    object-fit: cover;
    background-color: var(--sf-card-solid);
    margin-bottom: 16px;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
}

.nick-badge {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    color: #ffffff;
    word-break: break-all;
    letter-spacing: 0.5px;
}

.nick-sub {
    font-size: 0.75rem;
    color: var(--sf-drive-rush);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.profile-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-control {
    background: var(--input-bg);
    border: 1px solid var(--sf-border);
    color: #ffffff;
    padding: 12px 14px;
    border-radius: 4px;
    font-size: 0.95rem;
    font-family: var(--font-body);
    outline: none;
    transition: all 0.25s ease;
}

.form-control:focus {
    border-color: var(--sf-drive-rush);
    box-shadow: 0 0 12px var(--sf-drive-rush-glow);
    background: rgba(15, 18, 29, 0.95);
}

select.form-control {
    cursor: pointer;
}

select.form-control option {
    background: #131724;
    color: #ffffff;
}

.profile-form .btn-submit {
    align-self: flex-end;
    width: auto;
    min-width: 180px;
    padding: 12px 28px;
}

.status-msg {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-top: 10px;
    text-align: center;
}

/* ==========================================================================
   LIVES SHOWCASE - BATTLE BROADCAST HUB
   ========================================================================== */
.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 0, 85, 0.2);
    border: 1px solid var(--sf-drive-impact);
    color: #ff3377;
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 4px;
    box-shadow: 0 0 10px var(--sf-drive-impact-glow);
}

.live-badge::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: var(--sf-drive-impact);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--sf-drive-impact);
    animation: livePulse 1.2s infinite;
}

@keyframes livePulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.5; }
}

.offline-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(142, 155, 176, 0.15);
    border: 1px solid var(--sf-border);
    color: var(--text-muted);
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 4px;
}

.main-stage-container {
    width: 100%;
    background: rgba(10, 11, 18, 0.95);
    border: 1px solid var(--sf-border);
    border-top: 4px solid var(--sf-drive-impact);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 28px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7), 0 0 25px rgba(255, 0, 85, 0.2);
}

.main-stage-header {
    padding: 12px 20px;
    background: rgba(15, 18, 29, 0.9);
    border-bottom: 1px solid var(--sf-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.main-stage-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.player-embed-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 widescreen */
    background: #000000;
}

.player-embed-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.main-stage-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: rgba(19, 23, 36, 0.95);
    border-top: 1px solid var(--sf-border);
    flex-wrap: wrap;
    gap: 14px;
}

.stream-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.stream-card {
    background: rgba(15, 18, 29, 0.85);
    border: 1px solid var(--sf-border);
    border-radius: 6px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.25s ease;
    cursor: pointer;
    position: relative;
}

.stream-card:hover {
    border-color: var(--sf-drive-rush);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 240, 255, 0.25);
}

.stream-card.is-live {
    border-left: 4px solid var(--sf-drive-impact);
    background: linear-gradient(135deg, rgba(255, 0, 85, 0.08) 0%, rgba(15, 18, 29, 0.95) 100%);
}

.stream-card.is-active-stage {
    border-color: var(--sf-drive-rush);
    box-shadow: 0 0 18px var(--sf-drive-rush-glow);
}

.platform-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
}

.platform-badge.twitch {
    background: rgba(145, 70, 255, 0.2);
    border: 1px solid #9146FF;
    color: #c499ff;
}

.platform-badge.youtube {
    background: rgba(255, 0, 0, 0.2);
    border: 1px solid #FF0000;
    color: #ff8080;
}

.platform-badge:hover {
    filter: brightness(1.2);
}

.viewers-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.5px;
}

/* ==========================================================================
   RESPONSIVENESS
   ========================================================================== */
@media (max-width: 600px) {
    .player-identity {
        width: 100%;
        flex: 1 1 100%;
    }

    .player-metrics {
        grid-template-columns: repeat(2, 1fr);
        width: 100%;
        flex: 1 1 100%;
        gap: 6px;
    }

    .profile-layout {
        grid-template-columns: 1fr;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }
}

@media (max-width: 680px) {
    header {
        padding: 12px 16px;
        flex-direction: column;
        text-align: center;
    }

    nav {
        width: 100%;
        justify-content: center;
    }

    .container {
        padding: 20px 16px;
    }

    h1, h2 {
        font-size: 1.6rem;
    }

    .format-buttons {
        grid-template-columns: repeat(3, 1fr);
    }
}


/* ==========================================================================
   SF6 THEME - TEAMS & CLANS MODULE & NAVBAR DROPDOWN
   ========================================================================== */

/* Navbar Dropdown */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.nav-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 6px;
}

.nav-dropdown-toggle:hover,
.nav-dropdown:hover .nav-dropdown-toggle {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: rgba(15, 18, 29, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--sf-border);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7), 0 0 20px rgba(0, 240, 255, 0.1);
    border-radius: 8px;
    padding: 8px 0;
    z-index: 1000;
    animation: sfDropdownFade 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown-menu.show {
    display: block;
}

.nav-dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
    transition: all 0.15s ease;
}

.nav-dropdown-menu a:hover {
    background: rgba(0, 240, 255, 0.12);
    color: var(--sf-drive-rush);
    padding-left: 22px;
}

@keyframes sfDropdownFade {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Global Team Tag Badge - Sleek Esports Aesthetic */
.team-tag-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1px 5px;
    margin-right: 0;
    font-family: 'Chakra Petch', sans-serif;
    font-size: 0.72em;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: 0.75px;
    text-transform: uppercase;
    color: var(--sf-drive-rush);
    background: rgba(0, 240, 255, 0.08);
    border: 1px solid rgba(0, 240, 255, 0.3);
    border-radius: 3px;
    vertical-align: 1px;
    transition: all 0.2s ease;
}

/* In navbar user badge */
.user-nick .team-tag-badge {
    font-size: 0.7em;
    padding: 0px 4px;
    height: 16px;
    vertical-align: middle;
    letter-spacing: 0.5px;
}

/* In large profile card (account page) */
.nick-badge .team-tag-badge {
    font-size: 0.65em;
    padding: 2px 6px;
    vertical-align: middle;
    border-radius: 4px;
    letter-spacing: 0.8px;
}

/* In leaderboard table and player cards */
table td .team-tag-badge,
.player-nick .team-tag-badge {
    font-size: 0.72em;
    padding: 1px 5px;
    vertical-align: middle;
}

/* Teams Tabs */
.teams-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 2px solid var(--sf-border);
    padding-bottom: 12px;
    flex-wrap: wrap;
}

.team-tab-btn {
    background: rgba(19, 23, 36, 0.6);
    border: 1px solid var(--sf-border);
    color: var(--text-muted);
    font-family: 'Chakra Petch', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.team-tab-btn:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
}

.team-tab-btn.active {
    background: linear-gradient(135deg, rgba(255, 0, 85, 0.25), rgba(0, 240, 255, 0.25));
    border-color: var(--sf-drive-rush);
    color: #fff;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
}

.tab-badge {
    background: var(--sf-drive-impact);
    color: #fff;
    font-size: 0.75rem;
    padding: 1px 6px;
    border-radius: 10px;
    font-weight: 800;
}

/* Podium Top 3 Teams */
.teams-podium {
    display: grid;
    grid-template-columns: 1fr 1.15fr 1fr;
    gap: 18px;
    margin-bottom: 30px;
    align-items: end;
}

.podium-card {
    background: var(--sf-card-bg);
    border: 1px solid var(--sf-border);
    border-radius: 12px;
    padding: 24px 18px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
}

.podium-card:hover {
    transform: translateY(-6px);
}

.podium-card.rank-1 {
    order: 2;
    padding-top: 32px;
    padding-bottom: 32px;
    background: linear-gradient(180deg, rgba(255, 170, 0, 0.12), rgba(19, 23, 36, 0.95));
    border: 2px solid var(--sf-gold);
    box-shadow: 0 12px 35px rgba(255, 170, 0, 0.25);
}

.podium-card.rank-2 {
    order: 1;
    background: linear-gradient(180deg, rgba(160, 175, 200, 0.1), rgba(19, 23, 36, 0.95));
    border: 1px solid rgba(200, 210, 230, 0.4);
    box-shadow: 0 8px 25px rgba(160, 175, 200, 0.15);
}

.podium-card.rank-3 {
    order: 3;
    background: linear-gradient(180deg, rgba(205, 127, 50, 0.1), rgba(19, 23, 36, 0.95));
    border: 1px solid rgba(205, 127, 50, 0.4);
    box-shadow: 0 8px 25px rgba(205, 127, 50, 0.15);
}

.podium-crown {
    font-size: 2rem;
    margin-bottom: 8px;
}

.podium-logo {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--sf-border);
    margin: 0 auto 12px;
    display: block;
    background: #0f121d;
}

.podium-card.rank-1 .podium-logo {
    width: 84px;
    height: 84px;
    border-color: var(--sf-gold);
    box-shadow: 0 0 20px var(--sf-gold-glow);
}

.podium-team-name {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.podium-team-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.podium-points {
    font-family: 'Teko', sans-serif;
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--sf-drive-gauge);
    line-height: 1;
    margin-bottom: 4px;
}

.podium-members {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Team Table List */
.teams-table-card {
    background: var(--sf-card-bg);
    border: 1px solid var(--sf-border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.team-row {
    cursor: pointer;
    transition: background 0.2s ease;
}

.team-row:hover {
    background: rgba(0, 240, 255, 0.08) !important;
}

.team-logo-mini {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--sf-border);
    background: #0f121d;
    vertical-align: middle;
    margin-right: 12px;
}

.team-identity-cell {
    display: flex;
    align-items: center;
}

.team-cell-info {
    display: flex;
    flex-direction: column;
}

.team-cell-name {
    font-weight: 700;
    color: #fff;
    font-size: 1rem;
}

.team-cell-owner {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Team Details Header Banner */
.team-details-banner {
    background: var(--sf-card-bg);
    border: 1px solid var(--sf-border);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
}

.team-banner-stripe {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: var(--sf-drive-impact);
}

.team-details-header-content {
    display: flex;
    align-items: center;
    gap: 25px;
    flex-wrap: wrap;
}

.team-banner-logo {
    width: 100px;
    height: 100px;
    border-radius: 16px;
    object-fit: cover;
    border: 3px solid var(--sf-border);
    background: #0f121d;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
}

.team-banner-info {
    flex: 1;
    min-width: 250px;
}

.team-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.team-banner-name {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
    margin: 0;
}

.team-banner-tag {
    padding: 4px 12px;
    border-radius: 6px;
    font-family: 'Chakra Petch', sans-serif;
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
}

.team-banner-meta {
    display: flex;
    gap: 18px;
    color: var(--text-muted);
    font-size: 0.95rem;
    flex-wrap: wrap;
}

.team-stats-box {
    display: flex;
    gap: 20px;
    background: rgba(15, 18, 29, 0.7);
    border: 1px solid var(--sf-border);
    padding: 16px 24px;
    border-radius: 12px;
    text-align: center;
}

.team-stat-metric {
    display: flex;
    flex-direction: column;
}

.stat-metric-num {
    font-family: 'Teko', sans-serif;
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--sf-drive-gauge);
    line-height: 1;
}

.stat-metric-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 700;
}

/* Role Badges */
.role-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-family: 'Chakra Petch', sans-serif;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.role-badge.role-owner {
    background: linear-gradient(135deg, rgba(255, 170, 0, 0.25), rgba(255, 0, 85, 0.25));
    color: var(--sf-gold);
    border: 1px solid var(--sf-gold);
    box-shadow: 0 0 10px rgba(255, 170, 0, 0.3);
}

.role-badge.role-admin {
    background: rgba(0, 240, 255, 0.15);
    color: var(--sf-drive-rush);
    border: 1px solid var(--sf-drive-rush);
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.25);
}

.role-badge.role-member {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Management Panel */
.team-admin-card {
    background: var(--sf-card-bg);
    border: 1px solid var(--sf-border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 25px;
}

.team-admin-card h3 {
    font-family: 'Chakra Petch', sans-serif;
    color: var(--sf-drive-rush);
    font-size: 1.3rem;
    margin-top: 0;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.admin-box {
    background: rgba(15, 18, 29, 0.6);
    border: 1px solid var(--sf-border);
    padding: 16px;
    border-radius: 8px;
}

.admin-box h4 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 1rem;
    color: #fff;
}

/* Color Presets */
.color-picker-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.color-palette {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.color-swatch {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.color-swatch:hover, .color-swatch.selected {
    transform: scale(1.15);
    border-color: #fff;
}

/* Invites list */
.invites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 18px;
}

.invite-card {
    background: var(--sf-card-bg);
    border: 1px solid var(--sf-border);
    border-radius: 12px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.invite-card-top {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 16px;
}

.invite-logo {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    object-fit: cover;
    border: 2px solid var(--sf-border);
    background: #0f121d;
}

.invite-actions {
    display: flex;
    gap: 10px;
}

.btn-accept {
    flex: 1;
    background: linear-gradient(135deg, var(--sf-drive-gauge), #00c868);
    color: #000;
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 800;
    padding: 9px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-accept:hover {
    box-shadow: 0 0 15px var(--sf-drive-gauge-glow);
    transform: translateY(-2px);
}

.btn-decline {
    flex: 1;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 700;
    padding: 9px 16px;
    border: 1px solid var(--sf-border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-decline:hover {
    background: rgba(255, 0, 85, 0.15);
    color: var(--sf-drive-impact);
    border-color: var(--sf-drive-impact);
}

.btn-danger-custom {
    background: rgba(255, 0, 85, 0.15);
    color: var(--sf-drive-impact);
    border: 1px solid var(--sf-drive-impact);
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-danger-custom:hover {
    background: var(--sf-drive-impact);
    color: #fff;
    box-shadow: 0 0 15px var(--sf-drive-impact-glow);
}

.btn-action-admin {
    background: rgba(0, 240, 255, 0.1);
    color: #00f0ff;
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 4px 8px;
    border: 1px solid rgba(0, 240, 255, 0.4);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-action-admin:hover {
    background: rgba(0, 240, 255, 0.25);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

.btn-action-admin.demote {
    background: rgba(255, 170, 0, 0.1);
    color: #ffaa00;
    border-color: rgba(255, 170, 0, 0.4);
}

.btn-action-admin.demote:hover {
    background: rgba(255, 170, 0, 0.25);
    box-shadow: 0 0 10px rgba(255, 170, 0, 0.3);
}

.btn-action-owner {
    background: rgba(255, 215, 0, 0.12);
    color: #ffd700;
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 4px 8px;
    border: 1px solid rgba(255, 215, 0, 0.4);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-action-owner:hover {
    background: #ffd700;
    color: #0a0b12;
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.5);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .teams-podium {
        grid-template-columns: 1fr;
    }
    .podium-card.rank-1 {
        order: 1;
    }
    .podium-card.rank-2 {
        order: 2;
    }
    .podium-card.rank-3 {
        order: 3;
    }
    .team-details-header-content {
        flex-direction: column;
        text-align: center;
    }
    .team-title-row {
        justify-content: center;
    }
    .team-banner-meta {
        justify-content: center;
    }
    .team-stats-box {
        width: 100%;
        justify-content: center;
    }
}
