/* ================================================================
   WARFALLEN - RISE THROUGH CONQUEST
   Dark Fantasy Medieval Strategy MMO
   ================================================================ */

/* ================================================================
   FONT IMPORTS
   ================================================================ */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700;900&family=Cinzel+Decorative:wght@700;900&family=Roboto:wght@300;400;500;700&family=Roboto+Mono:wght@400;700&display=swap');

/* ================================================================
   CSS VARIABLES - DESIGN SYSTEM
   ================================================================ */
:root {
    /* Colors - Dark Foundation */
    --color-black: #0a0a0a;
    --color-charcoal: #1a1a1a;
    --color-dark: #2b2b2b;
    --color-rich-black: #1c1c1c;

    /* Colors - Blood Crimson */
    --color-blood: #8b0000;
    --color-crimson: #dc143c;
    --color-deep-crimson: #590d22;
    --color-ruby: #800f2f;

    /* Colors - Ancient Gold */
    --color-gold: #d4af37;
    --color-antique-gold: #c9a227;
    --color-brass: #b08d57;
    --color-bronze: #8b7355;

    /* Colors - Steel & Stone */
    --color-stone: #4a4a4a;
    --color-light-stone: #6b6b6b;
    --color-steel: #3d5a80;
    --color-dark-steel: #293241;

    /* Colors - War-Torn Rust */
    --color-rust: #ee6c4d;
    --color-deep-rust: #c1502e;

    /* Text Colors */
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0a0;
    --text-tertiary: #6b6b6b;
    --text-gold: #d4af37;
    --text-white: #ffffff;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;

    /* Border Radius */
    --radius-sm: 2px;
    --radius-md: 4px;
    --radius-lg: 8px;
    --radius-xl: 12px;
    --radius-2xl: 16px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.8), 0 1px 2px rgba(0, 0, 0, 0.6);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.8), 0 2px 4px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(212, 175, 55, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.9), 0 4px 6px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(212, 175, 55, 0.15);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.95), 0 10px 10px rgba(0, 0, 0, 0.8), inset 0 2px 0 rgba(212, 175, 55, 0.2);

    /* Glows */
    --glow-gold: 0 0 10px rgba(212, 175, 55, 0.5), 0 0 20px rgba(212, 175, 55, 0.3);
    --glow-red: 0 0 10px rgba(220, 20, 60, 0.5), 0 0 20px rgba(220, 20, 60, 0.3);

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ================================================================
   RESET AND BASE STYLES
   ================================================================ */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.dashboard-body, .dashboard-html {
    width: 100%;
    min-height: 100vh;
    font-family: 'Roboto', sans-serif;
    background: var(--color-black) url('images/Dashboard_Background.png') no-repeat center center fixed;
    background-size: cover;
    color: var(--text-primary);
    position: relative;
}

/* Dark vignette overlay for immersion */
.dashboard-body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.6) 100%);
    pointer-events: none;
    z-index: 0;
}

/* Subtle noise texture */
.dashboard-body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><filter id="noise"><feTurbulence baseFrequency="0.9"/></filter><rect width="100" height="100" filter="url(%23noise)" opacity="0.05"/></svg>');
    opacity: 0.3;
    pointer-events: none;
    z-index: 0;
}

/* ================================================================
   MAIN DASHBOARD CONTAINER
   ================================================================ */
.dashboard-container {
    max-width: 1706px;
    margin: 20px auto;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.95) 0%, rgba(10, 10, 10, 0.98) 100%);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-xl), var(--glow-gold);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 175, 55, 0.2);
    position: relative;
    z-index: 1;
}

/* Ornate corner decorations */
.dashboard-container::before,
.dashboard-container::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    border: 2px solid rgba(212, 175, 55, 0.4);
}

.dashboard-container::before {
    top: -2px;
    left: -2px;
    border-right: none;
    border-bottom: none;
    border-top-left-radius: var(--radius-lg);
}

.dashboard-container::after {
    bottom: -2px;
    right: -2px;
    border-left: none;
    border-top: none;
    border-bottom-right-radius: var(--radius-lg);
}

/* ================================================================
   HEADER STYLES
   ================================================================ */
.dashboard-header {
    background: linear-gradient(135deg, rgba(220, 20, 60, 0.3) 0%, rgba(139, 0, 0, 0.4) 100%),
                linear-gradient(135deg, var(--color-charcoal) 0%, var(--color-black) 100%);
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg), var(--glow-red);
    margin-bottom: var(--space-lg);
}

.dashboard-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(212, 175, 55, 0.5) 50%,
        transparent 100%);
}

.dashboard-header h1,
.dashboard-header .game-title {
    font-family: 'Cinzel Decorative', serif;
    font-size: 3rem;
    font-weight: 900;
    background: linear-gradient(135deg, #d4af37 0%, #c9a227 50%, #b08d57 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(212, 175, 55, 0.5);
    letter-spacing: 3px;
    margin-bottom: var(--space-sm);
}

.dashboard-header .tagline {
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-top: var(--space-sm);
}

/* ================================================================
   NAVIGATION STYLES
   ================================================================ */
.dashboard-navigation {
    background: linear-gradient(135deg, var(--color-charcoal) 0%, var(--color-black) 100%);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-lg);
    margin: var(--space-lg) 0;
    box-shadow: var(--shadow-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.dashboard-navigation .nav-left {
    display: flex;
    gap: var(--space-sm);
    flex: 1;
    justify-content: center;
}

.dashboard-navigation .nav-right {
    display: flex;
    gap: var(--space-sm);
}

.dashboard-navigation a {
    font-family: 'Cinzel', serif;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    border: 1px solid transparent;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.dashboard-navigation a:hover {
    color: var(--color-gold);
    background: rgba(212, 175, 55, 0.1);
    border-color: rgba(212, 175, 55, 0.3);
    transform: translateY(-2px);
}

.dashboard-navigation a.active {
    color: var(--color-black);
    background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-brass) 100%);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-sm), var(--glow-gold);
}

/* Admin Panel Button */
.dashboard-navigation a[href*="admin"] {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    font-weight: 700;
    box-shadow: 0 0 15px rgba(220, 38, 38, 0.4);
    animation: pulseAdmin 2s infinite;
}

.dashboard-navigation a[href*="admin"]:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #dc2626 100%);
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.6);
}

@keyframes pulseAdmin {
    0%, 100% {
        box-shadow: 0 0 15px rgba(220, 38, 38, 0.4);
    }
    50% {
        box-shadow: 0 0 25px rgba(220, 38, 38, 0.6);
    }
}

/* ================================================================
   CARD STYLES
   ================================================================ */
.card {
    background: linear-gradient(135deg, var(--color-dark) 0%, var(--color-rich-black) 100%);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
    transition: all var(--transition-base);
    box-shadow: var(--shadow-md);
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Stone texture overlay */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        repeating-linear-gradient(45deg, transparent, transparent 2px, rgba(255,255,255,0.01) 2px, rgba(255,255,255,0.01) 4px),
        repeating-linear-gradient(-45deg, transparent, transparent 2px, rgba(0,0,0,0.02) 2px, rgba(0,0,0,0.02) 4px);
    border-radius: var(--radius-lg);
    pointer-events: none;
}

.card:hover {
    border-color: rgba(212, 175, 55, 0.4);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

/* Ornate corners on cards */
.card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 20px;
    height: 20px;
    border-top: 2px solid rgba(212, 175, 55, 0.3);
    border-right: 2px solid rgba(212, 175, 55, 0.3);
    border-top-right-radius: var(--radius-lg);
}

.card-header {
    font-family: 'Cinzel', serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-gold);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid rgba(212, 175, 55, 0.3);
    position: relative;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
    letter-spacing: 1px;
}

.card-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--color-gold) 0%, transparent 100%);
}

.card-list {
    list-style: none;
    padding-left: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-md);
}

.card-list li {
    padding: 0;
    border: none;
    color: var(--text-primary);
    font-size: 1rem;
}

.card-list li a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
    padding: var(--space-md);
    background: rgba(10, 10, 10, 0.5);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    text-decoration: none;
    color: var(--text-primary);
    text-align: center;
    font-weight: 500;
}

.card-list li a:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--color-gold);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* ================================================================
   BUTTON STYLES
   ================================================================ */
