/* ============================================
   Uralbergen Minecraft Server - Style Sheet
   Med tema-växling (mörkt/ljust)
   ============================================ */

/* Grundläggande variabler för teman */
:root {
    /* Mörkt tema (standard) */
    --bg-color: #0a0a0a;
    --text-color: #e0e0e0;
    --card-bg: #1a1a1a;
    --card-bg-secondary: #141414;
    --primary: #44dd44;
    --primary-dark: #2a8a2a;
    --primary-light: #66ff66;
    --border: #2a2a2a;
    --border-glow: #44dd44;
    --header-bg: #0d0d0d;
    --footer-bg: #0d0d0d;
    --shadow: rgba(0,0,0,0.5);
}

[data-theme="light"] {
    /* Ljust tema */
    --bg-color: #f5f5f5;
    --text-color: #1a1a1a;
    --card-bg: #ffffff;
    --card-bg-secondary: #f0f0f0;
    --primary: #3a9e3a;
    --primary-dark: #2a7a2a;
    --primary-light: #4caf50;
    --border: #dddddd;
    --border-glow: #3a9e3a;
    --header-bg: #e8e8e8;
    --footer-bg: #e0e0e0;
    --shadow: rgba(0,0,0,0.1);
}

/* Reset och bas */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Courier New', 'Minecraft', monospace;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: all 0.3s ease;
    line-height: 1.6;
    min-height: 100vh;
}

/* Minecraft-inspirerad bakgrund */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 3px,
            rgba(68, 221, 68, 0.03) 3px,
            rgba(68, 221, 68, 0.03) 6px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 3px,
            rgba(68, 221, 68, 0.02) 3px,
            rgba(68, 221, 68, 0.02) 6px
        );
    pointer-events: none;
    z-index: -1;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ============================================
   NAVIGERING
   ============================================ */
.navbar {
    background: var(--header-bg);
    border-bottom: 3px solid var(--primary);
    padding: 15px 0;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
    text-shadow: 2px 2px 4px var(--shadow);
    letter-spacing: 2px;
}

.logo::before {
    content: "⛏️";
    margin-right: 8px;
}

.nav-links {
    display: flex;
    gap: 20px;
    list-style: none;
    flex-wrap: wrap;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    padding: 8px 16px;
    transition: all 0.2s;
    border-radius: 4px;
    font-weight: 500;
}

.nav-links a:hover {
    background: var(--primary);
    color: #ffffff;
    transform: translateY(-2px);
}

/* ============================================
   SERVER-KORT
   ============================================ */
.server-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 25px;
    margin: 20px 0;
    box-shadow: 0 4px 15px var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.server-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--shadow);
    border-color: var(--border-glow);
}

.server-card h1 {
    color: var(--primary);
    margin-bottom: 15px;
    font-size: 2.5rem;
}

.server-card h2 {
    color: var(--primary-light);
    margin-bottom: 15px;
    font-size: 1.5rem;
    border-left: 4px solid var(--primary);
    padding-left: 12px;
}

.server-card h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
}

/* Grid-layout */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

/* ============================================
   STATUS-INDICATORER
   ============================================ */
.status-online {
    color: #44dd44;
    font-weight: bold;
    font-size: 1.2rem;
    display: inline-block;
    animation: pulse 2s infinite;
}

.status-offline {
    color: #ff5555;
    font-weight: bold;
    font-size: 1.2rem;
}

.status-loading {
    color: #ffaa44;
    font-weight: bold;
}

@keyframes pulse {
    0% { opacity: 1; text-shadow: 0 0 0 #44dd44; }
    50% { opacity: 0.8; text-shadow: 0 0 5px #44dd44; }
    100% { opacity: 1; text-shadow: 0 0 0 #44dd44; }
}

/* IP-box */
.ip-box {
    background: var(--card-bg-secondary);
    border-radius: 8px;
    padding: 12px 20px;
    margin: 15px auto;
    display: inline-flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    border: 1px solid var(--primary);
}

.ip-box code {
    font-size: 1.2rem;
    font-family: 'Courier New', monospace;
    background: var(--bg-color);
    padding: 5px 10px;
    border-radius: 4px;
}

/* ============================================
   KNAPPAR
   ============================================ */
.btn, button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-weight: bold;
    font-family: inherit;
    border-radius: 6px;
    transition: all 0.1s ease;
    box-shadow: 0 3px 0 var(--primary-dark);
    font-size: 0.9rem;
}

.btn:active, button:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 var(--primary-dark);
}

.btn:hover, button:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
}

.btn-small {
    padding: 5px 12px;
    font-size: 0.8rem;
}

/* ============================================
   SPELARLISTA
   ============================================ */
.player-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 15px;
}

.player-item {
    background: var(--card-bg-secondary);
    border-radius: 8px;
    padding: 8px 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.player-item:hover {
    border-color: var(--primary);
    transform: scale(1.02);
}

.player-item::before {
    content: "⛏️";
}

/* ============================================
   TEMA-VÄXLINGSKNAPP
   ============================================ */
.theme-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--card-bg);
    border: 2px solid var(--primary);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: all 0.2s;
    box-shadow: 0 2px 10px var(--shadow);
}

.theme-toggle:hover {
    transform: scale(1.1);
    border-color: var(--primary-light);
}

/* ============================================
   FORMULÄR
   ============================================ */
input, textarea, select {
    background: var(--card-bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-color);
    padding: 10px 15px;
    border-radius: 6px;
    font-family: inherit;
    width: 100%;
    margin: 8px 0;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 5px var(--primary);
}

label {
    font-weight: bold;
    margin-top: 10px;
    display: block;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--footer-bg);
    border-top: 1px solid var(--border);
    padding: 20px 0;
    margin-top: 40px;
    text-align: center;
    font-size: 0.85rem;
}

/* ============================================
   RESPONSIV DESIGN
   ============================================ */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .navbar .container {
        flex-direction: column;
        text-align: center;
    }
    
    .nav-links {
        justify-content: center;
    }
    
    .server-card h1 {
        font-size: 1.8rem;
    }
    
    .grid-2 {
        grid-template-columns: 1fr;
    }
    
    .ip-box {
        flex-direction: column;
    }
    
    .theme-toggle {
        width: 40px;
        height: 40px;
        font-size: 18px;
        bottom: 15px;
        right: 15px;
    }
}

@media (max-width: 480px) {
    .server-card {
        padding: 15px;
    }
    
    .nav-links {
        gap: 10px;
    }
    
    .nav-links a {
        padding: 5px 10px;
        font-size: 0.85rem;
    }
}

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

.server-card {
    animation: fadeIn 0.5s ease-out;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--card-bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}
