:root {
    --primary: #0f1728;
    --primary-dark: #0a0f1a;
    --primary-light: #1a2744;
    --accent-primary: #6366f1;
    --accent-primary-light: #818cf8;
    --accent-secondary: #FDFFFC;
    --accent-dark: #1e293b;
    --accent-dark-light: #334155;
    --gray-light: #f5f5f5;
    --gray-border: #333;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0a1929 0%, #162039 20%, #1a2a47 40%, #1e3560 60%, #162039 80%, #0a1929 100%);
    background-attachment: fixed;
    background-size: 100% 100%;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    padding-top: 0;
}

@media (min-width: 640px) {
    body {
        padding-top: 0;
    }
}

/* NAVIGATION */
nav.navbar {
    background: linear-gradient(135deg, #0f1e36 0%, #162039 100%);
    border-bottom: 1px solid rgba(113, 128, 185, 0.2);
    border-top: 1px solid rgba(113, 128, 185, 0.2);
    padding: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
    overflow: visible;
    height: 68px;
}

nav.navbar.scrolled {
    background: linear-gradient(135deg, #0f1e36 0%, #162039 100%);
    border-bottom-color: rgba(113, 128, 185, 0.3);
    border-top-color: rgba(113, 128, 185, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
}

.navbar-container {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    justify-items: center;
    gap: 2rem;
    max-width: 1398px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    width: 100%;
    height: 68px;
}

@media (min-width: 640px) {
    .navbar-container {
        padding: 0 2.5rem;
    }
}

/* Logo cell wrapper: keeps navbar height fixed while logo overflows */
.navbar-logo {
    grid-column: 1;
    position: relative;
    height: 68px;
    overflow: visible;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
    white-space: nowrap;
    overflow: visible;
}

.navbar-brand:hover {
    opacity: 0.95;
    transform: translateY(-50%);
}

.navbar-brand img {
    height: 130px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(113, 128, 185, 0.35));
    transition: transform 0.3s ease;
    margin-top: 50px; /* increase top spacing for logo per request */
}

@media (min-width: 640px) {
    .navbar-brand img {
        height: 200px;
    }
}

.navbar-brand:hover img {
    transform: scale(1.03);
}

.navbar-brand span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.nav-links {
    display: none;
    list-style: none;
    gap: 2.5rem;
    align-items: center;
    margin: 0;
    padding: 0;
    grid-column: 2;
}

@media (min-width: 768px) {
    .nav-links {
        display: flex;
        justify-content: center; /* center nav links horizontally */
    }
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    font-weight: 500;
    font-size: 0.875rem;
    letter-spacing: 0.3px;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-primary-light));
    transition: width 0.3s ease;
    border-radius: 1px;
}

.nav-links a:hover {
    color: var(--accent-primary-light);
    transform: none;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a.active {
    color: var(--accent-primary-light);
}

.nav-links a.active::after {
    width: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-primary-light));
}

/* USER MENU */
.user-menu {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    grid-column: 3;
}

.discord-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #5C6EC1;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    padding: 0.55rem 1.2rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(92, 110, 193, 0.3);
    text-decoration: none;
    height: calc(0.875rem * 1.5 + 1.1rem + 2px);
}

.discord-button:hover {
    background: #4a5ba8;
    box-shadow: 0 6px 16px rgba(92, 110, 193, 0.4);
    transform: translateY(-2px);
    color: white;
    text-decoration: none;
}

.discord-button:active {
    transform: translateY(0);
}

.user-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--accent-primary) 0%, #5a6fb5 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 0.55rem 1.2rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.875rem;
    box-shadow: 0 4px 12px rgba(113, 128, 185, 0.25);
    text-decoration: none;
    display: inline-flex;
}

.user-button:hover {
    background: linear-gradient(135deg, #8894cd 0%, #6a7fc5 100%);
    box-shadow: 0 6px 16px rgba(113, 128, 185, 0.35);
    transform: translateY(-2px);
    color: white;
    text-decoration: none;
}

.user-button:active {
    transform: translateY(0);
}

.mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.5rem;
}

@media (min-width: 768px) {
    .mobile-menu-btn {
        display: none;
    }
}

.mobile-menu-btn:hover {
    color: var(--accent-primary-light);
    transform: scale(1.1);
}

.user-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-primary-light));
    color: var(--primary-dark);
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(113, 128, 185, 0.4);
}

.user-name {
    font-size: 0.95rem;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: var(--primary-dark);
    border: 2px solid var(--accent-primary);
    border-radius: 8px;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    z-index: 1001;
    overflow: hidden;
}

.user-button:hover + .user-dropdown,
.user-dropdown:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 1.2rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(113, 128, 185, 0.2);
    font-size: 0.95rem;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background: rgba(113, 128, 185, 0.1);
    padding-left: 1.4rem;
    color: var(--accent-primary-light);
}

.dropdown-item i {
    font-size: 1.1rem;
}

/* MAIN CONTAINER */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Servers section container polish */
.servers-section {
    margin-top: 0.5rem;
}

.servers-section > .container {
    background: linear-gradient(135deg, rgba(18, 26, 48, 0.85), rgba(9, 14, 26, 0.92));
    border: 1px solid #1C2945;
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
    padding: 1.5rem 2rem;
    backdrop-filter: blur(8px);
}

/* HERO SECTION */
.hero-banner {
    position: relative;
    width: 100%;
    margin: 0 0 3rem 0;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border-bottom: 3px solid var(--accent-primary);
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 300%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.03) 25%,
        rgba(113, 128, 185, 0.08) 50%,
        rgba(255, 255, 255, 0.03) 75%,
        transparent 100%
    );
    animation: smoke-scroll 15s linear infinite;
    z-index: 2;
    pointer-events: none;
}

.hero-banner::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 300%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.02) 30%,
        rgba(113, 128, 185, 0.05) 60%,
        transparent 100%
    );
    animation: smoke-scroll 25s linear infinite reverse;
    z-index: 2;
    pointer-events: none;
}

@keyframes smoke-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(33.333%);
    }
}

.hero-banner-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 360px;
    filter: brightness(0.85) contrast(1.1);
    animation: zoomPan 15s ease-in-out infinite;
    transform-origin: center;
}

@keyframes zoomPan {
    0% {
        transform: scale(1) translateX(0) translateY(0);
    }
    50% {
        transform: scale(1.05) translateX(2%) translateY(1%);
    }
    100% {
        transform: scale(1) translateX(0) translateY(0);
    }
}