.btn {
    font-family: 'Cinzel', serif;
    font-weight: 600;
    font-size: 1rem;
    padding: 12px 32px;
    background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-brass) 100%);
    color: var(--color-black);
    text-decoration: none;
    display: inline-block;
    border-radius: var(--radius-md);
    margin-top: var(--space-sm);
    transition: all var(--transition-base);
    border: 2px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: var(--shadow-md), var(--glow-gold);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.btn:hover {
    background: linear-gradient(135deg, var(--color-antique-gold) 0%, var(--color-gold) 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--glow-gold);
}

.btn:active {
    transform: translateY(0);
}

/* Button variants */
.btn-secondary {
    background: linear-gradient(135deg, var(--color-steel) 0%, var(--color-dark-steel) 100%);
    color: var(--text-primary);
    box-shadow: var(--shadow-md);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, var(--color-dark-steel) 0%, var(--color-steel) 100%);
}

.btn-danger {
    background: linear-gradient(135deg, var(--color-crimson) 0%, var(--color-blood) 100%);
    color: var(--text-white);
    box-shadow: var(--shadow-md), var(--glow-red);
}

.btn-danger:hover {
    background: linear-gradient(135deg, var(--color-blood) 0%, var(--color-deep-crimson) 100%);
    box-shadow: var(--shadow-lg), var(--glow-red);
}

.btn-success {
    background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-brass) 100%);
}

/* ================================================================
   RESOURCE DISPLAY
   ================================================================ */
.resource-buildings-card {
    position: relative;
}

.resources-list {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-md);
    padding: var(--space-md);
    background: linear-gradient(135deg, rgba(10, 10, 10, 0.6) 0%, rgba(26, 26, 26, 0.8) 100%);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.resource-item {
    display: flex;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    background: rgba(10, 10, 10, 0.7);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    color: var(--text-primary);
}

.resource-item:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: rgba(212, 175, 55, 0.4);
    transform: scale(1.05);
}

.resource-icon {
    height: 28px;
    width: 28px;
    margin-right: var(--space-sm);
    filter: drop-shadow(0 0 4px rgba(212, 175, 55, 0.5));
}

.resource-item span,
.resource-item {
    font-family: 'Roboto Mono', monospace;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--color-gold) !important;
}

.resource-capacity {
    color: var(--text-tertiary);
    font-size: 0.85rem;
    font-family: 'Roboto Mono', monospace;
    margin-left: var(--space-xs);
}

.resource-item.storage-warning {
    background: rgba(238, 108, 77, 0.15);
    border-color: var(--color-rust);
    animation: pulseWarning 2s infinite;
}

.resource-item.storage-full {
    background: rgba(220, 20, 60, 0.15);
    border-color: var(--color-crimson);
    animation: pulseDanger 2s infinite;
}

@keyframes pulseWarning {
    0%, 100% {
        box-shadow: 0 0 5px rgba(238, 108, 77, 0.3);
    }
    50% {
        box-shadow: 0 0 15px rgba(238, 108, 77, 0.6);
    }
}

@keyframes pulseDanger {
    0%, 100% {
        box-shadow: 0 0 5px rgba(220, 20, 60, 0.3);
    }
    50% {
        box-shadow: 0 0 15px rgba(220, 20, 60, 0.6);
    }
}

/* ================================================================
   VILLAGE SELECTOR
   ================================================================ */
.village-selector-form select {
    font-family: 'Roboto', sans-serif;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(212, 175, 55, 0.3);
    background: var(--color-black);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-base);
}

.village-selector-form select option {
    background: var(--color-black);
    color: var(--text-primary);
    padding: 8px;
}

.village-selector-form select:hover,
.village-selector-form select:focus {
    border-color: var(--color-gold);
    outline: none;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

/* Global select/dropdown styling */
select {
    background: var(--color-black) !important;
    color: var(--text-primary) !important;
}

select option {
    background: var(--color-black) !important;
    color: var(--text-primary) !important;
    padding: 8px !important;
}

/* ================================================================
   TOOLTIP STYLES
   ================================================================ */
.tooltip {
    position: absolute;
    background: linear-gradient(135deg, var(--color-dark) 0%, var(--color-rich-black) 100%);
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    box-shadow: var(--shadow-xl);
    z-index: 1000;
    max-width: 250px;
    box-sizing: border-box;
    text-align: center;
    font-family: 'Roboto', sans-serif;
}

.tooltip-header {
    margin-bottom: var(--space-sm);
}

.tooltip-icon {
    display: block;
    margin: 0 auto var(--space-sm);
    width: 60px;
    height: 60px;
    filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.5));
}

.tooltip-title {
    font-family: 'Cinzel', serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-gold);
    margin-bottom: var(--space-xs);
}

.tooltip-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    padding: var(--space-sm);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    margin-top: var(--space-sm);
}

.tooltip-detail {
    margin-top: var(--space-xs);
    display: block;
    color: var(--text-primary);
}

.tooltip-detail strong {
    font-weight: 700;
    color: var(--color-gold);
    margin-right: var(--space-xs);
}

.tooltip-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, rgba(212, 175, 55, 0.5) 50%, transparent 100%);
    margin: var(--space-sm) 0;
}

/* ================================================================
   FARM/BUILDING SPECIFIC STYLES
   ================================================================ */
.farm-container {
    text-align: center;
    padding: var(--space-xl);
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.95) 0%, rgba(10, 10, 10, 0.98) 100%);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    margin: var(--space-xl) auto;
    max-width: 900px;
}

.farm-graphic {
    display: block;
    margin: 0 auto var(--space-lg);
    max-width: 30%;
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.9));
}

.farm-header {
    font-family: 'Cinzel', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-gold);
    margin: var(--space-md) 0;
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
}

.farm-details {
    text-align: center;
    background: linear-gradient(135deg, rgba(43, 43, 43, 0.8) 0%, rgba(28, 28, 28, 0.9) 100%);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin-top: var(--space-lg);
    box-shadow: var(--shadow-md);
}

.farm-button {
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--color-brass) 0%, var(--color-bronze) 100%);
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-white);
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-md);
}

.farm-button:hover {
    background: linear-gradient(135deg, var(--color-bronze) 0%, var(--color-brass) 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.farm-body, .farm-html {
    width: 100%;
    min-height: 100vh;
    font-family: 'Roboto', sans-serif;
    background: var(--color-black) url('images/Farm_Background.png') no-repeat center center fixed;
    background-size: cover;
    color: var(--text-primary);
}

.back-to-dashboard {
    margin: var(--space-lg);
    text-align: left;
}

/* ================================================================
   ERROR PAGE STYLES
   ================================================================ */
.error-container {
    text-align: center;
    padding: var(--space-3xl);
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.95) 0%, rgba(10, 10, 10, 0.98) 100%);
    border: 2px solid rgba(220, 20, 60, 0.5);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl), var(--glow-red);
    margin: 100px auto;
    max-width: 700px;
}

.error-container h1 {
    font-family: 'Cinzel', serif;
    color: var(--color-crimson);
    font-size: 3rem;
    margin-bottom: var(--space-lg);
    text-shadow: 0 0 20px rgba(220, 20, 60, 0.5);
}

.error-container p {
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
    font-size: 1.1rem;
}

/* ================================================================
   MODAL STYLES
   ================================================================ */
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: auto;
    max-width: 600px;
    height: auto;
    overflow: auto;
}

.modal-content {
    background: linear-gradient(135deg, var(--color-dark) 0%, var(--color-rich-black) 100%);
    border: 2px solid rgba(212, 175, 55, 0.4);
    margin: 0;
    padding: var(--space-xl);
    width: 100%;
    max-width: 550px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl), var(--glow-gold);
    text-align: center;
    position: relative;
}

.close {
    color: var(--text-tertiary);
    float: right;
    font-size: 32px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.close:hover,
.close:focus {
    color: var(--color-crimson);
    transform: scale(1.2);
}

#modal-text {
    display: inline-block;
    max-width: 90%;
    color: var(--text-primary);
    font-size: 1.1rem;
}

/* ================================================================
   CANVAS & VILLAGE CONTAINER
   ================================================================ */
