/* JordanCraft - Wrath of the Lich King Theme */
/* =========================================== */

/* CSS Variables */
:root {
    /* Dark theme colors */
    --bg-primary: #0a0a12;
    --bg-secondary: #12121c;
    --bg-tertiary: #1a1a2e;
    --bg-card: #16162a;
    --bg-hover: #1f1f3a;

    /* Accent colors */
    --accent-ice: #4fc3dc;
    --accent-frost: #7fdbff;
    --accent-blue: #3b82f6;
    --accent-gold: #c9a227;
    --accent-purple: #a855f7;

    /* Faction colors */
    --alliance-blue: #0057b8;
    --alliance-gold: #ffd700;
    --horde-red: #8b0000;
    --horde-black: #1a1a1a;

    /* Text colors */
    --text-primary: #f0f0f0;
    --text-secondary: #a0a8b8;
    --text-muted: #6b7280;

    /* Status colors */
    --success: #22c55e;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;

    /* Item quality colors */
    --quality-poor: #9d9d9d;
    --quality-common: #ffffff;
    --quality-uncommon: #1eff00;
    --quality-rare: #0070dd;
    --quality-epic: #a335ee;
    --quality-legendary: #ff8000;
    --quality-artifact: #e6cc80;

    /* Class colors */
    --class-warrior: #C79C6E;
    --class-paladin: #F58CBA;
    --class-hunter: #ABD473;
    --class-rogue: #FFF569;
    --class-priest: #FFFFFF;
    --class-dk: #C41F3B;
    --class-shaman: #0070DE;
    --class-mage: #69CCF0;
    --class-warlock: #9482C9;
    --class-druid: #FF7D0A;

    /* Borders */
    --border-color: #2d2d4a;
    --border-glow: rgba(79, 195, 220, 0.3);

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(79, 195, 220, 0.2);

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;

    /* Border radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 300ms ease;
    --transition-slow: 500ms ease;

    /* Font families */
    --font-primary: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Cinzel', 'Times New Roman', serif;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    /* WotLK atmospheric background */
    background-image:
        radial-gradient(ellipse at top, rgba(79, 195, 220, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at bottom, rgba(59, 130, 246, 0.05) 0%, transparent 50%),
        linear-gradient(180deg, var(--bg-primary) 0%, #0d0d1a 100%);
    background-attachment: fixed;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: var(--spacing-md);
}

a {
    color: var(--accent-ice);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-frost);
}

/* Layout */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    padding: var(--spacing-2xl) 0;
}

/* =========================================== */
/* Header & Navigation */
/* =========================================== */

.header {
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    background: linear-gradient(90deg, var(--bg-tertiary) 0%, var(--bg-secondary) 50%, var(--bg-tertiary) 100%);
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--border-color);
}

.header-top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.server-status {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    font-size: 0.875rem;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.status-dot.online {
    background: var(--success);
    box-shadow: 0 0 10px var(--success);
}

.status-dot.offline {
    background: var(--error);
    box-shadow: 0 0 10px var(--error);
}

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

.player-count {
    color: var(--text-secondary);
}

.player-count span {
    color: var(--accent-ice);
    font-weight: 600;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.header-main {
    padding: var(--spacing-md) 0;
}

.header-main .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    transition: transform var(--transition-fast), filter var(--transition-fast);
}

.logo:hover {
    transform: scale(1.02);
    filter: drop-shadow(0 0 15px rgba(79, 195, 220, 0.5));
}

.logo-image {
    height: 55px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(79, 195, 220, 0.3));
}

.logo-icon {
    width: 50px;
    height: 50px;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-frost) 0%, var(--accent-ice) 50%, var(--accent-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(79, 195, 220, 0.3);
}

.nav-main {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.nav-link {
    padding: var(--spacing-sm) var(--spacing-md);
    color: var(--text-secondary);
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    position: relative;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.nav-link.active {
    color: var(--accent-ice);
    background: rgba(79, 195, 220, 0.1);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 2px;
    background: var(--accent-ice);
    border-radius: var(--radius-full);
}

/* Mobile menu */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* =========================================== */
/* Hero Section */
/* =========================================== */

.hero {
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background:
        linear-gradient(180deg, transparent 0%, var(--bg-primary) 100%),
        linear-gradient(0deg, rgba(10, 10, 18, 0.7) 0%, rgba(10, 10, 18, 0.3) 100%),
        url('../images/hero-bg.jpg') center/cover no-repeat;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, transparent 0%, var(--bg-primary) 70%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: var(--spacing-2xl);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    text-shadow: 0 0 40px rgba(79, 195, 220, 0.5);
}

.hero-title span {
    background: linear-gradient(135deg, var(--accent-frost) 0%, var(--accent-ice) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xl);
}

.hero-cta {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
}

.realmlist-box {
    margin-top: var(--spacing-xl);
    padding: var(--spacing-md) var(--spacing-lg);
    background: rgba(26, 26, 46, 0.8);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    display: inline-block;
}

.realmlist-box label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--spacing-xs);
}

.realmlist-box code {
    font-family: 'Consolas', monospace;
    color: var(--accent-ice);
    font-size: 1rem;
}

/* =========================================== */
/* Buttons */
/* =========================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-lg);
    font-family: var(--font-primary);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-ice) 0%, var(--accent-blue) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(79, 195, 220, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 195, 220, 0.4);
    color: white;
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--accent-ice);
    color: var(--accent-ice);
}

.btn-gold {
    background: linear-gradient(135deg, var(--accent-gold) 0%, #d4a520 100%);
    color: var(--bg-primary);
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(201, 162, 39, 0.4);
    color: var(--bg-primary);
}

.btn-sm {
    padding: var(--spacing-xs) var(--spacing-md);
    font-size: 0.75rem;
}

.btn-lg {
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: 1rem;
}

.btn-icon {
    padding: var(--spacing-sm);
    border-radius: var(--radius-md);
}

/* =========================================== */
/* Cards */
/* =========================================== */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-normal);
}

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