/* Fade transitions for rotating hero images */
.hero-banner-image.fade-out {
    opacity: 0;
    transition: opacity 0.6s ease;
}

.hero-banner-image.fade-in {
    opacity: 1;
    transition: opacity 0.6s ease;
}

.hero-banner-overlay {
    position: absolute;
    top: 40px;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.4) 50%, rgba(0, 0, 0, 0.3) 100%);
    z-index: 1;
}

.hero-banner-title {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
    color: #ffffff;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8), 0 0 40px rgba(113, 128, 185, 0.6);
    letter-spacing: 3px;
    text-align: center;
}

.hero-banner-subtitle {
    font-size: 1rem;
    color: #e0e0e0;
    margin-bottom: 2rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
    text-align: center;
    max-width: 800px;
    padding: 0 2rem;
}

.hero-banner-cta {
    z-index: 2;
}

.btn-hero {
    font-size: 0.85rem;
    padding: 0.7rem 1.5rem;
    box-shadow: 0 8px 32px rgba(113, 128, 185, 0.6);
    border: 2px solid var(--accent-primary-light);
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-primary-light));
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.btn-hero:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 48px rgba(113, 128, 185, 0.8);
}

/* Legacy hero styles kept for compatibility */
.hero {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(32, 54, 88, 0.2), rgba(113, 128, 185, 0.1));
    border: 1px solid var(--accent-primary);
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(113, 128, 185, 0.1);
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 20px rgba(113, 128, 185, 0.3);
    letter-spacing: 2px;
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* SEARCH & FILTER */
.search-section {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    position: relative;
}

.search-section::after {
    display: none;
}

.search-box, .filter-select, .sort-select {
    background: rgba(99, 102, 241, 0.05);
    border: none;
    padding: 0.9rem 1.1rem;
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    font-weight: 500;
}

.filter-select option,
.sort-select option {
    background-color: #0f1728;
    color: #f1f5f9;
    padding: 0.5rem;
}

.filter-select option:checked,
.sort-select option:checked {
    background: linear-gradient(#6366f1, #6366f1);
    background-color: #6366f1;
    color: #ffffff;
}

.search-box:focus, .filter-select:focus, .sort-select:focus {
    outline: none;
    border: none;
    background: rgba(99, 102, 241, 0.1);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.2), inset 0 0 10px rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

/* BUTTONS */
.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-primary-light));
    color: var(--primary-dark);
    box-shadow: 0 4px 15px rgba(113, 128, 185, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(113, 128, 185, 0.5);
}

.btn-block {
    width: 100%;
    display: block;
    text-align: center;
}

.btn-secondary {
    background: #111E37;
    color: whitesmoke;
    border: 2px solid #111E37;
    border-radius: 6px;
}

.btn-secondary:hover {
    background: #111E37;
    box-shadow: 0 0 15px rgba(4, 10, 36, 0.3);
}

.btn-dark {
    background: rgba(32, 54, 88, 0.5);
    color: var(--text-primary);
    border: 1px solid var(--accent-primary);
}

.btn-dark:hover {
    background: var(--primary);
    box-shadow: 0 0 10px rgba(113, 128, 185, 0.3);
}

/* SORT BUTTONS */
.sort-buttons {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    padding: 0.5rem 0;
}

.sort-btn {
    padding: 0.7rem 1.4rem;
    border: 2px solid transparent;
    background: rgba(32, 54, 88, 0.2);
    color: var(--text-primary);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    font-weight: 500;
    position: relative;
    text-decoration: none;
    display: inline-block;
}

.sort-btn::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 0;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-primary-light));
    border-radius: 2px;
    transition: height 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.sort-btn:hover, .sort-btn.active {
    background: rgba(113, 128, 185, 0.15);
    color: var(--accent-primary-light);
    border-color: var(--accent-primary);
    box-shadow: 0 4px 12px rgba(113, 128, 185, 0.25), inset 0 0 10px rgba(113, 128, 185, 0.1);
    transform: translateY(-2px);
}

.sort-btn:hover::after, .sort-btn.active::after {
    height: 2px;
}

/* SERVER GRID */
.servers-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.85rem;
    margin-bottom: 1.5rem;
}

.server-card {
    position: relative;
    background: radial-gradient(circle at 10% 20%, rgba(139, 92, 246, 0.14), transparent 45%),
                radial-gradient(circle at 85% 0%, rgba(59, 130, 246, 0.1), transparent 40%),
                linear-gradient(135deg, rgba(18, 26, 48, 0.95), rgba(9, 14, 26, 0.96));
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.25s ease, border-color 0.2s ease, filter 0.2s ease;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(6px);
}

.server-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 42px rgba(99, 102, 241, 0.28);
    border-color: rgba(139, 92, 246, 0.65);
    filter: drop-shadow(0 0 12px rgba(99, 102, 241, 0.18));
}

.server-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(139, 92, 246, 0.15), transparent 45%),
        radial-gradient(circle at 80% 0%, rgba(59, 130, 246, 0.12), transparent 40%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

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

.server-card.sponsored {
    border: 2px solid #00eeff;
    box-shadow: 0 0 20px rgba(4, 255, 255, 0.5), 0 8px 40px rgba(74, 144, 226, 0.15);
}

.server-card.sponsored:hover {
    border-color: #00eeff;
    box-shadow: 0 0 30px rgba(4, 255, 255, 0.5), 0 8px 40px rgba(74, 144, 226, 0.15);
}

.server-card-inner {
    display: grid;
    grid-template-columns: 70px 1fr 1fr 150px;
    align-items: stretch;
    gap: 0;
}

.server-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.6rem 0.6rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0));
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.server-avatar {
    width: 48px;
    height: 48px;
    border-radius: 9px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.28);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.25), rgba(59, 130, 246, 0.15));
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.server-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.server-card:hover .server-avatar {
    transform: translateY(-2px) scale(1.02);
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 8px 18px rgba(99, 102, 241, 0.25);
}

.server-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 24px;
    border-radius: 7px;
    font-weight: 700;
    font-size: 0.8rem;
    color: #d6ccff;
    background: rgba(139, 92, 246, 0.14);
    border: 1px solid rgba(139, 92, 246, 0.35);
    box-shadow: 0 3px 10px rgba(139, 92, 246, 0.22);
}

.server-media {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.5rem 0.6rem;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(11, 18, 32, 0.6));
    position: relative;
}

.player-count-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.95), rgba(129, 140, 248, 0.95));
    backdrop-filter: blur(8px);
    color: white;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 10;
    transition: all 0.3s ease;
}

.player-count-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.5);
}

.player-count-badge i {
    font-size: 1rem;
}

