* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background 0.3s ease, color 0.3s ease;
}

/* Navigation */
nav {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease, border-color 0.3s ease;
}

body.light-theme nav {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.nav-content {
    display: flex;
    align-items: center;
    gap: 3rem;
    margin-left: auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo img {
    width: 50px;
    height: 50px;
    border-radius: 8px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #fb923c, #ea580c);
    transition: width 0.3s;
}

.nav-links a:hover {
    color: #fb923c;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Content Wrapper */
.content-wrapper {
    max-width: 100%;
    margin: 0;
    padding: 0;
    flex: 1;
}

/* Hero Mini */
.hero-mini {
    position: relative;
    text-align: center;
    margin: 0;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, rgba(251, 146, 60, 0.1) 0%, rgba(234, 88, 12, 0.05) 100%);
    border-radius: 0;
    overflow: hidden;
    width: 100%;
}

.hero-mini::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><rect fill="%231e293b" width="100" height="100"/><g opacity="0.1"><rect fill="%23fb923c" x="0" y="0" width="10" height="10"/><rect fill="%23fb923c" x="20" y="20" width="10" height="10"/><rect fill="%23fb923c" x="40" y="40" width="10" height="10"/><rect fill="%23fb923c" x="60" y="60" width="10" height="10"/><rect fill="%23fb923c" x="80" y="80" width="10" height="10"/></g></svg>');
    background-size: 100px 100px;
    opacity: 0.3;
    z-index: 0;
    pointer-events: none;
}

body.light-theme .hero-mini::before {
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><rect fill="%23f8fafc" width="100" height="100"/><g opacity="0.1"><rect fill="%23fb923c" x="0" y="0" width="10" height="10"/><rect fill="%23fb923c" x="20" y="20" width="10" height="10"/><rect fill="%23fb923c" x="40" y="40" width="10" height="10"/><rect fill="%23fb923c" x="60" y="60" width="10" height="10"/><rect fill="%23fb923c" x="80" y="80" width="10" height="10"/></g></svg>');
}

.page-title {
    position: relative;
    z-index: 1;
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fb923c 0%, #ea580c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
}

.page-subtitle {
    position: relative;
    z-index: 1;
    font-size: 1.2rem;
    color: var(--text-secondary);
}

/* Status Grid */
.status-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 3rem auto 2rem;
    max-width: 1400px;
    padding: 0 2rem;
}

/* Cards */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(251, 146, 60, 0.2);
    transition: all 0.3s;
}

