/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --grass-green: #6EAF3D;
    --dark-green: #4A7C2C;
    --stone-gray: #7F7F7F;
    --dark-gray: #3F3F3F;
    --dirt-brown: #8B5A3C;
    --sky-blue: #87CEEB;
    --night-sky: #0A0E27;
    --gold: #FFD700;
    --white: #FFFFFF;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, var(--night-sky) 0%, #1a1f3a 100%);
    color: var(--white);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Animated starfield background */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, white, transparent),
        radial-gradient(2px 2px at 60px 70px, white, transparent),
        radial-gradient(1px 1px at 50px 50px, white, transparent),
        radial-gradient(1px 1px at 130px 80px, white, transparent),
        radial-gradient(2px 2px at 90px 10px, white, transparent);
    background-size: 200px 200px;
    background-repeat: repeat;
    animation: twinkle 5s ease-in-out infinite;
    opacity: 0.6;
    z-index: 0;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 0.9; }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Header Styles */
header {
    text-align: center;
    padding: 40px 20px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    animation: slideDown 0.8s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.minecraft-block {
    width: 60px;
    height: 60px;
    background: var(--grass-green);
    position: relative;
    box-shadow: 
        0 0 0 3px var(--dark-green),
        0 8px 20px rgba(0, 0, 0, 0.5);
    animation: float 3s ease-in-out infinite;
}

.minecraft-block::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.3) 0%, transparent 100%);
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(5deg); }
}

h1 {
    font-size: 3rem;
    font-weight: 700;
    text-shadow: 
        3px 3px 0 var(--dark-gray),
        6px 6px 20px rgba(0, 0, 0, 0.7);
    letter-spacing: 2px;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 60px 20px;
    animation: fadeIn 1s ease-out 0.3s both;
}

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

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--gold) 0%, var(--white) 50%, var(--gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s ease-in-out infinite;
    background-size: 200% auto;
}

@keyframes shimmer {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 100% center; }
}

.tagline {
    font-size: 1.5rem;
    color: var(--gold);
    font-weight: 300;
    letter-spacing: 3px;
}

/* Server Status Section */
.server-status {
    padding: 40px 20px;
    animation: fadeIn 1s ease-out 0.45s both;
}

.server-status h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 30px;
    color: var(--gold);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.status-container {
    max-width: 800px;
    margin: 0 auto;
}

.status-loading {
    text-align: center;
    padding: 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--gold);
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}

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

.status-content {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 30px;
    transition: all 0.3s ease;
}

.status-content.online {
    border-color: rgba(85, 255, 85, 0.5);
    box-shadow: 0 0 20px rgba(85, 255, 85, 0.2);
}

.status-content.offline {
    border-color: rgba(255, 85, 85, 0.5);
    box-shadow: 0 0 20px rgba(255, 85, 85, 0.2);
}

.status-content.error {
    border-color: rgba(255, 170, 0, 0.5);
    box-shadow: 0 0 20px rgba(255, 170, 0, 0.2);
}

.status-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
}

.status-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    position: relative;
}

.status-dot.online {
    background: #55ff55;
    box-shadow: 0 0 10px #55ff55;
    animation: pulse-online 2s ease-in-out infinite;
}

.status-dot.offline {
    background: #ff5555;
    box-shadow: 0 0 10px #ff5555;
}

@keyframes pulse-online {
    0%, 100% {
        box-shadow: 0 0 10px #55ff55;
    }
    50% {
        box-shadow: 0 0 20px #55ff55, 0 0 30px rgba(85, 255, 85, 0.5);
    }
}

.status-text {
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.status-content.online .status-text {
    color: #55ff55;
}

.status-content.offline .status-text,
.status-content.error .status-text {
    color: #ff5555;
}

.status-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.status-item {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.status-item.active-players-tooltip {
    cursor: help;
    transition: background 0.3s ease;
}

.status-item.active-players-tooltip:hover {
    background: rgba(0, 0, 0, 0.5);
}

.status-label {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
}

.status-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--gold);
}

.active-players {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 10px;
    margin-top: 15px;
}

.active-players h4 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--gold);
}

.player-names {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    word-wrap: break-word;
}

/* Tooltip styles for active players on hover */
.players-tooltip-content {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translate(-50%, -10px);
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid var(--gold);
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 10px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    min-width: 200px;
    max-width: 400px;
    z-index: 1000;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

.players-tooltip-content::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: var(--gold);
}

.active-players-tooltip:hover .players-tooltip-content {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

.players-tooltip-content .player-names {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    word-wrap: break-word;
    margin: 0;
}

.offline-message,
.error-message {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    margin-top: 10px;
}

/* Server Info Cards */
.server-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    padding: 40px 20px;
    animation: fadeIn 1s ease-out 0.6s both;
}

.info-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.info-card:hover {
    transform: translateY(-10px) scale(1.05);
    border-color: var(--gold);
    box-shadow: 0 12px 48px rgba(255, 215, 0, 0.3);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.info-card h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--gold);
}

.server-ip {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--grass-green);
    background: rgba(110, 175, 61, 0.2);
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
}

.copy-btn {
    background: var(--grass-green);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(110, 175, 61, 0.4);
}

.copy-btn:hover {
    background: var(--dark-green);
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(110, 175, 61, 0.6);
}

.copy-btn.copied {
    background: var(--gold);
}

/* Features Section */
.features {
    padding: 60px 20px;
    animation: fadeIn 1s ease-out 0.9s both;
}

.features h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: var(--gold);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
}

.feature:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--grass-green);
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 20px;
}

.feature h4 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--gold);
}

.feature p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
}