.canvas {
    border: 2px solid rgba(212, 175, 55, 0.3);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-sm);
    width: 1755px;
    height: 1024px;
    max-width: 1755px;
    max-height: 1024px;
}

#villageContainer {
    position: relative;
    width: 1755px;
    height: 1024px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-md);
}

/* ================================================================
   MAP STYLES
   ================================================================ */
.map-body, .map-html {
    background: var(--color-black) url('images/map/background.png') no-repeat center center fixed;
    background-size: cover;
}

#map-container {
    width: 300px;
    height: 300px;
    overflow: hidden;
    margin: var(--space-lg) auto;
    position: relative;
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
}

#mapCanvas {
    border: 1px solid rgba(212, 175, 55, 0.2);
    position: absolute;
}

/* Custom scroll controls */
.scroll-up, .scroll-down {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background: var(--color-gold);
    cursor: pointer;
    z-index: 10;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.scroll-up {
    top: var(--space-sm);
}

.scroll-down {
    bottom: var(--space-sm);
}

.scroll-up:hover, .scroll-down:hover {
    background: var(--color-antique-gold);
    transform: translateY(-50%) scale(1.1);
}

/* ================================================================
   VILLAGE INFO
   ================================================================ */
.village-info {
    padding: var(--space-lg);
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.95) 0%, rgba(10, 10, 10, 0.98) 100%);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
    box-shadow: var(--shadow-md);
}

/* ================================================================
   NOTIFICATION STYLES
   ================================================================ */
.notification {
    padding: var(--space-md) var(--space-lg);
    margin: var(--space-lg) 0;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 500;
    box-shadow: var(--shadow-md);
    animation: slideIn 0.3s ease-out;
    border-left: 4px solid;
}

.notification.success {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(212, 175, 55, 0.1));
    border-left-color: var(--color-gold);
    color: var(--color-gold);
}

.notification.error {
    background: linear-gradient(135deg, rgba(220, 20, 60, 0.2), rgba(220, 20, 60, 0.1));
    border-left-color: var(--color-crimson);
    color: var(--color-crimson);
}

.notification.warning {
    background: linear-gradient(135deg, rgba(238, 108, 77, 0.2), rgba(238, 108, 77, 0.1));
    border-left-color: var(--color-rust);
    color: var(--color-rust);
}

.notification.info {
    background: linear-gradient(135deg, rgba(61, 90, 128, 0.2), rgba(61, 90, 128, 0.1));
    border-left-color: var(--color-steel);
    color: var(--color-steel);
}

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

/* ================================================================
   INCOMING ATTACK WARNINGS
   ================================================================ */
.incoming-attack-alert {
    animation: shake 0.5s infinite, pulseRed 2s infinite;
}

.alert-content {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    justify-content: space-between;
}

.alert-icon {
    font-size: 1.5em;
    font-weight: bold;
}

.alert-text {
    flex: 1;
    font-size: 1.1em;
}

.countdown-inline {
    font-family: 'Roboto Mono', monospace;
    color: var(--text-white);
    font-weight: bold;
    font-size: 1.3em;
}

.btn-view-attacks {
    background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-brass) 100%);
    color: var(--color-black);
    padding: 10px 20px;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-family: 'Cinzel', serif;
    font-weight: 600;
    transition: all var(--transition-base);
}

.btn-view-attacks:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg), var(--glow-gold);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-3px); }
    20%, 40%, 60%, 80% { transform: translateX(3px); }
}

@keyframes pulseRed {
    0%, 100% {
        box-shadow: 0 0 10px rgba(220, 20, 60, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(220, 20, 60, 0.6);
    }
}

/* ================================================================
   RESPONSIVE DESIGN
   ================================================================ */
@media (max-width: 768px) {
    .dashboard-container {
        margin: var(--space-sm);
        padding: var(--space-md);
    }

    .dashboard-header h1,
    .dashboard-header .game-title {
        font-size: 2rem;
    }

    .dashboard-navigation {
        flex-direction: column;
    }

    .village-selector-form select {
        width: 100%;
        box-sizing: border-box;
    }

    .resources-list {
        flex-direction: column;
    }

    .resource-item {
        justify-content: center;
        margin-bottom: var(--space-sm);
        width: 100%;
    }

    .card-header {
        font-size: 1.5rem;
    }

    .btn {
        width: 100%;
        padding: var(--space-md) var(--space-lg);
    }
}

@media (max-width: 480px) {
    .dashboard-header h1,
    .dashboard-header .game-title {
        font-size: 1.5rem;
        letter-spacing: 1px;
    }

    .card-header {
        font-size: 1.25rem;
    }
}

/* ================================================================
   UTILITY CLASSES
   ================================================================ */
.text-gold { color: var(--color-gold); }
.text-crimson { color: var(--color-crimson); }
.text-white { color: var(--text-white); }
.text-center { text-align: center; }

.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }

.p-sm { padding: var(--space-sm); }
.p-md { padding: var(--space-md); }
.p-lg { padding: var(--space-lg); }

/* ================================================================
   GLOBAL TEXT CONTRAST FIXES
   ================================================================ */
/* Ensure all text is readable on dark backgrounds */
body, p, span, div, label, td, th, li {
    color: var(--text-primary) !important;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--color-gold) !important;
}

a {
    color: var(--color-steel);
}

a:hover {
    color: var(--color-gold);
}

/* ================================================================
   ACHIEVEMENTS PAGE STYLES
   ================================================================ */

/* Page Header */
.achievements-page-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
    padding-bottom: var(--space-lg);
    border-bottom: 2px solid rgba(212, 175, 55, 0.3);
    position: relative;
}

.achievements-page-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--color-gold) 50%, transparent 100%);
}

.achievements-title {
    font-family: 'Cinzel Decorative', serif;
    font-size: 3rem;
    font-weight: 900;
    background: linear-gradient(135deg, #d4af37 0%, #c9a227 50%, #b08d57 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(212, 175, 55, 0.5);
    letter-spacing: 2px;
    margin-bottom: var(--space-sm);
}

.achievements-subtitle {
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 3px;
}

/* Stats Overview */
.achievements-stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-2xl);
}

.achievement-stat-card {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    background: linear-gradient(135deg, rgba(43, 43, 43, 0.8) 0%, rgba(28, 28, 28, 0.9) 100%);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.achievement-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, var(--color-gold) 50%, transparent 100%);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.achievement-stat-card:hover {
    border-color: var(--color-gold);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.achievement-stat-card:hover::before {
    opacity: 1;
}

.achievement-stat-card .stat-icon {
    font-size: 2.5rem;
    filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.5));
}

.achievement-stat-card .stat-content {
    flex: 1;
}

.achievement-stat-card .stat-value {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-gold);
    line-height: 1;
    margin-bottom: var(--space-xs);
}

.achievement-stat-card .stat-label {
    font-family: 'Roboto', sans-serif;
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Tabs */
.achievement-tabs-container {
    margin-bottom: var(--space-2xl);
}

.achievement-tabs {
    display: flex;
    gap: var(--space-sm);
    border-bottom: 2px solid rgba(212, 175, 55, 0.2);
    margin-bottom: var(--space-lg);
}

.achievement-tab {
    font-family: 'Cinzel', serif;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: var(--space-md) var(--space-xl);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all var(--transition-base);
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    position: relative;
}

.achievement-tab .tab-icon {
    font-size: 1.2rem;
}

.achievement-tab .tab-text {
    text-transform: uppercase;
    letter-spacing: 1px;
}

.achievement-tab .tab-count {
    background: rgba(212, 175, 55, 0.2);
    color: var(--color-gold);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
}

.achievement-tab:hover {
    color: var(--color-gold);
    background: rgba(212, 175, 55, 0.05);
}

.achievement-tab.active {
    color: var(--color-gold);
    border-bottom-color: var(--color-gold);
    background: rgba(212, 175, 55, 0.1);
}

.achievement-tab.active .tab-count {
    background: var(--color-gold);
    color: var(--color-black);
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Category Sections */
.achievement-category-section {
    margin-bottom: var(--space-3xl);
}

.category-header {
    margin-bottom: var(--space-xl);
}

.category-title {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-gold);
    margin-bottom: var(--space-md);
    text-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

.category-divider {
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(212, 175, 55, 0.3) 10%,
        rgba(212, 175, 55, 0.6) 50%,
        rgba(212, 175, 55, 0.3) 90%,
        transparent 100%);
}

/* Achievement Grid */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: var(--space-xl);
}

