/* ============================================
   KevkoSMP - Professional Gaming UI
   Senior Frontend Engineer - Complete Redesign
   ============================================ */

@import url('https://fonts.cdnfonts.com/css/minecraft-4');

/* ===== ROOT VARIABLES ===== */
:root {
    /* Colors */
    --color-dark-bg: #1a1f3a;
    --color-dark-alt: #232d52;
    --color-card-bg: rgba(35, 45, 82, 0.7);
    --color-accent-orange: #ff8a00;
    --color-accent-cyan: #00d9ff;
    --color-text-primary: #ffffff;
    --color-text-secondary: #d0d0d0;
    --color-text-muted: #909090;
    --color-status-online: #22c55e;
    --color-status-offline: #ef4444;
    --color-status-unknown: #fbbf24;

    /* Spacing */
    --space-8: 8px;
    --space-12: 12px;
    --space-16: 16px;
    --space-20: 20px;
    --space-24: 24px;
    --space-32: 32px;
    --space-40: 40px;
    --space-48: 48px;

    /* Font Sizes */
    --size-h1: 42px;
    --size-h2: 20px;
    --size-subtitle: 14px;
    --size-body: 16px;
    --size-small: 14px;

    /* Effects */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --glow-cyan: 0 0 30px rgba(0, 217, 255, 0.15);
    --glow-orange: 0 0 30px rgba(255, 138, 0, 0.15);
    --transition: 0.3s ease;
}

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
}

body {
    font-family: 'Minecraft', sans-serif;
    background: linear-gradient(135deg, #2a3557 0%, #364073 100%);
    color: var(--color-text-primary);
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* ===== PAGE WRAPPER ===== */
.page-wrapper {
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: var(--space-32);
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: var(--space-32);
    overflow-y: auto;
    overflow-x: hidden;
}

/* Custom Scrollbar */
.page-wrapper::-webkit-scrollbar {
    width: 8px;
}

.page-wrapper::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.page-wrapper::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--color-accent-cyan), var(--color-accent-orange));
    border-radius: 4px;
}

/* ===== PARTICLES ===== */
.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: linear-gradient(135deg, var(--color-accent-orange), #ffa500);
    border-radius: 50%;
    opacity: 0;
    animation: particleFloat 10s infinite;
    box-shadow: 0 0 8px rgba(255, 138, 0, 0.6);
}

@keyframes particleFloat {
    0% {
        opacity: 0;
        transform: translateY(0) translateX(0) scale(0);
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        opacity: 0;
        transform: translateY(-500px) translateX(var(--x-move)) scale(1.2);
    }
}

/* ===== HERO SECTION ===== */
.hero-section {
    text-align: center;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-16);
}

.hero-logo {
    max-width: 160px;
    max-height: 160px;
    width: auto;
    height: auto;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.7));
    animation: logoFloat 6s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-12px);
    }
}

.hero-title {
    font-size: var(--size-h1);
    font-weight: 700;
    background: linear-gradient(135deg, var(--color-accent-cyan), var(--color-accent-orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
    margin: 0;
}

.hero-subtitle {
    font-size: var(--size-subtitle);
    color: var(--color-text-secondary);
    letter-spacing: 1px;
    margin: 0;
    font-weight: 400;
}

/* ===== STATUS CARD SECTION ===== */
.status-card-section {
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.status-card {
    background: var(--color-card-bg);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 217, 255, 0.2);
    border-radius: 16px;
    padding: var(--space-24);
    box-shadow: var(--shadow-lg), var(--glow-cyan);
    transition: all var(--transition);

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-24);
}

.status-card:hover {
    border-color: rgba(0, 217, 255, 0.4);
    box-shadow: var(--shadow-lg), 0 0 40px rgba(0, 217, 255, 0.25);
    transform: translateY(-4px);
}

.status-top {
    width: 100%;
    display: flex;
    justify-content: center;
}

.status-badge-wrapper {
    display: flex;
    justify-content: center;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-8);
    padding: var(--space-8) var(--space-16);
    border-radius: 8px;
    font-size: var(--size-small);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: badgePulse 0.3s ease;
}

@keyframes badgePulse {
    0% { opacity: 0; transform: scale(0.9); }
    100% { opacity: 1; transform: scale(1); }
}

.status-badge.status-online {
    background: rgba(34, 197, 94, 0.15);
    color: var(--color-status-online);
    border: 1px solid rgba(34, 197, 94, 0.3);
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.2);
}

.status-badge.status-offline {
    background: rgba(239, 68, 68, 0.15);
    color: var(--color-status-offline);
    border: 1px solid rgba(239, 68, 68, 0.3);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.2);
}

.status-badge.status-unknown {
    background: rgba(251, 191, 36, 0.15);
    color: var(--color-status-unknown);
    border: 1px solid rgba(251, 191, 36, 0.3);
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.2);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 8px currentColor;
    animation: dotPulse 2s infinite;
}

@keyframes dotPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

.status-middle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-20);
    flex-wrap: wrap;
}

.server-ip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-8);
}