body.light-theme .card {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.card-header {
    margin-bottom: 1.5rem;
}

.card-header h2 {
    font-size: 1.8rem;
    background: linear-gradient(135deg, #fb923c 0%, #ea580c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

/* Connection Info */
.connection-info {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.ip-address {
    background: rgba(251, 146, 60, 0.1);
    border: 1px solid rgba(251, 146, 60, 0.3);
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    color: #fb923c;
    font-weight: 600;
    font-size: 1rem;
}

.copy-btn {
    background: linear-gradient(135deg, #fb923c 0%, #ea580c 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.95rem;
}

.copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(251, 146, 60, 0.4);
}

/* Server Status */
.server-status-wrapper {
    text-align: center;
}

.server-status {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 12px;
    font-weight: bold;
    font-size: 1.3rem;
    margin: 1rem 0;
    transition: all 0.3s;
}

.status-online {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    box-shadow: 0 10px 30px rgba(34, 197, 94, 0.3);
}

.status-offline {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.3);
}

/* Loading */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(251, 146, 60, 0.1);
    border-left-color: #fb923c;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading p {
    color: var(--text-secondary);
}

/* Status Info */
.status-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: rgba(251, 146, 60, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(251, 146, 60, 0.1);
    transition: all 0.3s;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.info-value {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
}

/* Debug Info */
.debug-info {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(251, 146, 60, 0.1);
    border: 1px solid rgba(251, 146, 60, 0.3);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    word-break: break-all;
    transition: all 0.3s;
}

/* Players Stats */
.players-stats {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 1.5rem;
    background: rgba(251, 146, 60, 0.1);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(251, 146, 60, 0.2);
    transition: all 0.3s;
}

.stat-box {
    text-align: center;
    flex: 1;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, #fb923c 0%, #ea580c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.stat-divider {
    width: 2px;
    height: 50px;
    background: rgba(251, 146, 60, 0.3);
}

/* Progress Bar */
.progress-bar {
    height: 12px;
    background: rgba(251, 146, 60, 0.1);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(251, 146, 60, 0.2);
    transition: all 0.3s;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #fb923c 0%, #ea580c 100%);
    border-radius: 6px;
    transition: width 0.5s ease;
    box-shadow: 0 0 10px rgba(251, 146, 60, 0.5);
}

/* Players List */
.players-list-title {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(251, 146, 60, 0.2);
    transition: color 0.3s, border-color 0.3s;
}

.players-list {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 0.5rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.players-list::-webkit-scrollbar {
    width: 8px;
}

.players-list::-webkit-scrollbar-track {
    background: rgba(251, 146, 60, 0.05);
    border-radius: 4px;
}

.players-list::-webkit-scrollbar-thumb {
    background: rgba(251, 146, 60, 0.3);
    border-radius: 4px;
}

.players-list::-webkit-scrollbar-thumb:hover {
    background: rgba(251, 146, 60, 0.5);
}

.player-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(251, 146, 60, 0.05);
    border-radius: 8px;
    transition: all 0.3s;
    border: 1px solid rgba(251, 146, 60, 0.1);
}

.player-item:hover {
    transform: translateY(-2px);
    background: rgba(251, 146, 60, 0.1);
    border-color: rgba(251, 146, 60, 0.3);
}

.player-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fb923c 0%, #ea580c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(251, 146, 60, 0.3);
}

.empty-players {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    padding: 2rem;
    background: rgba(251, 146, 60, 0.05);
    border-radius: 8px;
    border: 1px dashed rgba(251, 146, 60, 0.2);
    grid-column: 1 / -1;
    transition: all 0.3s;
}

/* Update Notice */
.update-notice {
    text-align: center;
    padding: 1rem;
    background: rgba(251, 146, 60, 0.1);
    border: 1px solid rgba(251, 146, 60, 0.3);
    border-radius: 12px;
    color: #fb923c;
    font-size: 0.95rem;
    max-width: 1400px;
    margin: 0 auto 2rem;
    padding-left: 2rem;
    padding-right: 2rem;
    transition: all 0.3s;
}

/* Footer */
footer {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-color);
    padding: 2rem;
    margin-top: auto;
    transition: background 0.3s ease, border-color 0.3s ease;
}

body.light-theme footer {
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-left {
    display: flex;
    align-items: center;
}

.footer-logo {
    width: 60px;
    height: 60px;
    border-radius: 12px;
}

.footer-center {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
    flex: 1;
}

.footer-text {
    color: #22c55e;
    font-size: 0.95rem;
}

.footer-contact {
    color: var(--text-primary);
    font-size: 0.9rem;
    text-decoration: none;
    position: relative;
    width: fit-content;
    transition: all 0.3s;
}

.footer-contact::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #fb923c, #ea580c);
    transition: width 0.3s;
}

.footer-contact:hover {
    color: #fb923c;
}

.footer-contact:hover::after {
    width: 100%;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(251, 146, 60, 0.1);
    border: 1px solid rgba(251, 146, 60, 0.3);
    border-radius: 12px;
    transition: all 0.3s;
    text-decoration: none;
}

.social-links a:hover {
    transform: translateY(-3px);
    background: rgba(251, 146, 60, 0.2);
    border-color: rgba(251, 146, 60, 0.5);
}

.social-icon {
    width: 28px;
    height: 28px;
}

/* Responsive */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 1rem;
    }

    .logo {
        position: static;
    }

    .nav-content {
        width: 100%;
    }

    .nav-links {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .page-title {
        font-size: 2rem;
    }

    .page-subtitle {
        font-size: 1rem;
    }

    .hero-mini {
        padding: 3rem 1.5rem;
    }

    .status-grid {
        grid-template-columns: 1fr;
        padding: 0 1.5rem;
    }

    .update-notice {
        margin-left: 1.5rem;
        margin-right: 1.5rem;
        max-width: calc(100% - 3rem);
    }

    .card {
        padding: 1.5rem;
    }

    .card-header h2 {
        font-size: 1.5rem;
    }

    .connection-info {
        flex-direction: column;
        width: 100%;
    }

    .ip-address {
        width: 100%;
        text-align: center;
    }

    .copy-btn {
        width: 100%;
    }

    .players-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .stat-divider {
        width: 100%;
        height: 2px;
    }

    .players-list {
        grid-template-columns: 1fr;
        max-height: 250px;
    }

    .footer-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
}