/* === ROOT VARIABLES === */
:root {
    /* RPG Fantasy Color Palette */
    --bg-dark: #0a0e1a;
    --bg-dark-2: #111827;
    --bg-card: #1a1f35;
    --bg-card-hover: #222944;

    --accent-primary: #8b5cf6;
    --accent-secondary: #ec4899;
    --accent-gold: #fbbf24;
    --accent-emerald: #10b981;

    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;

    --border-color: #374151;
    --glow-purple: rgba(139, 92, 246, 0.4);
    --glow-pink: rgba(236, 72, 153, 0.4);

    /* Fonts */
    --font-title: 'Cinzel', serif;
    --font-medieval: 'MedievalSharp', cursive;
    --font-body: 'Inter', sans-serif;

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px var(--glow-purple), 0 0 40px var(--glow-pink);
}

/* === RESET & BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background: linear-gradient(135deg, #0a0e1a 0%, #1a1f35 50%, #0f1419 100%);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* === ANIMATED BACKGROUND === */
.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.3;
}

/* === MAIN CONTAINER === */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

/* === HEADER === */
.header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 3rem 0;
    position: relative;
}

.logo-container {
    position: relative;
    display: inline-block;
}

.logo-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--glow-purple) 0%, transparent 70%);
    animation: pulse 3s ease-in-out infinite;
    z-index: -1;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.1); }
}

.server-title {
    font-family: var(--font-title);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.title-main {
    font-size: 4rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px var(--glow-purple);
    letter-spacing: 2px;
    animation: titleGlow 2s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    from { filter: drop-shadow(0 0 10px var(--glow-purple)); }
    to { filter: drop-shadow(0 0 20px var(--glow-pink)); }
}

.title-sub {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text-secondary);
    letter-spacing: 4px;
    text-transform: uppercase;
}

.server-tagline {
    font-family: 'Uncial Antiqua', cursive;
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: 1px;
    color: var(--accent-gold);
    margin-top: 1rem;
    text-shadow:
        0 0 20px rgba(251, 191, 36, 0.8),
        0 0 40px rgba(251, 191, 36, 0.4),
        0 0 60px rgba(251, 191, 36, 0.2),
        2px 2px 4px rgba(0, 0, 0, 0.5);
    animation: taglineGlow 3s ease-in-out infinite alternate;
}

@keyframes taglineGlow {
    from {
        text-shadow:
            0 0 20px rgba(251, 191, 36, 0.8),
            0 0 40px rgba(251, 191, 36, 0.4),
            0 0 60px rgba(251, 191, 36, 0.2);
    }
    to {
        text-shadow:
            0 0 30px rgba(251, 191, 36, 1),
            0 0 60px rgba(251, 191, 36, 0.6),
            0 0 90px rgba(251, 191, 36, 0.3);
    }
}

/* === CARDS === */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.card:hover::before {
    opacity: 1;
}

.card-title {
    font-family: var(--font-title);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card-title .icon {
    font-size: 2rem;
    filter: drop-shadow(0 0 8px currentColor);
}

/* === STATUS SECTION === */
.status-section {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.status-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-dark-2);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.status-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--text-muted);
    box-shadow: 0 0 10px currentColor;
    animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.status-indicator.online .status-dot {
    background: var(--accent-emerald);
    box-shadow: 0 0 20px var(--accent-emerald);
}

.status-indicator.offline .status-dot {
    background: #ef4444;
    box-shadow: 0 0 20px #ef4444;
}

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

.server-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1rem;
    background: var(--bg-dark-2);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.info-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.players-list {
    padding: 1rem;
    background: var(--bg-dark-2);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    min-height: 60px;
}

.players-list .player-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    margin: 0.25rem 0;
    background: var(--bg-card);
    border-radius: 6px;
}

/* === CONNECTION CARD === */
.connection-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ip-container {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}

.ip-input {
    flex: 1;
    min-width: 0;
    padding: 1rem 1.5rem;
    background: var(--bg-dark-2);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    text-align: center;
    transition: all 0.3s ease;
}

.ip-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--glow-purple);
}

.copy-btn {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    white-space: nowrap;
    flex-shrink: 0;
}

.copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.copy-btn:active {
    transform: translateY(0);
}

.connection-hint {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* === DOWNLOAD MODPACK BUTTON === */
.download-modpack-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    margin-top: 1rem;
    background: linear-gradient(135deg, #10b981, #059669);
    border: 2px solid #10b981;
    border-radius: 12px;
    text-decoration: none;
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    position: relative;
    overflow: hidden;
}

.download-modpack-btn::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;
}

.download-modpack-btn:hover::before {
    left: 100%;
}

.download-modpack-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.5);
    border-color: #34d399;
}

.download-icon {
    font-size: 2.5rem;
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.5));
}

.download-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.download-title {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.download-subtitle {
    font-size: 0.875rem;
    opacity: 0.9;
}

.download-arrow {
    font-size: 1.5rem;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.download-modpack-btn:hover .download-arrow {
    transform: translateX(5px);
}

/* === DESCRIPTION SECTION === */
.description-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

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

.feature-item {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-dark-2);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-primary);
    transform: translateX(8px);
}

.feature-icon {
    font-size: 2.5rem;
    min-width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 12px;
    box-shadow: 0 4px 12px var(--glow-purple);
}

.feature-text h3 {
    font-family: var(--font-title);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.feature-text p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* === MODS SECTION === */
.mods-count {
    margin-left: auto;
    font-size: 1rem;
    font-weight: 400;
    color: var(--accent-gold);
    background: var(--bg-dark-2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

.mods-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.mods-search {
    width: 100%;
    padding: 1rem 1.5rem;
    background: var(--bg-dark-2);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.mods-search:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--glow-purple);
}

.mods-filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    background: var(--bg-dark-2);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    border-color: transparent;
}

.mods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    max-height: 600px;
    overflow-y: auto;
    overflow-x: visible;
    padding-right: 0.5rem;
}

.mods-grid::-webkit-scrollbar {
    width: 8px;
}

.mods-grid::-webkit-scrollbar-track {
    background: var(--bg-dark-2);
    border-radius: 4px;
}

.mods-grid::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 4px;
}

.mod-item {
    padding: 1rem;
    background: var(--bg-dark-2);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.mod-item:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    z-index: 10;
}

.mod-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

.mod-version {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.mod-category {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.25rem 0.75rem;
    background: var(--accent-primary);
    color: white;
    font-size: 0.75rem;
    border-radius: 12px;
}

.mod-description {
    margin-top: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mod-tooltip {
    position: fixed;
    background: var(--bg-card);
    border: 2px solid var(--accent-primary);
    border-radius: 12px;
    padding: 1rem;
    min-width: 300px;
    max-width: 400px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 20px var(--glow-purple);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 9999;
    pointer-events: none;
}

.mod-tooltip.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mod-tooltip::before {
    display: none;
}

.tooltip-title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tooltip-description {
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.tooltip-version {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: 'Courier New', monospace;
}

/* === FOOTER === */
.footer {
    text-align: center;
    padding: 3rem 0 2rem;
    margin-top: 4rem;
    border-top: 1px solid var(--border-color);
}

.footer-content p {
    color: var(--text-secondary);
    margin: 0.5rem 0;
}

.footer-note {
    font-family: var(--font-medieval);
    color: var(--accent-gold);
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .status-section {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .title-main {
        font-size: 2.5rem;
    }

    .title-sub {
        font-size: 1rem;
    }

    .card {
        padding: 1.5rem;
    }

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

    .ip-container {
        flex-direction: column;
    }
}

/* === UTILITY ANIMATIONS === */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}