.server-banner-link,
.server-avatar-link {
    display: block;
}

.server-banner {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 2.5;
    overflow: hidden;
    background: linear-gradient(135deg, #1e293b, #0b1220);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.server-banner img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease, filter 0.35s ease;
}

.server-card:hover .server-banner img {
    transform: scale(1.03);
    filter: brightness(1.02) saturate(1.05);
}

.sponsored-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #c084fc, #7c3aed);
    color: #0b0f1a;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 8px 20px rgba(192, 132, 252, 0.35);
    z-index: 5;
}

.ip-copy-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    padding: 0.35rem 0.55rem;
    background: rgba(11, 18, 32, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-top: none;
    color: #e5e7eb;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.78rem;
    letter-spacing: 0.1px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.ip-copy-btn:hover {
    background: rgba(20, 30, 50, 0.96);
    border-color: rgba(139, 92, 246, 0.55);
    box-shadow: 0 10px 24px rgba(99, 102, 241, 0.2);
}

.ip-copy-main {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
}

.ip-copy-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.12rem 0.45rem;
    border-radius: 5px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #cbd5f5;
    background: rgba(139, 92, 246, 0.16);
    border: 1px solid rgba(139, 92, 246, 0.4);
    transition: all 0.2s ease;
}

.ip-copy-value {
    color: #dbeafe;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.8rem;
}

.ip-copy-action {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.55px;
    color: #c4d2ff;
    transition: color 0.2s ease;
}

/* Copied feedback state for IP copy button */
.ip-copy-btn.copied .ip-copy-action {
    color: #22c55e;
}

.ip-copy-btn:hover .ip-copy-action,
.ip-copy-btn:hover .ip-copy-label,
.ip-copy-btn:hover .ip-copy-value {
    color: #ffffff;
}

.server-main {
    padding: 0.45rem 0.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.22rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
}

.server-title-line {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
}

.server-name {
    color: #ffffff;
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    text-decoration: none;
    text-shadow: 0 0 7px rgba(23, 172, 255, 0.1);
    transition: color 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.server-card:hover .server-name {
    color: #c4b5fd;
}

.server-desc {
    color: #b6c2d9;
    font-size: 0.82rem;
    line-height: 1.25;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    opacity: 0.9;
}

.divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
}

.server-tags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.22rem;
    padding: 0.24rem 0.5rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.35px;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #dbeafe;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.18s ease;
}

.pill:hover {
    transform: translateY(-1px) scale(1.01);
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 6px 14px rgba(99, 102, 241, 0.18);
}

.pill-tag {
    background: rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.35);
    color: #e0d8ff;
}

.pill-muted {
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.06);
}

.pill-sponsored {
    background: rgba(236, 72, 153, 0.15);
    border-color: rgba(236, 72, 153, 0.4);
    color: #fbcfe8;
    box-shadow: 0 0 10px rgba(236, 72, 153, 0.25);
}

.server-stats-col {
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
    padding: 0.4rem 0.5rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(8, 12, 22, 0.8));
    border-left: 1px solid rgba(255, 255, 255, 0.06);
    min-width: 135px;
    justify-content: center;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    padding: 0.24rem 0.52rem;
    border-radius: 9px;
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.55px;
    color: #a3e635;
    background: rgba(163, 230, 53, 0.15);
    border: 1px solid rgba(163, 230, 53, 0.4);
    text-transform: uppercase;
}

.stat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
    padding: 0.18rem 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}

.stat-row:last-child {
    border-bottom: none;
}

.stat-label {
    color: #94a3b8;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.32px;
}

.stat-value {
    color: #e2e8f0;
    font-size: 12px;
    font-weight: 600;
}

.server-view-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.32rem;
    width: auto;
    padding: 0.35rem 0.6rem; /* thinner, smaller */
    border-radius: 8px;
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    color: #0b0f1a;
    font-weight: 800;
    font-size: 0.78rem; /* slightly smaller text */
    letter-spacing: 0.4px;
    text-transform: uppercase;
    text-decoration: none; /* remove underline */
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 6px 14px rgba(99, 102, 241, 0.24);
    transition: transform 0.18s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.server-view-btn:hover {
    color: #0b0f1a;
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.32);
    filter: brightness(1.03);
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.35);
    color: #e0d8ff;
    font-size: 0.78rem;
    letter-spacing: 0.35px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.tag:hover {
    transform: translateY(-1px);
    border-color: rgba(139, 92, 246, 0.55);
    box-shadow: 0 8px 18px rgba(139, 92, 246, 0.25);
}

@media (max-width: 1100px) {
    .server-card-inner {
        grid-template-columns: 96px 1fr;
    }

    .server-stats-col {
        grid-column: 1 / -1;
        flex-direction: row;
        align-items: center;
        gap: 1rem;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
    }

    .server-stats-col .stat-row {
        flex: 1;
        border-bottom: none;
        padding: 0.25rem 0.5rem;
        border-left: 1px dashed rgba(255, 255, 255, 0.08);
    }

    .server-stats-col .stat-row:first-of-type {
        border-left: none;
    }

    .server-view-btn {
        max-width: 180px;
    }
}

@media (max-width: 720px) {
    .server-card-inner {
        grid-template-columns: 1fr;
    }

    .server-left {
        flex-direction: row;
        justify-content: flex-start;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        padding: 0.9rem 1rem;
    }

    .server-media {
        border-right: none;
    }

    .server-stats-col {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.75rem;
        align-items: center;
    }

    .server-stats-col .stat-row {
        border: none;
        padding: 0.1rem 0;
    }
}

/* PAGINATION */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
    align-items: center;
}

.page-link {
    padding: 0.6rem 1rem;
    border: 1px solid rgba(74, 144, 226, 0.2);
    background: linear-gradient(135deg, rgba(26, 42, 71, 0.6) 0%, rgba(15, 24, 35, 0.8) 100%);
    color: #e8eef7;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.page-link:hover {
    border-color: var(--accent-primary);
    background: linear-gradient(135deg, rgba(26, 42, 71, 0.8) 0%, rgba(15, 24, 35, 0.95) 100%);
    box-shadow: 0 0 15px rgba(74, 144, 226, 0.4);
    transform: translateY(-2px);
}

.page-link.active {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: #ffffff;
    border-color: #4a90e2;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.4);
}

/* FORMS */
form {
    background: rgba(32, 54, 88, 0.2);
    padding: 2rem;
    border-radius: 10px;
    border: 1px solid var(--gray-border);
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--accent-primary);
    font-weight: 600;
    letter-spacing: 0.5px;
}

