/* Rust Server List - Main Stylesheet */

/* ===== CSS Reset & Base ===== */
*, *::before, *::after {
    box-sizing: border-box;
}

* {
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
}

input, button, textarea, select {
    font: inherit;
}

/* ===== CSS Variables ===== */
:root {
    --color-gray-50: #f9fafb;
    --color-gray-100: #f3f4f6;
    --color-gray-200: #e5e7eb;
    --color-gray-300: #d1d5db;
    --color-gray-400: #9ca3af;
    --color-gray-500: #6b7280;
    --color-gray-600: #4b5563;
    --color-gray-700: #374151;
    --color-gray-750: #2d3748;
    --color-gray-800: #1f2937;
    --color-gray-900: #111827;
    --color-orange-400: #fb923c;
    --color-orange-500: #f97316;
    --color-orange-600: #ea580c;
    --color-orange-700: #c2410c;
    --color-green-400: #4ade80;
    --color-green-500: #22c55e;
    --color-blue-400: #60a5fa;
    --color-blue-500: #3b82f6;
    --color-red-400: #f87171;
    --color-red-500: #ef4444;
    --color-yellow-400: #facc15;
    --color-yellow-500: #eab308;
    --color-purple-400: #c084fc;
    --color-purple-500: #a855f7;
}

/* ===== Utility Classes ===== */

/* Background Colors */
.bg-gray-700 { background-color: var(--color-gray-700); }
.bg-gray-750 { background-color: var(--color-gray-750); }
.bg-gray-800 { background-color: var(--color-gray-800); }
.bg-gray-900 { background-color: var(--color-gray-900); }
.bg-orange-500 { background-color: var(--color-orange-500); }
.bg-orange-600 { background-color: var(--color-orange-600); }
.bg-green-500 { background-color: var(--color-green-500); }
.bg-green-600 { background-color: var(--color-green-500); }
.bg-blue-500 { background-color: var(--color-blue-500); }
.bg-red-500 { background-color: var(--color-red-500); }
.bg-purple-500 { background-color: var(--color-purple-500); }
.bg-purple-600 { background-color: var(--color-purple-500); }
.bg-yellow-500 { background-color: var(--color-yellow-500); }

/* Semi-transparent backgrounds */
.bg-white\/10 { background-color: rgba(255, 255, 255, 0.1); }
.bg-gray-600 { background-color: var(--color-gray-600); }
.bg-gray-700\/50 { background-color: rgba(55, 65, 81, 0.5); }
.bg-orange-500\/20 { background-color: rgba(249, 115, 22, 0.2); }
.bg-orange-500\/80 { background-color: rgba(249, 115, 22, 0.8); }
.bg-green-500\/20 { background-color: rgba(34, 197, 94, 0.2); }
.bg-green-500\/80 { background-color: rgba(34, 197, 94, 0.8); }
.bg-blue-500\/20 { background-color: rgba(59, 130, 246, 0.2); }
.bg-blue-500\/80 { background-color: rgba(59, 130, 246, 0.8); }
.bg-red-500\/20 { background-color: rgba(239, 68, 68, 0.2); }
.bg-yellow-500\/20 { background-color: rgba(234, 179, 8, 0.2); }
.bg-yellow-500\/80 { background-color: rgba(234, 179, 8, 0.8); }
.bg-purple-500\/20 { background-color: rgba(168, 85, 247, 0.2); }
.bg-cyan-500\/20 { background-color: rgba(6, 182, 212, 0.2); }
.bg-gray-900\/80 { background-color: rgba(17, 24, 39, 0.8); }
.bg-black\/50 { background-color: rgba(0, 0, 0, 0.5); }