/* Achievement Cards */
.achievement-card {
    background: linear-gradient(135deg, var(--color-dark) 0%, var(--color-rich-black) 100%);
    border: 2px solid rgba(212, 175, 55, 0.25);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.achievement-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        repeating-linear-gradient(45deg, transparent, transparent 2px, rgba(255,255,255,0.01) 2px, rgba(255,255,255,0.01) 4px),
        repeating-linear-gradient(-45deg, transparent, transparent 2px, rgba(0,0,0,0.02) 2px, rgba(0,0,0,0.02) 4px);
    border-radius: var(--radius-xl);
    pointer-events: none;
}

.achievement-card:hover {
    border-color: var(--color-gold);
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl), var(--glow-gold);
}

/* Unlocked Achievement */
.achievement-unlocked {
    border-color: rgba(212, 175, 55, 0.5);
}

.achievement-unlocked .achievement-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: radial-gradient(circle at top, rgba(212, 175, 55, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

/* Locked Achievement */
.achievement-locked {
    border-color: rgba(107, 107, 107, 0.3);
    opacity: 0.85;
}

.achievement-locked:hover {
    border-color: rgba(212, 175, 55, 0.4);
    opacity: 1;
}

/* Achievement Card Header */
.achievement-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
}

.achievement-icon-wrapper {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2) 0%, rgba(212, 175, 55, 0.1) 100%);
    border: 2px solid rgba(212, 175, 55, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: var(--shadow-md), inset 0 0 20px rgba(212, 175, 55, 0.1);
}

.achievement-icon-wrapper::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 50%;
}

.achievement-icon-wrapper.locked {
    background: linear-gradient(135deg, rgba(107, 107, 107, 0.2) 0%, rgba(107, 107, 107, 0.1) 100%);
    border-color: rgba(107, 107, 107, 0.4);
    box-shadow: var(--shadow-md), inset 0 0 20px rgba(0, 0, 0, 0.3);
}

.achievement-icon-wrapper .achievement-icon {
    font-size: 2rem;
    filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.6));
}

.achievement-icon-wrapper.locked .achievement-icon {
    filter: drop-shadow(0 0 8px rgba(107, 107, 107, 0.4));
}

.unlocked-badge {
    background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-brass) 100%);
    color: var(--color-black);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: var(--shadow-md), var(--glow-gold);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Achievement Body */
.achievement-body {
    position: relative;
}

.achievement-name {
    font-family: 'Cinzel', serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-gold) !important;
    margin-bottom: var(--space-sm);
    line-height: 1.2;
}

.achievement-tier-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--space-md);
    box-shadow: var(--shadow-sm);
}

.achievement-tier-badge.tier-bronze {
    background: linear-gradient(135deg, #8b7355 0%, #6b5d4f 100%);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.achievement-tier-badge.tier-silver {
    background: linear-gradient(135deg, #c0c0c0 0%, #a8a8a8 100%);
    color: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.achievement-tier-badge.tier-gold {
    background: linear-gradient(135deg, #d4af37 0%, #c9a227 100%);
    color: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: var(--shadow-sm), 0 0 10px rgba(212, 175, 55, 0.3);
}

.achievement-tier-badge.tier-diamond {
    background: linear-gradient(135deg, #b9f2ff 0%, #7dd3e8 100%);
    color: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: var(--shadow-sm), 0 0 10px rgba(185, 242, 255, 0.3);
}

.achievement-description {
    color: var(--text-secondary) !important;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: var(--space-lg);
    padding: var(--space-md);
    background: rgba(0, 0, 0, 0.3);
    border-left: 3px solid rgba(212, 175, 55, 0.3);
    border-radius: var(--radius-sm);
}

/* Progress Bar */
.achievement-progress-container {
    margin: var(--space-lg) 0;
    padding: var(--space-md);
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-md);
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
}

.progress-label {
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.progress-numbers {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.9rem;
    color: var(--color-gold);
    font-weight: 700;
}

.progress-bar-wrapper {
    height: 20px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(212, 175, 55, 0.3);
    margin-bottom: var(--space-xs);
    position: relative;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--color-gold) 0%, var(--color-brass) 100%);
    border-radius: 10px;
    transition: width var(--transition-slow);
    position: relative;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.progress-bar .progress-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.3) 0%, transparent 100%);
    border-radius: 10px 10px 0 0;
}

.progress-percent {
    text-align: center;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.85rem;
    color: var(--color-gold);
    font-weight: 700;
}

/* Rewards Display */
.achievement-rewards-display {
    margin: var(--space-lg) 0;
    padding: var(--space-md);
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-md);
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.rewards-label {
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--space-sm);
}

.rewards-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.reward-item {
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    font-size: 0.9rem;
    color: var(--color-gold) !important;
    font-weight: 600;
    font-family: 'Roboto Mono', monospace;
    transition: all var(--transition-fast);
}

.reward-item:hover {
    background: rgba(212, 175, 55, 0.2);
    transform: scale(1.05);
}

/* Points Display */
.achievement-points-display {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(212, 175, 55, 0.05) 100%);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: var(--radius-md);
    margin: var(--space-lg) 0;
}

.points-icon {
    font-size: 1.5rem;
    filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.5));
}

.points-value {
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-gold);
}

/* Claimed Status */
.claimed-status {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: rgba(107, 107, 107, 0.2);
    border: 1px solid rgba(107, 107, 107, 0.3);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.claimed-icon {
    font-size: 1.2rem;
    color: var(--color-gold);
}

/* Claim Button */
.btn-claim-reward {
    width: 100%;
    margin-top: var(--space-md);
    padding: 14px 24px;
    font-size: 1rem;
}

.claim-form {
    margin: 0;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: var(--space-3xl);
    background: linear-gradient(135deg, rgba(43, 43, 43, 0.5) 0%, rgba(28, 28, 28, 0.7) 100%);
    border: 2px dashed rgba(212, 175, 55, 0.3);
    border-radius: var(--radius-xl);
    margin: var(--space-xl) 0;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: var(--space-lg);
    filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.3));
}

.empty-message {
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Responsive Design for Achievements */
@media (max-width: 768px) {
    .achievements-title {
        font-size: 2rem;
    }

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

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

    .achievement-tab {
        padding: var(--space-sm) var(--space-md);
        font-size: 0.9rem;
    }

    .achievement-tab .tab-text {
        display: none;
    }
}

/* ================================================================
   END OF ACHIEVEMENTS STYLES
   ================================================================ */

/* ================================================================
   RANKINGS / LEADERBOARD PAGE STYLES
   ================================================================ */

/* Rankings Page Body */
.rankings-body, .rankings-html {
    width: 100%;
    min-height: 100vh;
    font-family: 'Roboto', sans-serif;
    background: var(--color-black) url('images/Dashboard_Background.png') no-repeat center center fixed;
    background-size: cover;
    color: var(--text-primary);
    position: relative;
}

.rankings-body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.7) 100%);
    pointer-events: none;
    z-index: 0;
}

/* Rankings Page Container */
.rankings-page-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--space-xl);
    position: relative;
    z-index: 1;
}

/* Rankings Page Header */
.rankings-page-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
    padding: var(--space-2xl) var(--space-xl);
    background: linear-gradient(135deg, rgba(220, 20, 60, 0.15) 0%, rgba(139, 0, 0, 0.2) 100%),
                linear-gradient(135deg, rgba(26, 26, 26, 0.95) 0%, rgba(10, 10, 10, 0.98) 100%);
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: var(--radius-xl);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-xl), var(--glow-gold);
}

.rankings-page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, var(--color-gold) 50%, transparent 100%);
}

.rankings-page-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, var(--color-gold) 50%, transparent 100%);
}

.rankings-title-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-lg);
    margin-bottom: var(--space-sm);
}

.rankings-icon-left,
.rankings-icon-right {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.3) 0%, rgba(212, 175, 55, 0.1) 100%);
    border: 2px solid rgba(212, 175, 55, 0.5);
    border-radius: 50%;
    position: relative;
    box-shadow: var(--glow-gold);
}

