* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0e0f;
    --bg-secondary: #0f1618;
    --bg-tertiary: #141b1e;
    --green-primary: #00ff88;
    --green-secondary: #00cc6a;
    --green-dark: #00994d;
    --green-glow: rgba(0, 255, 136, 0.3);
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0a0;
    --border-color: #1a2528;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Server Banner */
.server-banner {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    margin: 40px 0;
    display: flex;
    align-items: center;
    gap: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4),
                0 0 0 1px rgba(0, 255, 136, 0.1) inset;
    animation: slideInDown 0.8s ease-out;
    position: relative;
    overflow: hidden;
}

.server-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(0, 255, 136, 0.1), 
        transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.server-icon-container {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    position: relative;
}

.server-icon {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    border: 2px solid var(--green-primary);
    box-shadow: 0 0 20px var(--green-glow);
    animation: pulse 2s ease-in-out infinite;
    object-fit: cover;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.server-icon-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    border: 2px solid var(--green-primary);
    box-shadow: 0 0 20px var(--green-glow);
    background: linear-gradient(135deg, var(--green-primary), var(--green-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: bold;
    color: var(--bg-primary);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 20px var(--green-glow);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 30px var(--green-glow);
        transform: scale(1.02);
    }
}

.server-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.server-name {
    font-size: 28px;
    font-weight: bold;
    color: var(--green-primary);
    text-shadow: 0 0 10px var(--green-glow);
    animation: fadeIn 1s ease-out;
}

.server-motd {
    font-size: 16px;
    color: var(--text-secondary);
    min-height: 24px;
    animation: fadeIn 1.2s ease-out;
}

.server-stats {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    animation: fadeIn 1.4s ease-out;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--green-primary);
    box-shadow: 0 0 10px var(--green-glow);
    animation: statusPulse 2s ease-in-out infinite;
}

.status-indicator.offline .status-dot {
    background: #ff4444;
    box-shadow: 0 0 10px rgba(255, 68, 68, 0.5);
    animation: none;
}

@keyframes statusPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(0.9);
    }
}

.player-count {
    font-size: 14px;
    color: var(--text-secondary);
    padding: 6px 12px;
    background: rgba(0, 255, 136, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 136, 0.2);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Main Content */
.main-content {
    margin: 60px 0;
}

.content-section {
    text-align: center;
    padding: 40px 20px;
}

.content-section h1 {
    font-size: 42px;
    margin-bottom: 20px;
    color: var(--green-primary);
    text-shadow: 0 0 20px var(--green-glow);
    animation: fadeInUp 1s ease-out;
}

.content-section p {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.6;
    animation: fadeInUp 1.2s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 1s ease-out;
}

/* Join Server Button */
.join-server-button {
    margin-top: 30px;
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--green-primary) 0%, var(--green-secondary) 100%);
    color: var(--bg-primary);
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px var(--green-glow);
    animation: fadeInUp 1.4s ease-out;
}

.join-server-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--green-glow);
    background: linear-gradient(135deg, var(--green-secondary) 0%, var(--green-primary) 100%);
}

.join-server-button:active {
    transform: translateY(0);
}

/* Server Banner Clickable */
.server-banner {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.server-banner:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5),
                0 0 0 1px rgba(0, 255, 136, 0.2) inset;
}

/* Modal Overlay */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 40px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6),
                0 0 0 1px rgba(0, 255, 136, 0.2) inset;
    position: relative;
    animation: slideInUp 0.3s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 32px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
    line-height: 1;
}

.modal-close:hover {
    color: var(--green-primary);
    background: rgba(0, 255, 136, 0.1);
    transform: rotate(90deg);
}

.modal-content h2 {
    color: var(--green-primary);
    font-size: 28px;
    margin-bottom: 24px;
    text-shadow: 0 0 10px var(--green-glow);
}

.modal-server-address {
    margin-bottom: 30px;
}

.modal-server-address label {
    display: block;
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.address-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
}

.address-box code {
    flex: 1;
    color: var(--green-primary);
    font-size: 20px;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 8px var(--green-glow);
}