/* CTA Section */
.cta {
    text-align: center;
    padding: 80px 20px;
    background: linear-gradient(135deg, rgba(110, 175, 61, 0.2) 0%, rgba(255, 215, 0, 0.2) 100%);
    border-radius: 20px;
    margin: 40px 0;
    animation: fadeIn 1s ease-out 1.2s both;
}

.cta h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--gold);
}

.cta p {
    font-size: 1.3rem;
    margin-bottom: 30px;
}

.server-address {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    background: rgba(0, 0, 0, 0.5);
    padding: 20px 40px;
    border-radius: 50px;
    border: 3px solid var(--grass-green);
    margin-top: 20px;
}

.address-label {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7);
}

.address-text {
    font-size: 2rem;
    font-weight: 700;
    color: var(--grass-green);
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
}

/* Footer */
footer {
    text-align: center;
    padding: 40px 20px;
    border-top: 2px solid rgba(255, 255, 255, 0.1);
    margin-top: 60px;
}

footer p {
    color: rgba(255, 255, 255, 0.6);
    margin: 10px 0;
}

.footer-note {
    font-size: 0.9rem;
    font-style: italic;
}

/* Modpack Section */
.modpack-section {
    padding: 60px 20px;
    animation: fadeIn 1s ease-out 0.6s both;
}

.modpack-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--gold);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.section-description {
    text-align: center;
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.download-card {
    background: rgba(110, 175, 61, 0.2);
    border: 2px solid var(--grass-green);
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    max-width: 600px;
    margin: 0 auto 60px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.download-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 48px rgba(110, 175, 61, 0.4);
}

.download-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.download-card h3 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--gold);
}

.download-card p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 25px;
}

.download-btn {
    display: inline-block;
    background: var(--grass-green);
    color: white;
    text-decoration: none;
    padding: 15px 40px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(110, 175, 61, 0.4);
}

.download-btn:hover {
    background: var(--dark-green);
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(110, 175, 61, 0.6);
}

/* Installation Guide */
.installation-guide {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 40px;
    max-width: 900px;
    margin: 0 auto;
    scroll-margin-top: 20px;
}

.installation-guide h3 {
    font-size: 2rem;
    color: var(--gold);
    margin-bottom: 30px;
    text-align: center;
}

.install-steps {
    list-style: none;
    counter-reset: step-counter;
}

.install-steps li {
    counter-increment: step-counter;
    position: relative;
    padding-left: 60px;
    margin-bottom: 35px;
}

.install-steps li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    background: var(--grass-green);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(110, 175, 61, 0.4);
}

.install-steps strong {
    display: block;
    font-size: 1.3rem;
    color: var(--gold);
    margin-bottom: 10px;
}

.install-steps p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 10px;
    line-height: 1.6;
}

.prism-link,
.java-link {
    display: inline-block;
    background: rgba(110, 175, 61, 0.3);
    color: var(--grass-green);
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 8px;
    border: 2px solid var(--grass-green);
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 5px;
}

.prism-link:hover,
.java-link:hover {
    background: var(--grass-green);
    color: white;
    transform: translateX(5px);
}

.troubleshooting {
    background: rgba(255, 170, 0, 0.1);
    border: 2px solid rgba(255, 170, 0, 0.3);
    border-radius: 10px;
    padding: 25px;
    margin-top: 40px;
}

.troubleshooting h4 {
    font-size: 1.5rem;
    color: #ffaa00;
    margin-bottom: 20px;
}

.issue {
    margin-bottom: 15px;
}

.issue strong {
    display: block;
    color: var(--gold);
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.issue p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 10px;
}

/* Mods Section */
.mods-section {
    padding: 60px 20px;
    animation: fadeIn 1s ease-out 0.8s both;
}

.mods-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--gold);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.mods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.mod-card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 30px;
    transition: all 0.3s ease;
}

.mod-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--gold);
    transform: translateY(-5px);
    box-shadow: 0 12px 48px rgba(255, 215, 0, 0.2);
}

.mod-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    text-align: center;
}

.mod-card h3 {
    font-size: 1.5rem;
    color: var(--gold);
    margin-bottom: 15px;
    text-align: center;
}

.mod-card p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
    text-align: left;
}

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

    .hero h2 {
        font-size: 1.8rem;
    }

    .tagline {
        font-size: 1.2rem;
    }

    .server-status h2 {
        font-size: 1.6rem;
    }

    .status-text {
        font-size: 1.2rem;
    }

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

    .server-info {
        grid-template-columns: 1fr;
    }

    .features h2 {
        font-size: 2rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .mods-grid {
        grid-template-columns: 1fr;
    }

    .modpack-section h2,
    .mods-section h2 {
        font-size: 2rem;
    }

    .install-steps li {
        padding-left: 50px;
    }

    .install-steps li::before {
        width: 35px;
        height: 35px;
        font-size: 1.1rem;
    }

    .cta h2 {
        font-size: 2rem;
    }

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

    .address-text {
        font-size: 1.5rem;
    }

    .minecraft-block {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }

    h1 {
        font-size: 1.5rem;
    }

    .hero h2 {
        font-size: 1.5rem;
    }

    .tagline {
        font-size: 1rem;
    }

    .server-status h2 {
        font-size: 1.4rem;
    }

    .status-text {
        font-size: 1rem;
    }

    .status-value {
        font-size: 1.1rem;
    }

    .download-card {
        padding: 30px 20px;
    }

    .installation-guide {
        padding: 30px 20px;
    }

    .install-steps li {
        padding-left: 45px;
    }

    .install-steps li::before {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }

    .server-ip {
        font-size: 1.3rem;
    }

    .address-text {
        font-size: 1.2rem;
    }
}

/* Performance optimizations */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