.rankings-icon-left::before,
.rankings-icon-right::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    background: var(--color-gold);
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2L15.09 8.26L22 9.27L17 14.14L18.18 21.02L12 17.77L5.82 21.02L7 14.14L2 9.27L8.91 8.26L12 2Z'/%3E%3C/svg%3E") center/contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2L15.09 8.26L22 9.27L17 14.14L18.18 21.02L12 17.77L5.82 21.02L7 14.14L2 9.27L8.91 8.26L12 2Z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.rankings-title {
    font-family: 'Cinzel Decorative', serif;
    font-size: 3rem;
    font-weight: 900;
    background: linear-gradient(135deg, #d4af37 0%, #f5d67a 30%, #c9a227 50%, #b08d57 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 40px rgba(212, 175, 55, 0.6);
    letter-spacing: 4px;
    text-transform: uppercase;
}

.rankings-subtitle {
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    color: var(--text-secondary) !important;
    text-transform: uppercase;
    letter-spacing: 6px;
    margin-top: var(--space-sm);
}

/* Your Rankings Section */
.my-rankings-section {
    margin-bottom: var(--space-2xl);
    padding: var(--space-xl);
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.08) 0%, rgba(212, 175, 55, 0.02) 100%);
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: var(--radius-xl);
    position: relative;
    box-shadow: var(--shadow-lg);
}

.my-rankings-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--color-gold) 50%, transparent 100%);
}

.my-rankings-section .section-title {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-gold) !important;
    text-align: center;
    margin-bottom: var(--space-xl);
    text-transform: uppercase;
    letter-spacing: 3px;
}

.my-rankings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg);
    max-width: 800px;
    margin: 0 auto;
}

.my-rank-card {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.9) 0%, rgba(10, 10, 10, 0.95) 100%);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.my-rank-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--color-gold) 0%, var(--color-brass) 100%);
}

.my-rank-card:hover {
    border-color: var(--color-gold);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg), var(--glow-gold);
}

.rank-card-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2) 0%, rgba(212, 175, 55, 0.1) 100%);
    border: 2px solid rgba(212, 175, 55, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}

.rank-icon-villages::before {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    background: var(--color-gold);
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z'/%3E%3C/svg%3E") center/contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.rank-icon-resources::before {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    background: var(--color-gold);
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1.41 16.09V20h-2.67v-1.93c-1.71-.36-3.16-1.46-3.27-3.4h1.96c.1 1.05.82 1.87 2.65 1.87 1.96 0 2.4-.98 2.4-1.59 0-.83-.44-1.61-2.67-2.14-2.48-.6-4.18-1.62-4.18-3.67 0-1.72 1.39-2.84 3.11-3.21V4h2.67v1.95c1.86.45 2.79 1.86 2.85 3.39H14.3c-.05-1.11-.64-1.87-2.22-1.87-1.5 0-2.4.68-2.4 1.64 0 .84.65 1.39 2.67 1.91s4.18 1.39 4.18 3.91c-.01 1.83-1.38 2.83-3.12 3.16z'/%3E%3C/svg%3E") center/contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1.41 16.09V20h-2.67v-1.93c-1.71-.36-3.16-1.46-3.27-3.4h1.96c.1 1.05.82 1.87 2.65 1.87 1.96 0 2.4-.98 2.4-1.59 0-.83-.44-1.61-2.67-2.14-2.48-.6-4.18-1.62-4.18-3.67 0-1.72 1.39-2.84 3.11-3.21V4h2.67v1.95c1.86.45 2.79 1.86 2.85 3.39H14.3c-.05-1.11-.64-1.87-2.22-1.87-1.5 0-2.4.68-2.4 1.64 0 .84.65 1.39 2.67 1.91s4.18 1.39 4.18 3.91c-.01 1.83-1.38 2.83-3.12 3.16z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.rank-icon-army::before {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    background: var(--color-gold);
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 5h10v2h2V1h-4v2H9V1H5v6h2V5zm10 4H7c-1.1 0-2 .9-2 2v9c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-4h6v4c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-9c0-1.1-.9-2-2-2z'/%3E%3C/svg%3E") center/contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 5h10v2h2V1h-4v2H9V1H5v6h2V5zm10 4H7c-1.1 0-2 .9-2 2v9c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-4h6v4c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-9c0-1.1-.9-2-2-2z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.rank-card-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.rank-card-label {
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    color: var(--text-secondary) !important;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.rank-card-value {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-gold) !important;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

/* Rankings Grid */
.rankings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
    margin-bottom: var(--space-2xl);
}

@media (max-width: 1024px) {
    .rankings-grid {
        grid-template-columns: 1fr;
    }
}

/* Leaderboard Card */
.leaderboard-card {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.95) 0%, rgba(10, 10, 10, 0.98) 100%);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-base);
}

.leaderboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        repeating-linear-gradient(45deg, transparent, transparent 2px, rgba(255,255,255,0.01) 2px, rgba(255,255,255,0.01) 4px),
        repeating-linear-gradient(-45deg, transparent, transparent 2px, rgba(0,0,0,0.02) 2px, rgba(0,0,0,0.02) 4px);
    border-radius: var(--radius-xl);
    pointer-events: none;
}

.leaderboard-card:hover {
    border-color: rgba(212, 175, 55, 0.4);
    box-shadow: var(--shadow-xl), 0 0 20px rgba(212, 175, 55, 0.1);
}

/* Ornate corners */
.leaderboard-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 25px;
    height: 25px;
    border-top: 2px solid rgba(212, 175, 55, 0.4);
    border-right: 2px solid rgba(212, 175, 55, 0.4);
    border-top-right-radius: var(--radius-xl);
}

.leaderboard-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-sm);
    position: relative;
}

.leaderboard-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, rgba(220, 20, 60, 0.3) 0%, rgba(139, 0, 0, 0.4) 100%);
    border: 2px solid rgba(212, 175, 55, 0.4);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.leaderboard-icon-villages::before {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    background: var(--color-gold);
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z'/%3E%3C/svg%3E") center/contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.leaderboard-icon-resources::before {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    background: var(--color-gold);
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1.41 16.09V20h-2.67v-1.93c-1.71-.36-3.16-1.46-3.27-3.4h1.96c.1 1.05.82 1.87 2.65 1.87 1.96 0 2.4-.98 2.4-1.59 0-.83-.44-1.61-2.67-2.14-2.48-.6-4.18-1.62-4.18-3.67 0-1.72 1.39-2.84 3.11-3.21V4h2.67v1.95c1.86.45 2.79 1.86 2.85 3.39H14.3c-.05-1.11-.64-1.87-2.22-1.87-1.5 0-2.4.68-2.4 1.64 0 .84.65 1.39 2.67 1.91s4.18 1.39 4.18 3.91c-.01 1.83-1.38 2.83-3.12 3.16z'/%3E%3C/svg%3E") center/contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1.41 16.09V20h-2.67v-1.93c-1.71-.36-3.16-1.46-3.27-3.4h1.96c.1 1.05.82 1.87 2.65 1.87 1.96 0 2.4-.98 2.4-1.59 0-.83-.44-1.61-2.67-2.14-2.48-.6-4.18-1.62-4.18-3.67 0-1.72 1.39-2.84 3.11-3.21V4h2.67v1.95c1.86.45 2.79 1.86 2.85 3.39H14.3c-.05-1.11-.64-1.87-2.22-1.87-1.5 0-2.4.68-2.4 1.64 0 .84.65 1.39 2.67 1.91s4.18 1.39 4.18 3.91c-.01 1.83-1.38 2.83-3.12 3.16z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.leaderboard-icon-army::before {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    background: var(--color-gold);
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 5h10v2h2V1h-4v2H9V1H5v6h2V5zm10 4H7c-1.1 0-2 .9-2 2v9c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-4h6v4c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-9c0-1.1-.9-2-2-2z'/%3E%3C/svg%3E") center/contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 5h10v2h2V1h-4v2H9V1H5v6h2V5zm10 4H7c-1.1 0-2 .9-2 2v9c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-4h6v4c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-9c0-1.1-.9-2-2-2z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.leaderboard-icon-alliance::before {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    background: var(--color-gold);
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z'/%3E%3C/svg%3E") center/contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.leaderboard-title {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-gold) !important;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
    letter-spacing: 1px;
}