input[type="text"], input[type="email"], input[type="password"], textarea, select {
    width: 100%;
    padding: 0.8rem;

    background: rgba(32, 54, 88, 0.3);
    color: #e8eef7;
    border-radius: 5px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(32, 54, 88, 0.5);
    box-shadow: 0 0 15px rgba(113, 128, 185, 0.3);
    color: #ffffff;
}

textarea {
    resize: vertical;
    min-height: 120px;
}

.error-message {
    color: #ff6b6b;
    font-size: 0.85rem;
    margin-top: 0.3rem;
}

/* MESSAGES */
.messages {
    max-width: 600px;
    margin: 1rem auto;
}

.alert {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    border-left: 4px solid var(--accent-primary);
}

.alert-success {
    background: rgba(76, 175, 80, 0.1);
    color: #4caf50;
    border-left-color: #4caf50;
}

.alert-error {
    background: rgba(255, 107, 107, 0.1);
    color: #ff6b6b;
    border-left-color: #ff6b6b;
}

/* PARTNER SECTION */
.partner-section {
    background: 
        linear-gradient(135deg, rgba(10, 25, 41, 0.85) 0%, rgba(15, 30, 54, 0.9) 100%),
        url('../img/partner-bg.jpg') center/cover no-repeat;
    border-top: 1px solid rgba(99, 102, 241, 0.3);
    border-bottom: 1px solid rgba(99, 102, 241, 0.3);
    padding: 3rem 2rem;
    margin-top: 4rem;
    position: relative;
    overflow: hidden;
}

.partner-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(99, 102, 241, 0.15), transparent 60%);
    pointer-events: none;
}

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

.partner-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #6366f1, #818cf8);
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.partner-badge i {
    font-size: 1rem;
}

.partner-content {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 3rem;
    align-items: center;
}

@media (max-width: 768px) {
    .partner-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
}

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

.partner-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.2;
}

@media (max-width: 768px) {
    .partner-title {
        font-size: 1.75rem;
    }
}

.partner-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
    max-width: 600px;
}

@media (max-width: 768px) {
    .partner-description {
        font-size: 1rem;
        max-width: 100%;
    }
}

.partner-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: white;
    padding: 0.875rem 1.75rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    width: fit-content;
}

@media (max-width: 768px) {
    .partner-btn {
        margin: 0 auto;
    }
}

.partner-btn:hover {
    background: linear-gradient(135deg, #818cf8, #6366f1);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
    color: white;
}

.partner-btn i {
    transition: transform 0.3s ease;
}

.partner-btn:hover i {
    transform: translateX(4px);
}

.partner-logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .partner-logo {
        order: -1;
    }
}

.partner-logo a {
    display: block;
    transition: transform 0.3s ease;
}

.partner-logo a:hover {
    transform: scale(1.05);
}

.partner-logo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 180px;
    height: 180px;
    background: linear-gradient(135deg, rgba(15, 30, 54, 0.8), rgba(22, 32, 57, 0.8));
    border: 2px solid rgba(99, 102, 241, 0.4);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.partner-logo-placeholder:hover {
    border-color: rgba(99, 102, 241, 0.6);
    box-shadow: 0 12px 32px rgba(99, 102, 241, 0.2);
}

.partner-logo-placeholder i {
    font-size: 3rem;
    color: #6366f1;
}

.partner-logo-placeholder span {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 1px;
}

/* FOOTER */
footer {
    background: var(--primary-dark);
    border-top: 2px solid var(--accent-primary);
    padding: 2rem;
    margin-top: 3rem;
    text-align: center;
    color: var(--text-secondary);
}

footer a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

footer a:hover {
    color: var(--accent-primary-light);
    text-decoration: underline;
}

/* DETAIL PAGE */
.server-detail {
    max-width: 800px;
    margin: 0 auto;
    background: linear-gradient(135deg, rgba(32, 54, 88, 0.3), rgba(42, 74, 124, 0.2));
    border: 1px solid var(--gray-border);
    border-radius: 10px;
    padding: 2rem;
}

.server-detail h1 {
    color: var(--accent-primary);
    margin-bottom: 1rem;
    font-size: 2rem;
}

.detail-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--gray-border);
}

.detail-section:last-child {
    border-bottom: none;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
}

.detail-label {
    color: #6ab0ff;
    font-weight: 700;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
}

