/* MustPVP Player Panel - Tebex-inspired dark theme */

:root {
    --bg: #1F1B36;
    --bg-secondary: #100C1E;
    --card: #261E3E;
    --card-secondary: #2A2145;
    --border: #352B55;
    --primary: #AA5CC7;
    --primary-glow: rgba(170, 92, 199, 0.3);
    --text: #f2f2f2;
    --text-muted: #8b85a0;
    --success: #1CCC7C;
    --destructive: #FF3434;
    --gold: #FFAA00;
    --discord: #5865F2;
    --radius: 12px;
    --radius-sm: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Particles canvas */
#particles {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Navbar */
.navbar {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;
    background: rgba(16, 12, 30, 0.6);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
}

.logo-icon {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--primary), #7B3FA0);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
}

.logo-text {
    font-weight: 700;
    font-size: 18px;
}

.logo-dot { color: var(--primary); }

.nav-links, .nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-link {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}
.nav-link:hover { color: var(--text); text-decoration: none; }

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

.nav-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    border: 2px solid var(--border);
}

.nav-name {
    font-size: 14px;
    font-weight: 500;
}

.nav-logout {
    color: var(--destructive) !important;
    font-size: 13px;
}

/* Hero / Landing */
.landing {
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 60px;
    padding: 80px 40px;
    max-width: 1200px;
    margin: 0 auto;
    min-height: calc(100vh - 70px);
}

.hero-content {
    flex: 1;
}

.hero-title {
    font-size: 64px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
}

.title-line { display: block; }

.gradient-text {
    background: linear-gradient(135deg, var(--primary), #D98FEF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-desc {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 32px;
    max-width: 450px;
    line-height: 1.6;
}

.btn-discord {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: var(--discord);
    color: #fff;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.btn-discord:hover {
    background: #4752C4;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(88, 101, 242, 0.4);
    text-decoration: none;
}

.hero-info {
    margin-top: 24px;
    color: var(--text-muted);
    font-size: 14px;
}

.hero-info strong { color: var(--text); }

.hero-visual {
    flex: 0 0 380px;
}

/* Server Status Widget */
.server-status-widget {
    background: rgba(38, 30, 62, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    animation: fadeSlideUp 0.6s ease;
}

.widget-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.server-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.server-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: all 0.2s;
}

.server-item:hover {
    background: var(--card-secondary);
}

.server-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.server-dot.online {
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
    animation: pulse 2s infinite;
}

.server-dot.starting { background: var(--gold); }
.server-dot.offline { background: var(--destructive); }

.server-name { flex: 1; font-weight: 500; }
.server-info { color: var(--text-muted); font-size: 12px; }

/* Cards */
.card {
    background: rgba(38, 30, 62, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
}

.card-center {
    max-width: 420px;
    text-align: center;
}

.card-center h2 {
    margin-bottom: 12px;
    font-size: 24px;
}

.card-center p {
    color: var(--text-muted);
    margin-bottom: 16px;
    line-height: 1.5;
}

/* Content center */
.content-center {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 70px);
    padding: 40px;
}

/* Loading */
.loading-screen {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 70px);
    gap: 16px;
    color: var(--text-muted);
}

.loader {
    width: 40px; height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Link steps */
.link-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 24px 0 8px;
    text-align: left;
}

.link-step {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    font-size: 14px;
}