.leaderboard-description {
    font-family: 'Roboto', sans-serif;
    font-size: 0.9rem;
    color: var(--text-secondary) !important;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

/* Leaderboard List */
.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.leaderboard-item {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: rgba(10, 10, 10, 0.5);
    border: 1px solid rgba(212, 175, 55, 0.1);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    position: relative;
}

.leaderboard-item:hover {
    background: rgba(212, 175, 55, 0.08);
    border-color: rgba(212, 175, 55, 0.3);
    transform: translateX(5px);
}

/* Medal Styles */
.leaderboard-rank {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.medal {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-block;
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.medal::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    background: rgba(255, 255, 255, 0.3);
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2L15.09 8.26L22 9.27L17 14.14L18.18 21.02L12 17.77L5.82 21.02L7 14.14L2 9.27L8.91 8.26L12 2Z'/%3E%3C/svg%3E") center/contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2L15.09 8.26L22 9.27L17 14.14L18.18 21.02L12 17.77L5.82 21.02L7 14.14L2 9.27L8.91 8.26L12 2Z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.medal-gold {
    background: linear-gradient(135deg, #ffd700 0%, #d4af37 50%, #b8860b 100%);
    border: 2px solid rgba(255, 215, 0, 0.8);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5), 0 2px 4px rgba(0, 0, 0, 0.5);
}

.medal-gold::before {
    background: rgba(255, 255, 255, 0.5);
}

.medal-silver {
    background: linear-gradient(135deg, #e8e8e8 0%, #c0c0c0 50%, #a8a8a8 100%);
    border: 2px solid rgba(192, 192, 192, 0.8);
    box-shadow: 0 0 10px rgba(192, 192, 192, 0.4), 0 2px 4px rgba(0, 0, 0, 0.5);
}

.medal-silver::before {
    background: rgba(255, 255, 255, 0.4);
}

.medal-bronze {
    background: linear-gradient(135deg, #cd7f32 0%, #b87333 50%, #8b5a2b 100%);
    border: 2px solid rgba(205, 127, 50, 0.8);
    box-shadow: 0 0 10px rgba(205, 127, 50, 0.4), 0 2px 4px rgba(0, 0, 0, 0.5);
}

.medal-bronze::before {
    background: rgba(255, 255, 255, 0.3);
}

.medal-honor {
    background: linear-gradient(135deg, rgba(107, 107, 107, 0.8) 0%, rgba(74, 74, 74, 0.9) 100%);
    border: 2px solid rgba(107, 107, 107, 0.5);
    width: 24px;
    height: 24px;
}

.medal-honor::before {
    display: none;
}

.rank-number {
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-secondary) !important;
    min-width: 24px;
    text-align: center;
}

/* Top 3 Rank Styling */
.leaderboard-item.rank-gold {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(212, 175, 55, 0.05) 100%);
    border-color: rgba(255, 215, 0, 0.3);
}

.leaderboard-item.rank-gold .rank-number {
    color: #ffd700 !important;
}

.leaderboard-item.rank-silver {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.08) 0%, rgba(192, 192, 192, 0.03) 100%);
    border-color: rgba(192, 192, 192, 0.25);
}

.leaderboard-item.rank-silver .rank-number {
    color: #c0c0c0 !important;
}

.leaderboard-item.rank-bronze {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.08) 0%, rgba(205, 127, 50, 0.03) 100%);
    border-color: rgba(205, 127, 50, 0.25);
}

.leaderboard-item.rank-bronze .rank-number {
    color: #cd7f32 !important;
}

/* Current User Highlight */
.leaderboard-item.is-current-user {
    background: linear-gradient(135deg, rgba(220, 20, 60, 0.15) 0%, rgba(139, 0, 0, 0.1) 100%);
    border: 2px solid rgba(220, 20, 60, 0.4);
    box-shadow: 0 0 15px rgba(220, 20, 60, 0.2);
}

.leaderboard-item.is-current-user:hover {
    background: linear-gradient(135deg, rgba(220, 20, 60, 0.2) 0%, rgba(139, 0, 0, 0.15) 100%);
    border-color: rgba(220, 20, 60, 0.5);
}

/* Player Info */
.leaderboard-player {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    overflow: hidden;
}

.player-name {
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary) !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.you-badge {
    background: linear-gradient(135deg, var(--color-crimson) 0%, var(--color-blood) 100%);
    color: white !important;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    flex-shrink: 0;
    box-shadow: 0 0 10px rgba(220, 20, 60, 0.3);
}

.alliance-info {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-xs);
}

.alliance-tag {
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-gold) !important;
}

/* Stat Display */
.leaderboard-stat {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.stat-value {
    font-family: 'Roboto Mono', monospace;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-gold) !important;
}

.stat-label {
    font-family: 'Roboto', sans-serif;
    font-size: 0.75rem;
    color: var(--text-tertiary) !important;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Empty State */
.leaderboard-empty {
    text-align: center;
    padding: var(--space-2xl) var(--space-lg);
    background: rgba(0, 0, 0, 0.3);
    border: 2px dashed rgba(212, 175, 55, 0.2);
    border-radius: var(--radius-lg);
    margin-top: var(--space-md);
}

.leaderboard-empty .empty-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto var(--space-md);
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2) 0%, rgba(212, 175, 55, 0.1) 100%);
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 50%;
    position: relative;
}

.leaderboard-empty .empty-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    background: var(--color-gold);
    opacity: 0.5;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z'/%3E%3C/svg%3E") center/contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.leaderboard-empty .empty-message {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    color: var(--text-secondary) !important;
    margin-bottom: var(--space-lg);
}

.btn-alliance {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-brass) 100%);
    color: var(--color-black) !important;
    font-family: 'Cinzel', serif;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    box-shadow: var(--shadow-md), var(--glow-gold);
}

.btn-alliance:hover {
    background: linear-gradient(135deg, var(--color-antique-gold) 0%, var(--color-gold) 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--glow-gold);
}

/* Rankings Footer */
.rankings-footer {
    text-align: center;
    padding: var(--space-xl) 0;
}

.footer-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, rgba(212, 175, 55, 0.3) 50%, transparent 100%);
    margin-bottom: var(--space-lg);
}

.footer-notice {
    font-family: 'Roboto', sans-serif;
    font-size: 0.9rem;
    color: var(--text-tertiary) !important;
    font-style: italic;
}

/* Responsive Design for Rankings */
@media (max-width: 768px) {
    .rankings-page-container {
        padding: var(--space-md);
    }

    .rankings-title {
        font-size: 2rem;
        letter-spacing: 2px;
    }

    .rankings-subtitle {
        font-size: 0.9rem;
        letter-spacing: 3px;
    }

    .rankings-icon-left,
    .rankings-icon-right {
        display: none;
    }

    .my-rankings-grid {
        grid-template-columns: 1fr;
    }

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

    .leaderboard-item {
        grid-template-columns: 60px 1fr auto;
        padding: var(--space-sm) var(--space-md);
    }

    .medal {
        width: 24px;
        height: 24px;
    }

    .player-name {
        font-size: 0.9rem;
    }

    .stat-value {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .rankings-title {
        font-size: 1.5rem;
    }

    .leaderboard-title {
        font-size: 1.2rem;
    }

    .leaderboard-item {
        grid-template-columns: 50px 1fr;
    }

    .leaderboard-stat {
        grid-column: 1 / -1;
        flex-direction: row;
        justify-content: flex-end;
        margin-top: var(--space-xs);
        padding-top: var(--space-xs);
        border-top: 1px solid rgba(212, 175, 55, 0.1);
    }

    .stat-label {
        margin-left: var(--space-xs);
    }
}

/* ================================================================
   END OF RANKINGS PAGE STYLES
   ================================================================ */

/* ================================================================
   ALLIANCES / GUILD HALL PAGE STYLES
   ================================================================ */

/* Alliances Page Background */
.alliances-body, .alliances-html {
    width: 100%;
    min-height: 100vh;
    font-family: 'Roboto', sans-serif;
    background: var(--color-black) url('images/Dashboard_Background.png') no-repeat center center fixed;
    background-size: cover;
    color: var(--text-primary);
    position: relative;
}

.alliances-body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.7) 100%);
    pointer-events: none;
    z-index: 0;
}