.detail-value {
    color: #f0f0f0;
    font-size: 1.05rem;
    line-height: 1.6;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .navbar-container {
        padding: 0 1rem;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    .search-section {
        grid-template-columns: 1fr;
    }
    
    .servers-grid {
        grid-template-columns: 1fr;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .hero-banner {
        margin-bottom: 2rem;
    }
    
    .hero-banner-image {
        max-height: 300px;
    }
    
    .hero-banner-title {
        font-size: 2rem;
    }
    
    .hero-banner-subtitle {
        font-size: 1rem;
        padding: 0 1rem;
    }
    
    .btn-hero {
        font-size: 1.1rem;
        padding: 1rem 2rem;
    }
    
    form {
        padding: 1.5rem;
    }
    
    .sort-buttons {
        gap: 0.5rem;
    }
    
    .sort-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .navbar-brand {
        font-size: 1.1rem;
        gap: 0.5rem;
    }
    
    .navbar-brand img {
        height: 100px;
    }
    
    .nav-links {
        gap: 0.5rem;
        font-size: 0.9rem;
    }
    
    .container {
        padding: 1rem;
    }
    
    .hero h1 {
        font-size: 1.4rem;
    }
    
    .servers-grid {
        gap: 1rem;
    }
    
    .server-card {
        padding: 1rem;
    }
}

:root {
    --primary-color: #162039;
    --secondary-color: #1a2a47;
    --accent-color: #4a90e2;
    --light-color: #e0e0e0;
}

body {
    background-color: #f8f9fa;
    color: #333;
}

/* Navbar */
.navbar {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-size: 1.5rem;
    color: var(--accent-color) !important;
}

.navbar-brand:hover {
    color: #357abd !important;
}

/* Server Cards */
.server-card {
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    border: none;
}

.server-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(74, 144, 226, 0.15) !important;
    border-color: var(--accent-color);
}

.card-header.border-bottom-primary {
    border-bottom: 3px solid var(--accent-color) !important;
}

.card-header.bg-primary.bg-opacity-10 {
    background-color: rgba(74, 144, 226, 0.1) !important;
}

/* Badges */
.badge {
    padding: 0.4rem 0.7rem;
    font-weight: 500;
}

/* Buttons */
.btn-primary {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    transition: all 0.3s;
}

.btn-primary:hover {
    background-color: #357abd;
    border-color: #357abd;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

.btn-outline-primary {
    color: var(--accent-color);
    border-color: var(--accent-color);
}

.btn-outline-primary:hover,
.btn-outline-primary.active {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
}

/* Forms */
.form-control,
.form-select {
    background-color: rgba(99, 102, 241, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.2);
    color: var(--text-primary);
    transition: all 0.3s;
}

.form-control::placeholder {
    color: rgba(241, 245, 249, 0.5);
}

.form-control:focus,
.form-select:focus {
    background-color: rgba(99, 102, 241, 0.08);
    border-color: var(--accent-primary);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.2);
    color: var(--text-primary);
}

.form-label {
    color: var(--text-primary);
    font-weight: 500;
}

.form-text,
.form-text.text-muted {
    color: var(--text-secondary) !important;
}

/* Alerts */
.alert-info {
    background-color: rgba(99, 102, 241, 0.1);
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.alert-info h4,
.alert-info h5 {
    color: var(--accent-primary);
}

.alert-warning {
    background-color: rgba(245, 158, 11, 0.1);
    border-color: #f59e0b;
    color: var(--text-primary);
}

.alert-warning h4,
.alert-warning h5 {
    color: #f59e0b;
}

.alert-warning ol,
.alert-warning li {
    color: var(--text-secondary);
}

/* Text Utilities */
.text-danger {
    color: #ef4444 !important;
}

.text-muted {
    color: var(--text-secondary) !important;
}

/* Footer */
footer {
    border-top: 1px solid #e0e0e0;
    margin-top: 5rem;
    background-color: #f8f9fa;
}

/* Search Bar */
.input-group .form-control {
    border-right: none;
}

.input-group .btn {
    border-left: none;
}

/* Pagination */
.pagination .page-link {
    color: #e8eef7;
    border-color: rgba(74, 144, 226, 0.2);
    background: linear-gradient(135deg, rgba(26, 42, 71, 0.6) 0%, rgba(15, 24, 35, 0.8) 100%);
    border-radius: 12px;
}

.pagination .page-link:hover {
    background: linear-gradient(135deg, rgba(26, 42, 71, 0.8) 0%, rgba(15, 24, 35, 0.95) 100%);
    border-color: var(--accent-color);
    color: #ffffff;
    box-shadow: 0 0 15px rgba(74, 144, 226, 0.4);
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    border-color: #4a90e2;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.4);
}

/* Tags */
.tagify {
    border: 1px solid #ddd !important;
    border-radius: 0.375rem !important;
}

.tagify__input {
    color: #333 !important;
}

.tagify__tag {
    background-color: var(--accent-color) !important;
    color: white !important;
}

.tagify__dropdown__item {
    color: #333 !important;
}

.tagify__dropdown__item--active {
    background-color: rgba(74, 144, 226, 0.1) !important;
}

/* Helper Classes */
.bg-opacity-10 {
    --bs-bg-opacity: 0.1;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .display-4 {
        font-size: 2rem;
    }

    .server-card {
        margin-bottom: 1rem;
    }
}

/* Code Block */
code {
    background-color: #f5f5f5;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    color: #d63384;
}

/* Animation */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: slideUp 0.3s ease-out;
}

/* Navbar Active State */
.nav-link.active {
    color: var(--accent-color) !important;
    font-weight: 500;
}

/* FOOTER */
footer.footer {
    position: relative;
    z-index: 10;
    background: linear-gradient(180deg, #0a1929 0%, #162039 50%, #0f1e36 100%);
    border-top: 3px solid var(--accent-primary);
    margin-top: 4rem;
    padding: 3rem 2rem;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(113, 128, 185, 0.2);
}

.footer__upper {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    text-align: center;
}

.footer__upper__logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer__upper__logo img {
    height: 160px;
    width: auto;
    filter: drop-shadow(0 0 8px var(--accent-primary)) brightness(1.1);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.footer__upper__logo img:hover {
    filter: drop-shadow(0 0 12px var(--accent-primary-light)) brightness(1.2);
    transform: scale(1.05);
}

.footer__upper__links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.footer__link {
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.footer__link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-primary-light));
    transition: width 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 2px;
}

.footer__link:hover {
    color: var(--accent-primary-light);
    transform: translateY(-1px);
}

.footer__link:hover::after {
    width: 100%;
}

.discord-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #5865F2;
}

.discord-link i {
    font-size: 1.1rem;
}

.discord-link:hover {
    color: #4752C4;
}

.footer__divider {
    display: inline-block;
    width: 1px;
    height: 18px;
    background: var(--accent-primary);
    margin: 0 0.5rem;
    opacity: 0.5;
}

.footer__upper__subtext {
    margin-top: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(113, 128, 185, 0.2);
    width: 100%;
}

.footer__upper__subtext p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.6;
    margin: 0;
    font-weight: 500;
}

/* Responsive Footer */
@media (max-width: 768px) {
    footer.footer {
        padding: 2rem 1rem;
        margin-top: 3rem;
    }

    .footer__upper {
        gap: 1.5rem;
    }

    .footer__upper__logo img {
        height: 110px;
    }

    .footer__upper__links {
        font-size: 0.85rem;
        gap: 0.3rem;
    }

    .footer__divider {
        height: 14px;
        margin: 0 0.3rem;
    }

    .footer__upper__subtext p {
        font-size: 0.75rem;
    }
}

/* Blog Content Styling */
.blog-content {
    line-height: 1.9;
    font-size: 1.125rem;
    color: var(--text-primary);
    max-width: 800px;
    margin: 0 auto;
}

.blog-content h1,
.blog-content h2,
.blog-content h3,
.blog-content h4,
.blog-content h5,
.blog-content h6 {
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.3;
}

.blog-content h1 { 
    font-size: 2.25rem;
    margin-top: 3rem;
}
.blog-content h2 { 
    font-size: 2rem;
    margin-top: 2.75rem;
}
.blog-content h3 { 
    font-size: 1.75rem;
}
.blog-content h4 { 
    font-size: 1.5rem;
}
.blog-content h5 { 
    font-size: 1.25rem;
}
.blog-content h6 { 
    font-size: 1.125rem;
}

.blog-content h1:first-child,
.blog-content h2:first-child,
.blog-content h3:first-child {
    margin-top: 0;
}

.blog-content p {
    margin-bottom: 1.75rem;
    line-height: 1.9;
}