.copy-button {
    padding: 8px 16px;
    background: var(--green-primary);
    color: var(--bg-primary);
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-button:hover {
    background: var(--green-secondary);
    transform: scale(1.05);
}

.copy-button:active {
    transform: scale(0.95);
}

.copy-button.copied {
    background: var(--green-secondary);
}

.modal-instructions {
    color: var(--text-primary);
}

.modal-instructions h3 {
    color: var(--green-primary);
    font-size: 20px;
    margin-bottom: 16px;
}

.modal-instructions ol {
    margin-left: 20px;
    margin-bottom: 20px;
    line-height: 1.8;
}

.modal-instructions li {
    margin-bottom: 12px;
    color: var(--text-secondary);
}

.modal-instructions li strong {
    color: var(--green-primary);
}

.modal-note {
    padding: 16px;
    background: rgba(0, 255, 136, 0.1);
    border-left: 3px solid var(--green-primary);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 20px;
}

/* Discord Section */
.discord-section {
    margin: 60px 0;
    padding: 40px 20px;
    animation: fadeInUp 1.4s ease-out;
}

.discord-title {
    font-size: 32px;
    margin-bottom: 24px;
    color: var(--green-primary);
    text-shadow: 0 0 20px var(--green-glow);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.discord-icon {
    flex-shrink: 0;
    vertical-align: middle;
    margin-right: 10px;
    display: inline-block;
    margin-top: -2px;
}

.discord-icon-button {
    vertical-align: middle;
    margin-right: 10px;
    filter: brightness(0) invert(1);
    display: inline-block;
    margin-top: -1px;
}


.discord-widget-container {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4),
                0 0 0 1px rgba(0, 255, 136, 0.1) inset;
    position: relative;
    overflow: hidden;
}

.discord-widget-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(0, 255, 136, 0.1), 
        transparent);
    animation: shimmer 3s infinite;
}

.discord-widget-content {
    min-height: 300px;
    border-radius: 12px;
    background: var(--bg-primary);
    padding: 24px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.discord-loading {
    color: var(--text-secondary);
    font-size: 16px;
    animation: pulse 2s ease-in-out infinite;
}

.discord-server-info {
    width: 100%;
    text-align: center;
}

.discord-server-name {
    font-size: 24px;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.discord-server-description {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.discord-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.discord-stat {
    text-align: center;
}

.discord-stat-value {
    font-size: 28px;
    font-weight: bold;
    color: var(--green-primary);
    text-shadow: 0 0 10px var(--green-glow);
    display: block;
}

.discord-stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}

.discord-join-button-container {
    text-align: center;
    margin-top: 20px;
}

.discord-join-button {
    display: inline-block;
    padding: 14px 32px;
    background: linear-gradient(135deg, #5865F2 0%, #4752C4 100%);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(88, 101, 242, 0.4);
    position: relative;
    overflow: hidden;
}

.discord-join-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.2), 
        transparent);
    transition: left 0.5s ease;
}

.discord-join-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(88, 101, 242, 0.6);
    background: linear-gradient(135deg, #4752C4 0%, #5865F2 100%);
}

.discord-join-button:hover::before {
    left: 100%;
}

.discord-join-button:active {
    transform: translateY(0);
}

/* Footer */
.footer {
    background: linear-gradient(180deg, var(--bg-tertiary) 0%, var(--bg-primary) 100%);
    border-top: 2px solid var(--border-color);
    border-radius: 16px 16px 0 0;
    margin-top: 80px;
    padding: 40px 20px 20px;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.4),
                0 0 0 1px rgba(0, 255, 136, 0.1) inset,
                inset 0 2px 20px rgba(0, 255, 136, 0.05);
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent, 
        var(--green-primary), 
        transparent);
    box-shadow: 0 0 10px var(--green-glow);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3 {
    color: var(--green-primary);
    font-size: 20px;
    margin-bottom: 16px;
    text-shadow: 0 0 10px var(--green-glow);
}

.footer-section p {
    color: var(--text-secondary);
    margin-bottom: 8px;
    line-height: 1.6;
}

.footer-section a {
    color: var(--green-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-section a:hover {
    color: var(--green-primary);
    text-shadow: 0 0 8px var(--green-glow);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .server-banner {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .server-icon-container {
        margin: 0 auto;
    }

    .server-name {
        font-size: 24px;
    }

    .content-section h1 {
        font-size: 32px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* Loading Animation */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--green-primary);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