.step-number {
    width: 28px; height: 28px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

/* Link form */
.link-form {
    display: flex;
    gap: 10px;
    margin: 20px 0;
}

.input {
    flex: 1;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.input:focus { border-color: var(--primary); }

.btn-primary {
    padding: 12px 24px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-primary:hover {
    background: #9248B3;
    transform: translateY(-1px);
}

.text-error { color: var(--destructive); font-size: 14px; }
.text-muted { color: var(--text-muted); }
.small { font-size: 13px; }
code {
    background: var(--bg-secondary);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
}

/* Profile Page */
.profile-page {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px;
}

.profile-layout {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

/* Player Card */
.player-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.skin-viewer-container {
    width: 200px;
    height: 300px;
    margin-bottom: 16px;
    border-radius: var(--radius);
    overflow: hidden;
    background: rgba(16, 12, 30, 0.5);
}

.skin-canvas {
    width: 200px;
    height: 300px;
    cursor: grab;
}

.skin-canvas:active { cursor: grabbing; }

.player-name {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 8px;
}

.rank-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
}

.player-meta {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(53, 43, 85, 0.5);
    font-size: 13px;
}

.meta-label { color: var(--text-muted); }
.meta-value { font-weight: 500; }
/* Staff badge */
.staff-badge {
    display: inline-block;
    padding: 3px 12px;
    background: linear-gradient(135deg, #FF5555, #AA0000);
    border-radius: 12px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
    box-shadow: 0 0 12px rgba(255, 85, 85, 0.3);
}

/* Punishment section */
.punishment-section {
    background: rgba(38, 30, 62, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-top: 16px;
}

.section-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
}

.punishment-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.punishment-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    font-size: 13px;
}

.punishment-type {
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}
.punishment-type.ban { background: rgba(255, 52, 52, 0.2); color: var(--destructive); }
.punishment-type.mute { background: rgba(255, 170, 0, 0.2); color: var(--gold); }
.punishment-type.warn { background: rgba(85, 85, 255, 0.2); color: #5555FF; }
.punishment-type.kick { background: rgba(170, 92, 199, 0.2); color: var(--primary); }
.punishment-type.blacklist { background: rgba(255, 52, 52, 0.3); color: #FF5555; }

.punishment-reason { flex: 1; color: var(--text-muted); }
.punishment-date { color: var(--text-muted); font-size: 11px; }
.punishment-active { color: var(--destructive); font-weight: 600; font-size: 11px; }
.punishment-expired { color: var(--text-muted); font-size: 11px; }

.punishment-item { border-radius: var(--radius-sm); overflow: hidden; }
.punishment-expand {
    color: var(--text-muted);
    font-size: 10px;
    transition: transform 0.2s;
    flex-shrink: 0;
}
.punishment-item.expanded .punishment-expand { transform: rotate(180deg); }
.punishment-row { cursor: pointer; }
.punishment-row:hover { background: var(--card-secondary); }

.punishment-details {
    display: none;
    padding: 10px 14px;
    background: rgba(16, 12, 30, 0.5);
    border-top: 1px solid var(--border);
}
.punishment-item.expanded .punishment-details { display: block; }

.pd-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 12px;
    color: var(--text-muted);
}
.pd-row span:last-child { color: var(--text); font-weight: 500; }

/* Stats Area */
.stats-area {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-secondary);
    padding: 4px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow-x: auto;
}

.tab {
    flex: 1;
    padding: 10px 16px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    font-family: inherit;
    white-space: nowrap;
}

.tab:hover { color: var(--text); background: rgba(170, 92, 199, 0.1); }

.tab.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px var(--primary-glow);
}

/* Tab panels */
.tab-content {
    position: relative;
}

.tab-panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-panel.active { display: block; }

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.stat-card {
    background: rgba(38, 30, 62, 0.7);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.3s;
}

.stat-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(170, 92, 199, 0.15);
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
}

.stat-green { color: var(--success); }
.stat-red { color: var(--destructive); }
.stat-purple { color: var(--primary); }
.stat-gold { color: var(--gold); }

/* Coming soon */
.coming-soon {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.coming-soon-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.coming-soon h3 {
    font-size: 20px;
    margin-bottom: 8px;
    color: var(--text);
}

/* Server Status Bar */
.server-bar {
    background: rgba(38, 30, 62, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 24px;
}

.server-bar-list {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    align-items: center;
}

.server-bar-item {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 500;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.animate-in {
    animation: fadeSlideUp 0.5s ease forwards;
    opacity: 0;
}

.hidden { display: none !important; }

/* Friends list */
.friends-list {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.friend-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--bg-secondary);
    border-radius: 16px;
    font-size: 12px;
    color: var(--text);
    text-decoration: none;
    transition: all 0.2s;
}
.friend-chip:hover { background: var(--card-secondary); text-decoration: none; }
.friend-chip img { width: 18px; height: 18px; border-radius: 3px; image-rendering: pixelated; }

/* Search Page */
.search-page {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 32px;
}

.search-section { text-align: center; margin-bottom: 32px; }

.search-title {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 24px;
}

.search-bar {
    display: flex;
    gap: 10px;
    max-width: 500px;
    margin: 0 auto;
}

.search-input { font-size: 16px; }

/* Leaderboard */
.leaderboard-section {
    background: rgba(38, 30, 62, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
}

.lb-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    background: var(--bg-secondary);
    padding: 4px;
    border-radius: var(--radius-sm);
}

.lb-tab {
    flex: 1;
    padding: 8px 16px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
    font-family: inherit;
}
.lb-tab:hover { color: var(--text); }
.lb-tab.active { background: var(--primary); color: #fff; }

.lb-panel { display: none; }
.lb-panel.active { display: block; }

.lb-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 12px;
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.lb-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 14px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s;
    animation: fadeSlideUp 0.3s ease forwards;
    opacity: 0;
}

.lb-row:hover {
    background: var(--card-secondary);
    transform: translateX(4px);
    text-decoration: none;
}

.lb-pos {
    width: 40px;
    font-weight: 700;
    font-size: 14px;
    color: var(--text-muted);
    text-align: center;
    flex-shrink: 0;
}

.lb-pos.gold { color: #FFD700; }
.lb-pos.silver { color: #C0C0C0; }
.lb-pos.bronze { color: #CD7F32; }

.lb-head {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    flex-shrink: 0;
    image-rendering: pixelated;
}

.lb-name {
    flex: 1;
    font-weight: 600;
    font-size: 14px;
}

.lb-rank {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.lb-tag {
    color: var(--text-muted);
    font-size: 12px;
}

.lb-stat {
    color: var(--primary);
    font-weight: 700;
    font-size: 13px;
    min-width: 70px;
    text-align: right;
}

.lb-stat-sm {
    color: var(--text-muted);
    font-size: 11px;
    min-width: 60px;
    text-align: right;
}

/* Sort bar */
.sort-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.sort-label { color: var(--text-muted); font-size: 12px; font-weight: 600; margin-right: 4px; }
.sort-btn {
    padding: 4px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}
.sort-btn:hover { color: var(--text); border-color: var(--primary); }
.sort-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Admin buttons */
.btn-danger {
    padding: 6px 14px;
    background: rgba(255, 52, 52, 0.15);
    border: 1px solid var(--destructive);
    border-radius: 6px;
    color: var(--destructive);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}
.btn-danger:hover { background: var(--destructive); color: #fff; }
.btn-remove {
    padding: 2px 8px;
    background: transparent;
    border: 1px solid var(--destructive);
    border-radius: 4px;
    color: var(--destructive);
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}
.btn-remove:hover { background: var(--destructive); color: #fff; }

.punishment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.btn-expand {
    width: 100%;
    margin-top: 12px;
    padding: 12px;
    background: var(--card-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.btn-expand:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* Responsive */
@media (max-width: 900px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 40px 20px;
    }
    .hero-title { font-size: 44px; }
    .hero-desc { max-width: 100%; }
    .hero-visual { flex: none; width: 100%; max-width: 380px; }

    .profile-layout {
        grid-template-columns: 1fr;
    }
    .player-card { padding: 20px; }

    .navbar { padding: 12px 16px; }
    .profile-page { padding: 16px; }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .server-bar-list {
        flex-wrap: wrap;
        gap: 12px;
    }
}

@media (max-width: 500px) {
    .hero-title { font-size: 36px; }
    .stats-grid { grid-template-columns: 1fr; }
    .link-form { flex-direction: column; }
    .tabs { flex-wrap: wrap; }
}