/* Text Colors */
.text-white { color: #ffffff; }
.text-gray-100 { color: var(--color-gray-100); }
.text-gray-300 { color: var(--color-gray-300); }
.text-gray-400 { color: var(--color-gray-400); }
.text-gray-500 { color: var(--color-gray-500); }
.text-gray-600 { color: var(--color-gray-600); }
.text-orange-100 { color: #ffedd5; }
.text-orange-200 { color: #fed7aa; }
.text-orange-400 { color: var(--color-orange-400); }
.text-orange-500 { color: var(--color-orange-500); }
.text-green-400 { color: var(--color-green-400); }
.text-blue-400 { color: var(--color-blue-400); }
.text-red-400 { color: var(--color-red-400); }
.text-yellow-400 { color: var(--color-yellow-400); }
.text-purple-400 { color: var(--color-purple-400); }
.text-cyan-400 { color: #22d3ee; }

/* Font Sizes */
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-5xl { font-size: 3rem; line-height: 1; }

/* Font Weights */
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }

/* Spacing */
.container { width: 100%; max-width: 1280px; }
.mx-auto { margin-left: auto; margin-right: auto; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.pt-4 { padding-top: 1rem; }
.pt-6 { padding-top: 1.5rem; }
.pb-2 { padding-bottom: 0.5rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-12 { margin-top: 3rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.ml-64 { margin-left: 16rem; }

/* Gaps */
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

/* Flexbox & Grid */
.flex { display: flex; }
.flex-1 { flex: 1 1 0%; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-shrink-0 { flex-shrink: 0; }
.items-center { align-items: center; }
.items-start { align-items: start; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Sizing */
.w-full { width: 100%; }
.w-4 { width: 1rem; }
.w-5 { width: 1.25rem; }
.w-6 { width: 1.5rem; }
.w-8 { width: 2rem; }
.w-12 { width: 3rem; }
.w-14 { width: 3.5rem; }
.w-16 { width: 4rem; }
.w-20 { width: 5rem; }
.w-32 { width: 8rem; }
.w-40 { width: 10rem; }
.w-64 { width: 16rem; }
.h-1 { height: 0.25rem; }
.h-1\.5 { height: 0.375rem; }
.h-2 { height: 0.5rem; }
.h-4 { width: 1rem; height: 1rem; }
.h-5 { height: 1.25rem; }
.h-6 { height: 1.5rem; }
.h-8 { height: 2rem; }
.h-12 { height: 3rem; }
.h-16 { height: 4rem; }
.h-32 { height: 8rem; }
.h-40 { height: 10rem; }
.h-full { height: 100%; }
.min-h-screen { min-height: 100vh; }
.min-w-0 { min-width: 0; }
.max-w-none { max-width: none; }
.max-w-md { max-width: 28rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.aspect-square { aspect-ratio: 1 / 1; }

/* Borders */
.border { border-width: 1px; }
.border-t { border-top-width: 1px; }
.border-b { border-bottom-width: 1px; }
.border-r { border-right-width: 1px; }
.border-gray-600 { border-color: var(--color-gray-600); }
.border-gray-700 { border-color: var(--color-gray-700); }
.border-orange-500 { border-color: var(--color-orange-500); }
.border-green-500\/30 { border-color: rgba(34, 197, 94, 0.3); }
.border-red-500 { border-color: var(--color-red-500); }
.border-red-500\/30 { border-color: rgba(239, 68, 68, 0.3); }
.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }
.rounded-t { border-top-left-radius: 0.25rem; border-top-right-radius: 0.25rem; }

/* Layout */
.block { display: block; }
.inline { display: inline; }
.hidden { display: none; }
.fixed { position: fixed; }
.absolute { position: absolute; }
.relative { position: relative; }
.sticky { position: sticky; }
.inset-0 { inset: 0; }
.inset-4 { inset: 1rem; }
.top-0 { top: 0; }
.top-2 { top: 0.5rem; }
.top-20 { top: 5rem; }
.right-2 { right: 0.5rem; }
.bottom-2 { bottom: 0.5rem; }
.left-2 { left: 0.5rem; }
.left-3 { left: 0.75rem; }
.z-10 { z-index: 10; }
.z-50 { z-index: 50; }
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Text Alignment */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.uppercase { text-transform: uppercase; }
.leading-relaxed { line-height: 1.625; }
.tracking-wider { letter-spacing: 0.05em; }

/* Effects */
.transition { transition: all 150ms ease-in-out; }
.shadow { box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1); }
.ring-2 { box-shadow: 0 0 0 2px; }
.ring-orange-500\/50 { --tw-ring-color: rgba(249, 115, 22, 0.5); box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.5); }

/* Tables */
table { border-collapse: collapse; }
.divide-y > * + * { border-top-width: 1px; }
.divide-gray-700 > * + * { border-color: var(--color-gray-700); }

/* Spacing utility classes */
.space-x-2 > * + * { margin-left: 0.5rem; }
.space-x-3 > * + * { margin-left: 0.75rem; }
.space-x-4 > * + * { margin-left: 1rem; }
.space-x-6 > * + * { margin-left: 1.5rem; }
.space-y-1 > * + * { margin-top: 0.25rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }

/* Form Elements */
input:focus, select:focus, textarea:focus {
    outline: none;
}

.focus\:outline-none:focus { outline: none; }
.focus\:border-orange-500:focus { border-color: var(--color-orange-500); }
.focus\:ring-orange-500:focus { box-shadow: 0 0 0 2px var(--color-orange-500); }
.focus\:ring-green-500:focus { box-shadow: 0 0 0 2px var(--color-green-500); }
.focus\:ring-blue-500:focus { box-shadow: 0 0 0 2px var(--color-blue-500); }
.focus\:ring-purple-500:focus { box-shadow: 0 0 0 2px var(--color-purple-500); }

.placeholder-gray-400::placeholder { color: var(--color-gray-400); }
.placeholder-gray-500::placeholder { color: var(--color-gray-500); }

/* Cursor */
.cursor-pointer { cursor: pointer; }

/* Hover States */
.hover\:text-white:hover { color: #ffffff; }
.hover\:text-orange-400:hover { color: var(--color-orange-400); }
.hover\:text-blue-400:hover { color: var(--color-blue-400); }
.hover\:text-red-400:hover { color: var(--color-red-400); }
.hover\:bg-gray-600:hover { background-color: var(--color-gray-600); }
.hover\:bg-gray-700:hover { background-color: var(--color-gray-700); }
.hover\:bg-gray-700\/50:hover { background-color: rgba(55, 65, 81, 0.5); }
.hover\:bg-orange-700:hover { background-color: var(--color-orange-700); }
.hover\:bg-green-700:hover { background-color: #15803d; }
.hover\:bg-blue-700:hover { background-color: #1d4ed8; }
.hover\:bg-purple-700:hover { background-color: #7e22ce; }
.hover\:underline:hover { text-decoration: underline; }
.hover\:ring-2:hover { box-shadow: 0 0 0 2px; }

/* Groups */
.group:hover .group-hover\:text-orange-400 { color: var(--color-orange-400); }

/* Responsive */
@media (min-width: 768px) {
    .md\:flex { display: flex; }
    .md\:hidden { display: none; }
    .md\:block { display: block; }
    .md\:flex-row { flex-direction: row; }
    .md\:items-center { align-items: center; }
    .md\:items-start { align-items: flex-start; }
    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .md\:col-span-2 { grid-column: span 2 / span 2; }
    .md\:text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
    .md\:text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
    .md\:text-5xl { font-size: 3rem; line-height: 1; }
    .md\:p-8 { padding: 2rem; }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .lg\:col-span-1 { grid-column: span 1 / span 1; }
    .lg\:col-span-2 { grid-column: span 2 / span 2; }
    .lg\:col-span-3 { grid-column: span 3 / span 3; }
}

@media (min-width: 1280px) {
    .xl\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Gradient */
.bg-gradient-to-r {
    background-image: linear-gradient(to right, var(--tw-gradient-stops));
}
.from-orange-600 { --tw-gradient-from: var(--color-orange-600); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(234, 88, 12, 0)); }
.to-red-600 { --tw-gradient-to: #dc2626; }
.from-gray-800 { --tw-gradient-from: var(--color-gray-800); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); }
.to-gray-900 { --tw-gradient-to: var(--color-gray-900); }

/* Prose Styles */
.prose { max-width: 65ch; }
.prose-invert { color: var(--color-gray-300); }
.prose-invert p { margin-bottom: 1rem; }
.prose-invert ul { list-style-type: disc; padding-left: 1.5rem; margin-bottom: 1rem; }
.prose-invert li { margin-bottom: 0.5rem; }

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-gray-800);
}

::-webkit-scrollbar-thumb {
    background: var(--color-gray-600);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-gray-500);
}

/* Pagination Styles */
nav[role="navigation"] {
    display: flex;
    justify-content: center;
}

nav[role="navigation"] > div {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

nav[role="navigation"] a,
nav[role="navigation"] span {
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    transition: all 150ms;
}

nav[role="navigation"] a {
    background-color: var(--color-gray-700);
    color: var(--color-gray-300);
}

nav[role="navigation"] a:hover {
    background-color: var(--color-gray-600);
    color: white;
}

nav[role="navigation"] span[aria-current="page"] {
    background-color: var(--color-orange-600);
    color: white;
}

nav[role="navigation"] span[aria-disabled="true"] {
    background-color: var(--color-gray-800);
    color: var(--color-gray-600);
    cursor: not-allowed;
}

/* Animation for loading states */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Object fit for images */
.object-cover { object-fit: cover; }

/* Print styles */
@media print {
    .no-print { display: none; }
}