.card-header {
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-tertiary);
}

.card-title {
    font-size: 1.125rem;
    margin: 0;
}

.card-body {
    padding: var(--spacing-lg);
}

.card-footer {
    padding: var(--spacing-md) var(--spacing-lg);
    border-top: 1px solid var(--border-color);
    background: var(--bg-tertiary);
}

/* Stats Card */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    text-align: center;
    transition: all var(--transition-normal);
}

.stat-card:hover {
    border-color: var(--accent-ice);
    box-shadow: var(--shadow-glow);
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: var(--spacing-sm);
    color: var(--accent-ice);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-heading);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* =========================================== */
/* Forms */
/* =========================================== */

.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-sm);
    font-weight: 500;
    color: var(--text-secondary);
}

.form-input {
    width: 100%;
    padding: var(--spacing-md);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-ice);
    box-shadow: 0 0 0 3px rgba(79, 195, 220, 0.1);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-hint {
    margin-top: var(--spacing-xs);
    font-size: 0.875rem;
    color: var(--text-muted);
}

.form-error {
    color: var(--error);
}

select.form-input {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 40px;
}

/* =========================================== */
/* Tables */
/* =========================================== */

.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: var(--bg-tertiary);
}

th {
    padding: var(--spacing-md);
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-color);
}

td {
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
}

tbody tr {
    transition: background var(--transition-fast);
}

tbody tr:hover {
    background: var(--bg-hover);
}

tbody tr:last-child td {
    border-bottom: none;
}

/* =========================================== */
/* Alerts / Flash Messages */
/* =========================================== */

.alert {
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-lg);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid var(--success);
    color: var(--success);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--error);
    color: var(--error);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid var(--warning);
    color: var(--warning);
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid var(--info);
    color: var(--info);
}

/* =========================================== */
/* Faction Tags */
/* =========================================== */

.faction-tag {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.faction-alliance {
    background: rgba(0, 87, 184, 0.2);
    color: var(--alliance-blue);
    border: 1px solid var(--alliance-blue);
}

.faction-horde {
    background: rgba(139, 0, 0, 0.2);
    color: var(--horde-red);
    border: 1px solid var(--horde-red);
}

/* =========================================== */
/* Online Status */
/* =========================================== */

.online-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: 0.75rem;
}

.online-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 6px var(--success);
}

.offline-badge::before {
    background: var(--text-muted);
    box-shadow: none;
}

/* =========================================== */
/* News Section */
/* =========================================== */

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: var(--spacing-lg);
}

.news-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-normal);
}

.news-card:hover {
    border-color: var(--accent-ice);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.news-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--bg-tertiary);
}

.news-content {
    padding: var(--spacing-lg);
}

.news-category {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-sm);
    background: rgba(79, 195, 220, 0.1);
    color: var(--accent-ice);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: var(--spacing-sm);
}

.news-title {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-sm);
}

.news-title a {
    color: var(--text-primary);
}

.news-title a:hover {
    color: var(--accent-ice);
}

.news-excerpt {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: var(--spacing-md);
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* =========================================== */
/* Footer */
/* =========================================== */

.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: var(--spacing-2xl) 0 var(--spacing-lg);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-2xl);
    margin-bottom: var(--spacing-2xl);
}

.footer-section h4 {
    font-size: 1rem;
    margin-bottom: var(--spacing-md);
    color: var(--accent-ice);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--spacing-sm);
}

.footer-links a {
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--accent-ice);
}

.footer-bottom {
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.footer-disclaimer {
    font-size: 0.75rem;
    color: var(--text-muted);
    max-width: 600px;
}

/* =========================================== */
/* Utilities */
/* =========================================== */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-ice { color: var(--accent-ice); }
.text-gold { color: var(--accent-gold); }
.text-success { color: var(--success); }
.text-error { color: var(--error); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }
.mt-4 { margin-top: var(--spacing-xl); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }
.mb-4 { margin-bottom: var(--spacing-xl); }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-1 { gap: var(--spacing-sm); }
.gap-2 { gap: var(--spacing-md); }
.gap-3 { gap: var(--spacing-lg); }

.hidden { display: none; }

/* =========================================== */
/* Responsive */
/* =========================================== */

@media (max-width: 1024px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header-main .container {
        flex-wrap: wrap;
    }

    .logo-image {
        height: 40px;
        max-width: 150px;
    }

    .nav-main {
        display: none;
        width: 100%;
        flex-direction: column;
        padding: var(--spacing-md) 0;
    }

    .nav-main.active {
        display: flex;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .hero {
        min-height: 400px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

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

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

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

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* =========================================== */
/* Animations */
/* =========================================== */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px var(--accent-ice), 0 0 10px var(--accent-ice);
    }
    50% {
        box-shadow: 0 0 10px var(--accent-ice), 0 0 20px var(--accent-ice), 0 0 30px var(--accent-ice);
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease;
}

.animate-slide-up {
    animation: slideUp 0.5s ease;
}

/* Snowfall effect (optional) */
.snowfall {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.snowflake {
    position: absolute;
    top: -10px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1rem;
    animation: fall linear infinite;
}

@keyframes fall {
    to {
        transform: translateY(100vh) rotate(360deg);
    }
}