.blog-content ul,
.blog-content ol {
    margin-left: 2rem;
    margin-bottom: 1.75rem;
    line-height: 1.9;
}

.blog-content li {
    margin-bottom: 0.75rem;
}

.blog-content a {
    color: var(--accent-primary-light);
    text-decoration: underline;
    transition: color 0.2s ease;
}

.blog-content a:hover {
    color: #a3b5e8;
}

/* Auto-generated internal links - more subtle styling */
.blog-content a.auto-internal-link {
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 3px;
    color: var(--accent-primary-light);
}

.blog-content a.auto-internal-link:hover {
    text-decoration-style: solid;
    color: #a3b5e8;
}

.blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 2.5rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.blog-content blockquote {
    border-left: 4px solid var(--accent-primary);
    padding: 1.5rem 1.5rem 1.5rem 2rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--text-secondary);
    background: rgba(113, 128, 185, 0.05);
    border-radius: 0 8px 8px 0;
    font-size: 1.15rem;
}

.blog-content code {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.95em;
    color: #9fb1e6;
}

.blog-content pre {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 12px;
    overflow-x: auto;
    margin: 2rem 0;
    border: 1px solid rgba(113, 128, 185, 0.2);
}

.blog-content pre code {
    background: none;
    padding: 0;
}

.blog-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    border-radius: 8px;
    overflow: hidden;
}

.blog-content table th,
.blog-content table td {
    border: 1px solid var(--gray-border);
    padding: 0.875rem 1rem;
    text-align: left;
}

.blog-content table th {
    background: rgba(255, 255, 255, 0.1);
    font-weight: 700;
}

.blog-content hr {
    border: none;
    border-top: 2px solid rgba(113, 128, 185, 0.3);
    margin: 3rem 0;
}

/* Strong and emphasis */
.blog-content strong {
    font-weight: 700;
    color: var(--text-primary);
}

.blog-content em {
    font-style: italic;
    color: var(--text-secondary);
}

/* Blog List Page Styles */
.blog-list-page {
    max-width: 100%;
    padding-bottom: 5rem;
}

.blog-list-header {
    text-align: center;
    padding: 2rem 2rem 3rem 2rem;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, rgba(113, 128, 185, 0.1) 0%, transparent 100%);
}

.blog-list-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    text-shadow: 0 2px 15px rgba(113, 128, 185, 0.5);
    letter-spacing: -1px;
}

.blog-list-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.blog-list-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 4rem;
    align-items: start;
}

.blog-container {
    padding-bottom: 3rem;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 0;
}

.blog-post-card {
    background: linear-gradient(135deg, rgba(16, 30, 54, 0.95) 0%, rgba(22, 32, 57, 0.95) 100%);
    border: 1px solid rgba(113, 128, 185, 0.2);
    border-radius: 12px;
    margin-bottom: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.blog-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(113, 128, 185, 0.3);
    border-color: rgba(113, 128, 185, 0.4);
}

.blog-post-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.blog-thumbnail {
    position: relative;
    width: 100%;
    height: 350px;
    overflow: hidden;
    background: linear-gradient(135deg, #1a2a47 0%, #0f1e36 100%);
}

.blog-thumbnail-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-post-card:hover .blog-thumbnail-img {
    transform: scale(1.08);
}

.blog-thumbnail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.7) 100%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.blog-post-card:hover .blog-thumbnail-overlay {
    opacity: 1;
}

.blog-read-more {
    color: var(--accent-primary-light);
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--accent-primary-light);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.blog-post-card:hover .blog-read-more {
    background: var(--accent-primary-light);
    color: var(--primary-dark);
    transform: translateY(-3px);
}

.blog-post-content {
    padding: 1.5rem 2rem 2rem 2rem;
}

.blog-post-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 1rem 0;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.blog-post-card:hover .blog-post-title {
    color: var(--accent-primary-light);
}

.blog-post-excerpt {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 1.5rem 0;
}

.blog-post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.blog-author {
    font-size: 0.9rem;
    color: var(--accent-primary-light);
    font-weight: 500;
}

/* Responsive Blog Styles */
@media (max-width: 1024px) {
    .blog-list-wrapper {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .blog-list-title {
        font-size: 2.5rem;
    }
    
    .blog-list-subtitle {
        font-size: 1rem;
    }
    
    .blog-thumbnail {
        height: 250px;
    }
    
    .blog-post-title {
        font-size: 1.4rem;
    }
    
    .blog-post-content {
        padding: 1.25rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .blog-list-title {
        font-size: 2rem;
        letter-spacing: -0.5px;
    }
    
    .blog-list-subtitle {
        font-size: 0.95rem;
    }
    
    .blog-thumbnail {
        height: 200px;
    }
    
    .blog-post-title {
        font-size: 1.2rem;
    }
}

/* Blog Detail Page Styles */
.blog-detail-page {
    max-width: 100%;
    padding-bottom: 5rem;
}

.blog-detail-header-image {
    max-width: 1200px;
    margin: 0 auto 3rem auto;
    padding: 0 2rem;
    height: auto;
    position: relative;
}

.blog-detail-header-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    max-height: 600px;
}

.blog-detail-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 4rem 2rem;
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 4rem;
    align-items: start;
}

.blog-detail-content {
    background: linear-gradient(180deg, rgba(22, 32, 57, 0.3) 0%, transparent 100%);
    padding: 0;
}

.blog-detail-title-section {
    margin-bottom: 4rem;
    text-align: center;
    padding-bottom: 2rem;
    border-bottom: 2px solid rgba(113, 128, 185, 0.2);
}

.blog-detail-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.5px;
}