/* Main Alliances Container */
.alliances-container {
    max-width: 1400px;
    margin: 20px auto;
    padding: var(--space-lg);
    position: relative;
    z-index: 1;
}

/* Page Title */
.alliances-container .page-title {
    font-family: 'Cinzel Decorative', serif;
    font-size: 2.5rem;
    font-weight: 900;
    text-align: center;
    background: linear-gradient(135deg, #d4af37 0%, #c9a227 50%, #b08d57 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(212, 175, 55, 0.5);
    letter-spacing: 3px;
    margin-bottom: var(--space-xl);
    padding: var(--space-lg) 0;
    border-bottom: 2px solid rgba(212, 175, 55, 0.3);
    position: relative;
}

.alliances-container .page-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--color-gold) 50%, transparent 100%);
}

/* Section Cards */
.guild-section {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.95) 0%, rgba(10, 10, 10, 0.98) 100%);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin-bottom: var(--space-xl);
    box-shadow: var(--shadow-lg);
    position: relative;
}

.guild-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        repeating-linear-gradient(45deg, transparent, transparent 2px, rgba(255,255,255,0.01) 2px, rgba(255,255,255,0.01) 4px);
    border-radius: var(--radius-lg);
    pointer-events: none;
}

/* Ornate corner for guild sections */
.guild-section::after {
    content: '';
    position: absolute;
    top: -1px;
    right: -1px;
    width: 40px;
    height: 40px;
    border-top: 2px solid rgba(212, 175, 55, 0.4);
    border-right: 2px solid rgba(212, 175, 55, 0.4);
    border-top-right-radius: var(--radius-lg);
}

/* Section Headers */
.guild-section-header {
    font-family: 'Cinzel', serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--color-gold);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid rgba(212, 175, 55, 0.3);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    position: relative;
}

.guild-section-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, var(--color-gold) 0%, transparent 100%);
}

.guild-section-header .header-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2) 0%, rgba(212, 175, 55, 0.1) 100%);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: var(--radius-md);
}

/* Alliance Header (When in Alliance) */
.alliance-banner {
    background: linear-gradient(135deg, rgba(220, 20, 60, 0.15) 0%, rgba(139, 0, 0, 0.2) 100%),
                linear-gradient(135deg, rgba(26, 26, 26, 0.95) 0%, rgba(10, 10, 10, 0.98) 100%);
    border: 2px solid rgba(212, 175, 55, 0.4);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    margin-bottom: var(--space-xl);
    box-shadow: var(--shadow-xl), var(--glow-gold);
    position: relative;
    overflow: hidden;
}

.alliance-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, var(--color-gold) 50%, transparent 100%);
}

.alliance-banner::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, var(--color-crimson) 50%, transparent 100%);
}

.alliance-banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-lg);
}

.alliance-identity {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}

.alliance-emblem {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--color-dark) 0%, var(--color-black) 100%);
    border: 3px solid rgba(212, 175, 55, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg), var(--glow-gold);
    position: relative;
}

.alliance-emblem::before {
    content: '';
    position: absolute;
    inset: -6px;
    border: 2px solid rgba(212, 175, 55, 0.2);
    border-radius: 50%;
}

.alliance-emblem .emblem-tag {
    font-family: 'Cinzel Decorative', serif;
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--color-gold);
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
}

.alliance-name-group h2 {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-gold) !important;
    margin: 0 0 var(--space-xs) 0;
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}

.alliance-tag-display {
    font-family: 'Roboto Mono', monospace;
    font-size: 1rem;
    color: var(--text-secondary) !important;
    background: rgba(0, 0, 0, 0.4);
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(212, 175, 55, 0.2);
}

/* Role Badges */
.role-badge {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 8px 20px;
    border-radius: 25px;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
}

.role-badge.role-leader {
    background: linear-gradient(135deg, #d4af37 0%, #c9a227 100%);
    color: var(--color-black) !important;
    box-shadow: var(--shadow-md), 0 0 20px rgba(212, 175, 55, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.role-badge.role-officer {
    background: linear-gradient(135deg, #c0c0c0 0%, #a8a8a8 100%);
    color: var(--color-black) !important;
    box-shadow: var(--shadow-md), 0 0 15px rgba(192, 192, 192, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.role-badge.role-member {
    background: linear-gradient(135deg, var(--color-stone) 0%, var(--color-dark) 100%);
    color: var(--text-primary) !important;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(212, 175, 55, 0.3);
}

/* Alliance Stats Grid */
.alliance-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-md);
    margin: var(--space-lg) 0;
}

.stat-card {
    background: linear-gradient(135deg, rgba(43, 43, 43, 0.6) 0%, rgba(26, 26, 26, 0.8) 100%);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    text-align: center;
    transition: all var(--transition-base);
}

.stat-card:hover {
    border-color: rgba(212, 175, 55, 0.4);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-card .stat-icon {
    font-size: 1.5rem;
    margin-bottom: var(--space-sm);
    filter: grayscale(0.2);
}

.stat-card .stat-label {
    font-family: 'Cinzel', serif;
    font-size: 0.8rem;
    color: var(--text-tertiary) !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--space-xs);
}

.stat-card .stat-value {
    font-family: 'Roboto Mono', monospace;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-gold) !important;
}

/* Alliance Description */
.alliance-description-box {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-left: 4px solid var(--color-gold);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin: var(--space-lg) 0;
}

.alliance-description-box h3 {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    color: var(--color-gold) !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--space-sm);
}

.alliance-description-box p {
    color: var(--text-secondary) !important;
    line-height: 1.7;
    font-size: 0.95rem;
}

/* Members Section */
.members-roster {
    margin-top: var(--space-xl);
}

.members-roster .roster-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
}

.members-roster .roster-title {
    font-family: 'Cinzel', serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-gold) !important;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.members-roster .member-count {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.9rem;
    color: var(--text-secondary) !important;
    background: rgba(0, 0, 0, 0.4);
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(212, 175, 55, 0.2);
}

/* Member Cards */
.members-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.member-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    align-items: center;
    gap: var(--space-md);
    background: linear-gradient(135deg, rgba(43, 43, 43, 0.5) 0%, rgba(26, 26, 26, 0.7) 100%);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-lg);
    transition: all var(--transition-base);
}

.member-row:hover {
    border-color: rgba(212, 175, 55, 0.35);
    background: linear-gradient(135deg, rgba(43, 43, 43, 0.7) 0%, rgba(26, 26, 26, 0.9) 100%);
}

.member-row.is-leader {
    border-color: rgba(212, 175, 55, 0.4);
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(26, 26, 26, 0.9) 100%);
}

.member-row.is-officer {
    border-color: rgba(192, 192, 192, 0.3);
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.05) 0%, rgba(26, 26, 26, 0.9) 100%);
}

.member-info {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.member-avatar {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--color-dark) 0%, var(--color-black) 100%);
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--color-gold);
}

.member-row.is-leader .member-avatar {
    border-color: var(--color-gold);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.member-row.is-officer .member-avatar {
    border-color: #c0c0c0;
    box-shadow: 0 0 8px rgba(192, 192, 192, 0.2);
}

.member-details h4 {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary) !important;
    margin: 0 0 var(--space-xs) 0;
}

.member-details .role-badge-small {
    font-size: 0.7rem;
    padding: 3px 10px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.role-badge-small.role-leader {
    background: linear-gradient(135deg, #d4af37 0%, #c9a227 100%);
    color: var(--color-black) !important;
}

.role-badge-small.role-officer {
    background: linear-gradient(135deg, #c0c0c0 0%, #a8a8a8 100%);
    color: var(--color-black) !important;
}

.role-badge-small.role-member {
    background: rgba(107, 107, 107, 0.4);
    color: var(--text-secondary) !important;
    border: 1px solid rgba(107, 107, 107, 0.3);
}

.member-stat {
    font-family: 'Roboto', sans-serif;
    font-size: 0.9rem;
    color: var(--text-secondary) !important;
}

.member-stat strong {
    color: var(--text-primary) !important;
}

.member-actions {
    display: flex;
    gap: var(--space-sm);
}

/* Management Section */
.management-section {
    background: linear-gradient(135deg, rgba(220, 20, 60, 0.05) 0%, rgba(139, 0, 0, 0.1) 100%),
                linear-gradient(135deg, rgba(26, 26, 26, 0.95) 0%, rgba(10, 10, 10, 0.98) 100%);
    border: 1px solid rgba(220, 20, 60, 0.2);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin-top: var(--space-xl);
}

.management-section .section-title {
    font-family: 'Cinzel', serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-gold) !important;
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.management-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
}

.management-card {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
}

.management-card h4 {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-gold) !important;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

/* Form Styling */
.guild-form .form-group {
    margin-bottom: var(--space-md);
}

.guild-form label {
    display: block;
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary) !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--space-xs);
}

