:root {
    --bg-color: #0f172a;
    --text-color: #f8fafc;
    --accent-color: #22c55e;
    /* Minecraft Green */
    --accent-hover: #16a34a;
    --discord-color: #5865F2;
    --discord-hover: #4752C4;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-main: 'Inter', sans-serif;
    --font-header: 'Outfit', sans-serif;
    /* Modern bold font */
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    /* Fallback background if image fails to load */
    background-image: radial-gradient(circle at top right, #1e293b, #0f172a);
}

/* Skip to content link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--accent-color);
    color: #000;
    padding: 0.5rem 1rem;
    text-decoration: none;
    font-weight: 600;
    z-index: 1000;
    border-radius: 0 0 8px 0;
}

.skip-link:focus {
    top: 0;
}

/* Navigation Bar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1rem 2rem;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.nav-link {
    color: #94a3b8;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--accent-color);
    background: rgba(34, 197, 94, 0.1);
}

.nav-link.active {
    color: var(--accent-color);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 2px;
    background: var(--accent-color);
}

/* Background Image */
.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://images.unsplash.com/photo-1464822759023-fed622ff2c3b?q=80&w=2670&auto=format&fit=crop');
    /* Mountains/Nature */
    background-size: cover;
    background-position: center;
    z-index: -1;
    filter: brightness(0.4) blur(2px);
}

.container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    padding-top: 6rem;
    gap: 3rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3rem 2rem;
    text-align: center;
    width: 100%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero Section */
.hero {
    max-width: 900px;
    padding: 4rem 3rem;
}

.server-title {
    font-family: var(--font-header);
    font-size: 2.5rem;
    line-height: 1.4;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
    color: #fff;
}

.server-description {
    font-size: 1.2rem;
    color: #cbd5e1;
    margin-bottom: 3rem;
    line-height: 1.6;
}

/* Enhanced Server Status Panel */
.status-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.status-metric {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 16px;
    padding: 1rem 1.5rem;
    transition: all 0.3s ease;
}

.status-metric:hover {
    background: rgba(34, 197, 94, 0.15);
    transform: translateY(-2px);
}

.status-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.status-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    text-align: left;
}

.status-label {
    font-size: 0.75rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.status-value {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--accent-color);
}

.pulse {
    animation: pulse-green 0.5s ease-in-out;
}

@keyframes pulse-green {
    0% {
        color: var(--accent-color);
    }

    50% {
        color: #fff;
        text-shadow: 0 0 10px var(--accent-color);
    }

    100% {
        color: var(--accent-color);
    }
}

/* MOTD Container */
.motd-container {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
}

.motd-text {
    color: #cbd5e1;
    font-size: 1rem;
    font-family: 'Courier New', Courier, monospace;
    line-height: 1.5;
    margin: 0;
    white-space: pre-wrap;
    text-align: center;
}

/* Minecraft obfuscated text animation */
.motd-text .minecraft-obfuscated {
    display: inline-block;
    animation: obfuscate 0.1s infinite;
}

@keyframes obfuscate {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
}

@media (min-width: 640px) {
    .action-buttons {
        flex-direction: row;
        justify-content: center;
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 1.1rem;
    border: none;
    cursor: pointer;
}

.btn-discord {
    background-color: var(--discord-color);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(88, 101, 242, 0.39);
}

.btn-discord:hover {
    background-color: var(--discord-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(88, 101, 242, 0.23);
}

.btn-map {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    color: white;
    box-shadow: 0 4px 14px 0 rgba(34, 197, 94, 0.39);
}

.btn-map:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(34, 197, 94, 0.5);
}

/* IP Container */
.ip-container {
    display: inline-flex;
    align-items: center;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
    cursor: pointer;
    transition: border-color 0.2s;
}

.ip-container:hover {
    border-color: var(--accent-color);
}

.ip-label {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-right: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.ip-address {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: white;
    font-size: 1.1rem;
    margin-right: 1rem;
}

.btn-copy {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-copy:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Tooltip */
.tooltip {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%) scale(0.8);
    background: var(--accent-color);
    color: #000;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.tooltip.show {
    opacity: 1;
    transform: translateX(-50%) scale(1);
    top: -50px;
}

.tooltip::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px 5px 0;
    border-style: solid;
    border-color: var(--accent-color) transparent transparent transparent;
}

/* Section Titles */
.section-title {
    font-family: var(--font-header);
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #fff;
    text-shadow: 0 2px 0 rgba(0, 0, 0, 0.3);
}



/* Map Section */
.map-section {
    width: 100%;
    max-width: 1200px;
}

.map-card {
    padding: 3rem 2rem;
}

.map-description {
    color: #cbd5e1;
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

.map-preview-container {
    position: relative;
    width: 100%;
    height: 500px;
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid var(--glass-border);
}

.map-iframe {
    width: 100%;
    height: 100%;
    border: none;
    pointer-events: none;
}

.map-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.95), transparent);
    padding: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}



/* Enhanced Footer */
.footer-enhanced {
    background: rgba(15, 23, 42, 0.9);
    border-top: 1px solid var(--glass-border);
    padding: 3rem 2rem 1.5rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section {
    text-align: center;
}

.footer-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 2rem;
}

.refresh-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.refresh-timer {
    font-size: 0.8rem;
    color: #64748b;
    font-variant-numeric: tabular-nums;
    margin-bottom: 0;
    /* Override previous margin */
}

.btn-refresh {
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-refresh:hover {
    color: var(--accent-color);
    background: rgba(255, 255, 255, 0.05);
}

.btn-refresh:active {
    transform: scale(0.95);
}

.btn-refresh.spinning svg {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.social-icons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.social-link {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--accent-color);
    color: #000;
    transform: translateY(-3px);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-link {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
    font-size: 0.95rem;
}

.footer-link:hover {
    color: var(--accent-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
    color: #64748b;
    font-size: 0.9rem;
}

.icon {
    display: block;
}

/* Responsive Design */
@media (max-width: 768px) {
    .server-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .status-panel {
        grid-template-columns: 1fr;
    }

    .map-preview-container {
        height: 350px;
    }

    .navbar {
        padding: 1rem;
    }

    .nav-container {
        gap: 1rem;
    }

    .nav-link {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }
}

@media (max-width: 480px) {
    .glass-card {
        padding: 2rem 1.5rem;
    }

    .hero {
        padding: 3rem 2rem;
    }

    .hero {
        padding: 3rem 2rem;
    }
}