.ip-label {
    font-size: var(--size-small);
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.ip-address {
    font-size: var(--size-body);
    color: var(--color-accent-cyan);
    font-weight: 700;
    letter-spacing: 1px;
    font-family: 'Courier New', monospace;
}

.btn-copy {
    background: linear-gradient(135deg, var(--color-accent-orange), #ffa500);
    color: white;
    border: none;
    padding: var(--space-12) var(--space-20);
    border-radius: 8px;
    font-size: var(--size-small);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: 0 4px 12px rgba(255, 138, 0, 0.3);
    position: relative;
    overflow: hidden;
    font-family: 'Minecraft', sans-serif;
}

.btn-copy::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-copy:hover {
    background: linear-gradient(135deg, #ffa500, var(--color-accent-orange));
    box-shadow: 0 6px 20px rgba(255, 138, 0, 0.5);
    transform: translateY(-2px);
}

.btn-copy:hover::before {
    width: 300px;
    height: 300px;
}

.btn-copy.success {
    background: linear-gradient(135deg, var(--color-status-online), #16a34a);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.status-bottom {
    width: 100%;
    display: flex;
    justify-content: center;
}

.player-count-small {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-8);
}

.count-label {
    font-size: var(--size-small);
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.count-number {
    font-size: var(--size-body);
    color: var(--color-accent-cyan);
    font-weight: 700;
    letter-spacing: 1px;
}

/* ===== INFO CARDS SECTION ===== */
.info-cards-section {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-24);
    position: relative;
    z-index: 1;
    min-height: 0;
}

.info-card {
    background: var(--color-card-bg);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 217, 255, 0.2);
    border-radius: 12px;
    padding: var(--space-24);
    box-shadow: var(--shadow-lg), var(--glow-cyan);
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.info-card:hover {
    border-color: rgba(0, 217, 255, 0.4);
    box-shadow: var(--shadow-lg), 0 0 40px rgba(0, 217, 255, 0.25);
    transform: translateY(-4px);
}

.card-title {
    font-size: var(--size-h2);
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: var(--space-20);
    padding-bottom: var(--space-16);
    border-bottom: 1px solid rgba(0, 217, 255, 0.2);
}

.card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* ===== TOP PLAYERS CARD ===== */
.players-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-12);
    min-height: 0;
}

.players-list::-webkit-scrollbar {
    width: 6px;
}

.players-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.players-list::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--color-accent-cyan), var(--color-accent-orange));
    border-radius: 3px;
}

.player-item {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(0, 217, 255, 0.15);
    border-radius: 8px;
    padding: var(--space-16);
    display: flex;
    align-items: center;
    gap: var(--space-12);
    transition: all var(--transition);
}

.player-item:hover {
    background: rgba(0, 217, 255, 0.1);
    border-color: rgba(0, 217, 255, 0.3);
    transform: translateX(4px);
}

.player-rank {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, #ffa500, var(--color-accent-orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    min-width: 40px;
    text-align: center;
}

.player-info {
    flex: 1;
    min-width: 0;
}

.player-name {
    font-size: var(--size-body);
    color: var(--color-accent-cyan);
    font-weight: 700;
    margin-bottom: var(--space-4);
    word-break: break-word;
}

.player-level {
    font-size: var(--size-small);
    color: var(--color-text-secondary);
}

.loading-text {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px;
    color: var(--color-text-muted);
    font-size: var(--size-body);
}

/* ===== ONLINE PLAYERS CARD ===== */
.online-players {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-12);
    min-height: 0;
}

.online-players::-webkit-scrollbar {
    width: 6px;
}

.online-players::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.online-players::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--color-accent-cyan), var(--color-accent-orange));
    border-radius: 3px;
}

.online-player-item {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(0, 217, 255, 0.15);
    border-radius: 8px;
    padding: var(--space-12);
    display: flex;
    align-items: center;
    gap: var(--space-12);
    transition: all var(--transition);
}

.online-player-item:hover {
    background: rgba(0, 217, 255, 0.1);
    border-color: rgba(0, 217, 255, 0.3);
    transform: translateX(4px);
}

.player-avatar {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    image-rendering: pixelated;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    flex-shrink: 0;
}

.player-username {
    font-size: var(--size-body);
    color: var(--color-text-primary);
    font-weight: 600;
    word-break: break-word;
}

/* ===== PLAYER COUNT CARD ===== */
.player-count-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.big-count {
    font-size: 64px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--color-accent-cyan), var(--color-accent-orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: var(--space-16);
}

.big-count-label {
    font-size: var(--size-small);
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .info-cards-section {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-20);
    }

    .info-card:nth-child(3) {
        grid-column: 1 / -1;
    }

    :root {
        --size-h1: 36px;
        --size-h2: 18px;
    }
}

@media (max-width: 768px) {
    .page-wrapper {
        padding: var(--space-20);
        gap: var(--space-24);
    }

    .hero-content {
        gap: var(--space-12);
    }

    .hero-logo {
        max-width: 120px;
        max-height: 120px;
    }

    .hero-title {
        font-size: 32px;
    }

    .status-middle {
        flex-direction: column;
        gap: var(--space-16);
    }

    .info-cards-section {
        grid-template-columns: 1fr;
        gap: var(--space-16);
    }

    .info-card {
        padding: var(--space-20);
    }

    .status-card {
        padding: var(--space-20);
    }

    .big-count {
        font-size: 48px;
    }

    :root {
        --size-h1: 28px;
        --size-h2: 16px;
        --size-body: 15px;
    }
}

@media (max-width: 480px) {
    .page-wrapper {
        padding: var(--space-16);
        gap: var(--space-20);
    }

    .hero-logo {
        max-width: 100px;
        max-height: 100px;
    }

    .hero-title {
        font-size: 24px;
    }

    .status-card {
        padding: var(--space-16);
        gap: var(--space-16);
    }

    .info-card {
        padding: var(--space-16);
    }

    .btn-copy {
        width: 100%;
        padding: var(--space-12) var(--space-16);
    }

    .big-count {
        font-size: 42px;
    }

    :root {
        --size-h1: 24px;
        --size-h2: 15px;
        --size-body: 14px;
    }
}