.guild-form input[type="text"],
.guild-form textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    transition: all var(--transition-base);
}

.guild-form input[type="text"]:focus,
.guild-form textarea:focus {
    outline: none;
    border-color: var(--color-gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

.guild-form textarea {
    min-height: 100px;
    resize: vertical;
}

.guild-form .form-hint {
    font-size: 0.8rem;
    color: var(--text-tertiary) !important;
    margin-top: var(--space-xs);
}

/* Alliance Buttons */
.btn-guild {
    font-family: 'Cinzel', serif;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 10px 24px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-guild-primary {
    background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-brass) 100%);
    color: var(--color-black);
    box-shadow: var(--shadow-sm), 0 0 10px rgba(212, 175, 55, 0.2);
}

.btn-guild-primary:hover {
    background: linear-gradient(135deg, var(--color-antique-gold) 0%, var(--color-gold) 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md), 0 0 15px rgba(212, 175, 55, 0.3);
}

.btn-guild-secondary {
    background: linear-gradient(135deg, var(--color-stone) 0%, var(--color-dark) 100%);
    color: var(--text-primary);
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.btn-guild-secondary:hover {
    background: linear-gradient(135deg, var(--color-dark) 0%, var(--color-stone) 100%);
    border-color: rgba(212, 175, 55, 0.5);
    transform: translateY(-1px);
}

.btn-guild-danger {
    background: linear-gradient(135deg, var(--color-crimson) 0%, var(--color-blood) 100%);
    color: var(--text-white);
    box-shadow: var(--shadow-sm), 0 0 10px rgba(220, 20, 60, 0.2);
}

.btn-guild-danger:hover {
    background: linear-gradient(135deg, var(--color-blood) 0%, var(--color-deep-crimson) 100%);
    box-shadow: var(--shadow-md), 0 0 15px rgba(220, 20, 60, 0.3);
    transform: translateY(-2px);
}

.btn-guild-success {
    background: linear-gradient(135deg, #2d5a2d 0%, #1a3d1a 100%);
    color: var(--text-white);
    border: 1px solid rgba(45, 90, 45, 0.5);
}

.btn-guild-success:hover {
    background: linear-gradient(135deg, #1a3d1a 0%, #2d5a2d 100%);
    transform: translateY(-1px);
}

.btn-guild-small {
    padding: 6px 14px;
    font-size: 0.75rem;
}

/* Leave/Disband Section */
.danger-zone {
    margin-top: var(--space-xl);
    padding: var(--space-lg);
    background: linear-gradient(135deg, rgba(220, 20, 60, 0.1) 0%, rgba(139, 0, 0, 0.15) 100%);
    border: 2px solid rgba(220, 20, 60, 0.3);
    border-radius: var(--radius-lg);
    text-align: center;
}

.danger-zone .warning-text {
    color: var(--color-crimson) !important;
    font-weight: 600;
    margin-bottom: var(--space-md);
}

/* Invitations Section */
.invitations-section {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.08) 0%, rgba(212, 175, 55, 0.03) 100%);
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin-bottom: var(--space-xl);
    box-shadow: var(--shadow-md), 0 0 20px rgba(212, 175, 55, 0.1);
}

.invitation-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin-top: var(--space-md);
    transition: all var(--transition-base);
}

.invitation-card:hover {
    border-color: rgba(212, 175, 55, 0.4);
}

.invite-info h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    color: var(--color-gold) !important;
    margin: 0 0 var(--space-xs) 0;
}

.invite-info p {
    color: var(--text-secondary) !important;
    font-size: 0.9rem;
    margin: var(--space-xs) 0;
}

.invite-info .invite-time {
    font-size: 0.8rem;
    color: var(--text-tertiary) !important;
}

.invite-actions {
    display: flex;
    gap: var(--space-sm);
}

/* Create Alliance Section */
.create-alliance-section {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.08) 0%, rgba(26, 26, 26, 0.95) 100%);
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin-bottom: var(--space-xl);
    position: relative;
}

.create-alliance-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, var(--color-gold) 50%, transparent 100%);
}

.create-alliance-form {
    max-width: 600px;
    margin: var(--space-lg) auto 0;
}

/* Browse Alliances Section */
.browse-alliances-section {
    margin-top: var(--space-xl);
}

.alliances-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-lg);
    margin-top: var(--space-lg);
}

.alliance-browse-card {
    background: linear-gradient(135deg, rgba(43, 43, 43, 0.8) 0%, rgba(26, 26, 26, 0.95) 100%);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-base);
}

.alliance-browse-card:hover {
    border-color: rgba(212, 175, 55, 0.5);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), 0 0 20px rgba(212, 175, 55, 0.15);
}

.alliance-card-header {
    background: linear-gradient(135deg, rgba(220, 20, 60, 0.2) 0%, rgba(139, 0, 0, 0.3) 100%);
    padding: var(--space-lg);
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.alliance-card-header h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-gold) !important;
    margin: 0;
}

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

.alliance-desc {
    color: var(--text-secondary) !important;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: var(--space-md);
    min-height: 50px;
}

.alliance-info-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.alliance-info-list span {
    font-size: 0.85rem;
    color: var(--text-secondary) !important;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.alliance-info-list span strong {
    color: var(--text-primary) !important;
}

.alliance-card-footer {
    padding: var(--space-md) var(--space-lg);
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(212, 175, 55, 0.1);
}

.recruiting-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.8rem;
    color: #4ade80 !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.recruiting-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

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

/* No Alliances Message */
.no-alliances-message {
    text-align: center;
    padding: var(--space-3xl);
    color: var(--text-tertiary);
}

.no-alliances-message p {
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    font-style: italic;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .alliance-banner-content {
        flex-direction: column;
        text-align: center;
    }

    .alliance-identity {
        flex-direction: column;
    }

    .member-row {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
    }

    .member-actions {
        justify-content: center;
        padding-top: var(--space-sm);
        border-top: 1px solid rgba(212, 175, 55, 0.1);
    }

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

    .invitation-card {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }

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

    .alliances-container .page-title {
        font-size: 1.8rem;
    }
}

/* ================================================================
   END OF ALLIANCES / GUILD HALL PAGE STYLES
   ================================================================ */

/* ================================================================
   COMPACT QUICK ACTIONS GRID
   ================================================================ */

.actions-compact .card-header {
    font-size: 1.1rem;
    padding: 12px 16px;
    margin-bottom: 8px;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(85px, 1fr));
    gap: 8px;
    padding: 12px;
}

.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    background: linear-gradient(135deg, #2b2b2b, #0a0a0a);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 6px;
    text-decoration: none;
    color: #e0e0e0;
    transition: all 0.2s ease;
    cursor: pointer;
    min-height: 70px;
}

.action-item:hover {
    background: linear-gradient(135deg, #0a0a0a, #3d3d3d);
    border-color: #d4af37;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.6),
                0 0 12px rgba(212, 175, 55, 0.3);
}

.action-item:active {
    transform: translateY(0);
}

.action-icon {
    font-size: 1.5rem;
    margin-bottom: 4px;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8));
}

.action-label {
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
    color: #b0b0b0;
    transition: color 0.2s ease;
}

.action-item:hover .action-label {
    color: #d4af37;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .action-grid {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 6px;
    }

    .action-item {
        padding: 10px 6px;
        min-height: 65px;
    }

    .action-icon {
        font-size: 1.3rem;
    }
}

@media (max-width: 768px) {
    .action-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }

    .action-label {
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .action-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ================================================================
   END OF COMPACT QUICK ACTIONS
   ================================================================ */

/* ================================================================
   END OF WARFALLEN DASHBOARD STYLES
   ================================================================ */