.blog-detail-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.blog-views {
    font-size: 0.95rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Blog Sidebar Styles */
.blog-sidebar {
    position: relative;
}

.sidebar-sticky {
    position: sticky;
    top: 100px;
}

.sidebar-section {
    background: linear-gradient(135deg, rgba(16, 30, 54, 0.95) 0%, rgba(22, 32, 57, 0.95) 100%);
    border: 1px solid rgba(113, 128, 185, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.sidebar-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(113, 128, 185, 0.3);
}

.sidebar-posts {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sidebar-post-card {
    display: flex;
    gap: 1rem;
    padding: 0.75rem;
    border-radius: 8px;
    background: rgba(113, 128, 185, 0.05);
    border: 1px solid rgba(113, 128, 185, 0.1);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.sidebar-post-card:hover {
    background: rgba(113, 128, 185, 0.15);
    border-color: rgba(113, 128, 185, 0.3);
    transform: translateX(5px);
}

.sidebar-post-image {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 6px;
}

.sidebar-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-post-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.sidebar-post-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sidebar-post-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.sidebar-post-views {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.sidebar-empty {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 1rem 0;
}

/* Sidebar Stats Section */
.sidebar-stats {
    background: linear-gradient(135deg, rgba(113, 128, 185, 0.1) 0%, rgba(16, 30, 54, 0.8) 100%);
}

.sidebar-stat-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid rgba(113, 128, 185, 0.15);
}

.sidebar-stat-item:last-child {
    margin-bottom: 0;
}

.sidebar-stat-item i {
    font-size: 1.5rem;
    color: var(--accent-primary-light);
}

.stat-number {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* Responsive Blog Detail */
@media (max-width: 1024px) {
    .blog-detail-wrapper {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .blog-sidebar {
        order: 2;
    }
    
    .sidebar-sticky {
        position: static;
    }
}

@media (max-width: 768px) {
    .blog-detail-header-image {
        height: 350px;
    }
    
    .blog-detail-title {
        font-size: 2.25rem;
    }
    
    .blog-detail-wrapper {
        padding: 2.5rem 1.5rem;
    }
    
    .blog-content {
        font-size: 1.0625rem;
    }
    
    .blog-content h1 { font-size: 1.875rem; }
    .blog-content h2 { font-size: 1.625rem; }
    .blog-content h3 { font-size: 1.5rem; }
}

@media (max-width: 480px) {
    .blog-detail-header-image {
        height: 250px;
    }
    
    .blog-detail-title {
        font-size: 1.75rem;
        letter-spacing: -0.25px;
    }
    
    .blog-detail-wrapper {
        padding: 2rem 1.25rem;
    }
    
    .blog-content {
        font-size: 1rem;
    }
    
    .sidebar-post-card {
        flex-direction: column;
    }
    
    .sidebar-post-image {
        width: 100%;
        height: 150px;
    }
    
    .blog-content h1 { font-size: 1.5rem; }
    .blog-content h2 { font-size: 1.375rem; }
    .blog-content h3 { font-size: 1.25rem; }
}

/* AUTH PAGES (LOGIN/REGISTER) */
.auth-page-container {
    margin-top: 50px;
    padding-top: 2rem;
    padding-bottom: 3rem;
}

.auth-card {
    background: radial-gradient(circle at 10% 20%, rgba(139, 92, 246, 0.12), transparent 50%),
                radial-gradient(circle at 90% 80%, rgba(59, 130, 246, 0.08), transparent 40%),
                linear-gradient(135deg, rgba(18, 26, 48, 0.97), rgba(9, 14, 26, 0.98));
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 
                0 0 30px rgba(99, 102, 241, 0.15);
    backdrop-filter: blur(8px);
    animation: slideUp 0.4s ease-out;
}

.auth-card .card-header {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(59, 130, 246, 0.1) 100%);
    border-bottom: 2px solid rgba(99, 102, 241, 0.3);
    padding: 1.75rem 2rem;
}

.auth-card .card-header h3 {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.75rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.auth-card .card-header i {
    color: var(--accent-primary-light);
    font-size: 1.5rem;
}

.auth-card .card-body {
    padding: 2.5rem 2rem;
}

.auth-card .form-label {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.auth-card .form-control,
.auth-card .form-check-input {
    background-color: rgba(99, 102, 241, 0.06);
    border: 1.5px solid rgba(99, 102, 241, 0.25);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.auth-card .form-control::placeholder {
    color: rgba(241, 245, 249, 0.4);
}

.auth-card .form-control:focus {
    background-color: rgba(99, 102, 241, 0.1);
    border-color: var(--accent-primary-light);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15),
                0 0 20px rgba(99, 102, 241, 0.25);
    color: var(--text-primary);
}

.auth-card .form-check {
    padding-left: 2.5rem;
}

.auth-card .form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.15rem;
    cursor: pointer;
}

.auth-card .form-check-input:checked {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
}

.auth-card .form-check-label {
    color: var(--text-primary);
    font-weight: 400;
    cursor: pointer;
    padding-left: 0.5rem;
}

.auth-card .btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-primary-light));
    border: none;
    padding: 0.875rem 1.5rem;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.auth-card .btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-primary-light), var(--accent-primary));
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(99, 102, 241, 0.5);
}

.auth-card .btn-primary i {
    margin-right: 0.5rem;
}

.auth-card hr {
    border-color: rgba(99, 102, 241, 0.2);
    margin: 1.75rem 0;
}

.auth-card .text-center {
    color: var(--text-primary);
}

.auth-card .text-center a {
    color: var(--accent-primary-light);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.auth-card .text-center a:hover {
    color: var(--accent-primary);
    text-decoration: underline;
}

.auth-card .alert {
    border-radius: 8px;
    border: 1px solid rgba(239, 68, 68, 0.3);
    background-color: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.auth-card .invalid-feedback {
    color: #fca5a5;
    font-size: 0.875rem;
    margin-top: 0.375rem;
}

/* Social Login Buttons */
.social-login-section {
    margin-bottom: 1.5rem;
}

.btn-google {
    background: white;
    color: #1f1f1f;
    border: 2px solid rgba(99, 102, 241, 0.2);
    padding: 0.875rem 1.5rem;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-google:hover {
    background: #f8f9fa;
    border-color: var(--accent-primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    color: #1f1f1f;
}

.btn-google .google-icon {
    flex-shrink: 0;
}

.btn-google:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-google .spinner-border {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

.divider-container {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    gap: 1rem;
}

.divider-line {
    flex: 1;
    border: 0;
    border-top: 1px solid rgba(99, 102, 241, 0.2);
    margin: 0;
}

.divider-text {
    color: var(--text-secondary);
    font-size: 0.875rem;
    white-space: nowrap;
    padding: 0 0.5rem;
}

/* Accessibility - Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

@media (max-width: 768px) {
    .auth-page-container {
        margin-top: 30px;
        padding-top: 1rem;
    }
    
    .auth-card .card-header {
        padding: 1.25rem 1.5rem;
    }
    
    .auth-card .card-header h3 {
        font-size: 1.5rem;
    }
    
    .auth-card .card-body {
        padding: 2rem 1.5rem;
    }
}

/* ============================================================================
   COMPREHENSIVE MOBILE FIXES
   ============================================================================ */

/* Hide mobile-only elements on desktop */
@media (min-width: 769px) {
    .mobile-nav-overlay,
    .mobile-nav-menu,
    .mobile-menu-btn {
        display: none !important;
    }
}

/* Mobile Base Adjustments */
@media (max-width: 768px) {
    /* Prevent horizontal scroll */
    body {
        overflow-x: hidden;
        padding-top: 60px;
    }
    
    /* Navbar mobile fixes */
    nav.navbar {
        height: 60px;
        position: fixed;
    }
    
    .navbar-container {
        padding: 0 1rem;
        gap: 0.5rem;
        height: 60px;
        grid-template-columns: 1fr auto auto;
    }
    
    .navbar-logo {
        height: 60px;
        grid-column: 1;
        justify-self: start;
        overflow: visible;
    }
    
    .navbar-brand {
        position: absolute;
        transform: translateY(-50%);
        top: 50%;
        left: 0;
    }
    
    .navbar-brand img {
        height: 90px;
        margin-top: 25px;
        filter: drop-shadow(0 2px 4px rgba(113, 128, 185, 0.25));
    }
    
    /* Hide desktop nav links on mobile */
    .nav-links {
        display: none !important;
    }
    
    /* User menu mobile adjustments */
    .user-menu {
        gap: 0.5rem;
        grid-column: 3;
        justify-self: end;
    }
    
    .discord-button {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
        height: 36px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    .discord-button i {
        font-size: 1.125rem;
    }
    
    .user-button {
        padding: 0.5rem 0.875rem;
        font-size: 0.8125rem;
        height: 36px;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
    }
    
    .user-button span {
        display: inline;
        max-width: 80px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .user-avatar {
        width: 32px;
        height: 32px;
        font-size: 0.875rem;
    }
    
    /* Mobile menu button */
    .mobile-menu-btn {
        display: flex;
        grid-column: 2;
        order: -1;
    }
    
    /* Mobile menu overlay */
    .mobile-nav-overlay {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.8);
        z-index: 998;
        display: none;
        backdrop-filter: blur(4px);
    }
    
    .mobile-nav-overlay.active {
        display: block;
    }
    
    .mobile-nav-menu {
        position: fixed;
        top: 60px;
        left: -100%;
        width: 280px;
        height: calc(100vh - 60px);
        background: linear-gradient(135deg, #0f1e36 0%, #162039 100%);
        border-right: 1px solid rgba(113, 128, 185, 0.3);
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.4);
        z-index: 999;
        transition: left 0.3s ease;
        overflow-y: auto;
        padding: 1.5rem 0;
    }
    
    .mobile-nav-menu.active {
        left: 0;
    }
    
    .mobile-nav-menu a {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 1rem 1.5rem;
        color: var(--text-primary);
        text-decoration: none;
        font-size: 1rem;
        font-weight: 500;
        border-left: 3px solid transparent;
        transition: all 0.2s ease;
    }
    
    .mobile-nav-menu a:hover,
    .mobile-nav-menu a.active {
        background: rgba(99, 102, 241, 0.1);
        border-left-color: var(--accent-primary);
        color: var(--accent-primary-light);
    }
    
    .mobile-nav-menu a i {
        font-size: 1.25rem;
        width: 24px;
        text-align: center;
    }
    
    /* User dropdown mobile fix */
    .user-dropdown {
        position: fixed;
        top: 60px;
        right: 0;
        transform: translateY(0);
    }
    
    .user-button.active + .user-dropdown,
    .user-dropdown.active {
        opacity: 1;
        visibility: visible;
    }
    
    /* Container responsive padding */
    .container {
        padding: 1rem;
        max-width: 100%;
    }
    
    /* Hero section mobile */
    .hero-banner {
        margin: 0 0 1.5rem 0;
    }
    
    .hero-content {
        padding: 2rem 1.5rem;
    }
    
    .hero-title {
        font-size: 1.75rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    /* Search section mobile */
    .search-section {
        padding: 1.5rem 1rem;
    }
    
    .search-bar {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .search-bar input {
        width: 100%;
        font-size: 0.9375rem;
    }
    
    .search-bar button {
        width: 100%;
        justify-content: center;
    }
    
    /* Filter controls mobile */
    .filter-controls {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-group select {
        width: 100%;
        font-size: 0.9375rem;
    }
    
    /* Server cards mobile */
    .server-card {
        margin-bottom: 1rem;
    }
    
    .server-card-inner {
        padding: 0.75rem;
    }
    
    .server-icon img {
        width: 64px;
        height: 64px;
    }
    
    .server-title {
        font-size: 1.125rem;
    }
    
    .server-description {
        font-size: 0.875rem;
        -webkit-line-clamp: 2;
    }
    
    .server-tags {
        flex-wrap: wrap;
        gap: 0.375rem;
    }
    
    .server-tag {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
    
    .vote-button {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    /* Stats row mobile */
    .stat-row {
        font-size: 0.8125rem;
    }
    
    .stat-value {
        font-size: 1rem;
    }
    
    /* Buttons mobile */
    .btn-primary,
    .btn-secondary {
        padding: 0.625rem 1.25rem;
        font-size: 0.9375rem;
    }
    
    /* Pagination mobile */
    .pagination {
        gap: 0.25rem;
        flex-wrap: wrap;
    }
    
    .page-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
    
    /* Footer mobile */
    footer {
        padding: 2rem 1rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .footer-section h3 {
        font-size: 1.125rem;
    }
    
    .footer-links {
        justify-content: center;
    }
    
    /* Partner section mobile */
    .partner-section {
        padding: 2rem 1rem;
    }
    
    .partner-logo img {
        max-width: 200px;
        max-height: 120px;
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    body {
        padding-top: 56px;
    }
    
    nav.navbar {
        height: 56px;
    }
    
    .navbar-container {
        height: 56px;
        padding: 0 0.75rem;
        gap: 0.375rem;
    }
    
    .navbar-logo {
        height: 56px;
        overflow: visible;
    }
    
    .navbar-brand img {
        height: 75px;
        margin-top: 20px;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: 0.9375rem;
    }
    
    .server-title {
        font-size: 1rem;
    }
    
    .discord-button {
        padding: 0.5rem 0.625rem;
        font-size: 0.75rem;
    }
    
    .discord-button i {
        font-size: 1rem;
    }
    
    .user-button {
        padding: 0.5rem 0.625rem;
    }
    
    .user-avatar {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
    
    .mobile-menu-btn {
        font-size: 1.25rem;
    }
}

/* Landscape phone fix */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-content {
        padding: 1.5rem 1rem;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
}

/* Tablet adjustments (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 1.5rem;
    }
    
    .navbar-container {
        padding: 0 1.5rem;
    }
    
    .server-card-inner {
        grid-template-columns: 80px 1fr;
    }
}
