:root {
    /* Light theme (default) */
    --bg-color: #f7f7f7;
    --text-color: #333;
    --card-bg: #fff;
    --primary-color: #007BFF;
    --shadow: rgba(0, 0, 0, 0.1);
}

/* 🌑 Dark Neon Theme */
body.dark-mode {
    --bg-color: #0a0a0a;
    --text-color: #e0e0e0;
    --card-bg: #141414;
    --primary-color: #00f5ff;
    --shadow: rgba(0, 255, 255, 0.2);
}

/* 🔧 Global Reset */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    background: var(--bg-color);
    color: var(--text-color);
    font-family: Arial, sans-serif;
    margin: 0;
    transition: background 0.8s ease, color 0.8s ease;
    animation: fadeIn 1s ease-in-out;
}

/* 🎞️ Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

/* 🧾 Card Styling */
.card {
    background: var(--card-bg);
    box-shadow: 0 2px 10px var(--shadow);
    border-radius: 10px;
    padding: 20px;
    margin: 20px auto;
    max-width: 700px;
    animation: cardEnter 0.7s ease-out;
    transition: background 0.8s ease, box-shadow 0.8s ease, transform 0.3s ease;
}

/* ✨ Neon text in dark mode */
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode a {
    text-shadow: 0 0 8px var(--primary-color), 0 0 20px var(--primary-color);
}

/* 🔗 Links */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s, text-shadow 0.3s;
}

a:hover {
    text-shadow: 0 0 5px var(--primary-color), 0 0 10px var(--primary-color);
}

/* 🌗 Theme Toggle Button */
.theme-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    cursor: pointer;
    font-size: 20px;
    box-shadow: 0 0 10px var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 1000;
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px var(--primary-color), 0 0 40px var(--primary-color);
}

/* 💫 Smooth transitions */
button, .card, a {
    transition: all 0.3s ease;
}

/* 🌟 Featured Servers */
.featured-servers-container {
    background: #fff7e6;
    border: 2px solid #f1c40f;
    padding: 15px;
    margin-bottom: 30px;
    overflow-x: auto;
    white-space: nowrap;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.scroll-row {
    display: flex;
    flex-direction: row;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
}

.featured-server {
    flex: 0 0 auto;
    width: 300px;
    height: 120px;
    border: 2px solid black;
    padding: 10px;
    background: white;
}

/* 🧱 Server Cards */
.server-grid-scroll {
    max-height: 80vh;
    overflow-y: auto;
    padding-right: 10px;
    margin-bottom: 30px;
}

.server-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    padding: 10px;
}

.server-card {
    background-color: var(--card-bg);
    border: 1px solid var(--shadow);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px var(--shadow);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    animation: cardEnter 0.6s ease-in-out;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.server-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px var(--shadow);
}

.server-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.server-img {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 2px 6px var(--shadow);
    margin-bottom: 12px;
}

.server-title {
    font-size: 1.1rem;
    margin: 0 0 8px 0;
    text-align: center;
}

.server-description {
    font-size: 0.9rem;
    color: var(--text-secondary, #777);
    line-height: 1.4;
    text-align: center;
    overflow-wrap: break-word;
}

/* 📄 Pagination */
.pagination a {
    display: inline-block;
    padding: 6px 10px;
    margin: 2px;
    border-radius: 4px;
    background: var(--card-bg);
    border: 1px solid var(--shadow);
    text-decoration: none;
}

.pagination a:hover {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 0 8px var(--primary-color);
}

/* ➕ Add Server Button */
.add-server-btn {
    background-color: #28a745;
    color: white !important;
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    margin: 0 10px;
    font-weight: bold;
    transition: background-color 0.2s ease;
}

.add-server-btn:hover {
    background-color: #218838;
}

/* 🔽 Dropdown Styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropbtn {
    background-color: var(--primary-color);
    color: white;
    padding: 8px 12px;
    font-size: 16px;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    user-select: none;
}

.dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--card-bg);
    min-width: 180px;
    border-radius: 6px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    z-index: 1000;
    will-change: opacity, transform;
}

.dropdown.show .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-content a {
    display: block;
    padding: 10px 16px;
    color: var(--text-color);
    text-decoration: none;
    border-bottom: 1px solid #ddd;
    transition: background-color 0.3s, color 0.3s;
}

.dropdown-content a:last-child {
    border-bottom: none;
    font-weight: bold;
}

.dropdown-content a:hover {
    background-color: var(--primary-color);
    color: white;
}

/* 🛑 Logout Page */
.logout-card {
    max-width: 400px;
    margin: 50px auto;
    text-align: center;
    background: var(--card-bg);
    padding: 40px 50px;
    border-radius: 10px;
    box-shadow: 0 2px 6px var(--shadow);
    opacity: 1;
    transition: opacity 1s ease, background 1s ease;
    animation: cardEnter 0.7s ease-out;
}

.logout-card h1 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.logout-card p {
    margin: 0;
    color: var(--text-color);
    font-size: 16px;
}

.logout-card p.small {
    margin-top: 10px;
    font-size: 14px;
    color: #777;
}

.logout-card a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
}

.logout-card a:hover {
    text-decoration: underline;
}
