/*
 * Project WRLD - Custom Stylesheet
 * Theme: Dark Mode with Purple/Pink Neon Aesthetic
 */

/* =====================================================
   CSS Variables & Root Styles
   ===================================================== */
:root {
    /* Primary Colors */
    --primary-purple: #8B5CF6;
    --primary-pink: #EC4899;
    --primary-purple-dark: #6D28D9;
    --primary-pink-dark: #DB2777;
    
    /* Gradient */
    --gradient-primary: linear-gradient(135deg, var(--primary-purple) 0%, var(--primary-pink) 100%);
    --gradient-hover: linear-gradient(135deg, var(--primary-purple-dark) 0%, var(--primary-pink-dark) 100%);
    --gradient-glow: linear-gradient(135deg, rgba(139, 92, 246, 0.5) 0%, rgba(236, 72, 153, 0.5) 100%);
    
    /* Background Colors */
    --bg-dark: #0A0A0F;
    --bg-card: #12121A;
    --bg-card-hover: #1A1A25;
    --bg-navbar: rgba(10, 10, 15, 0.95);
    
    /* Text Colors */
    --text-primary: #FFFFFF;
    --text-secondary: #A1A1AA;
    --text-muted: #71717A;
    
    /* Border Colors */
    --border-color: rgba(139, 92, 246, 0.2);
    --border-hover: rgba(139, 92, 246, 0.5);
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(139, 92, 246, 0.3);
    --shadow-glow-pink: 0 0 30px rgba(236, 72, 153, 0.3);
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Spacing */
    --section-padding: 100px 0;
}

/* =====================================================
   Base Styles
   ===================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    line-height: 1.2;
}

a {
    text-decoration: none;
    transition: var(--transition-normal);
}

img {
    max-width: 100%;
    height: auto;
}

/* =====================================================
   Navigation
   ===================================================== */
.navbar {
    padding: 1rem 0;
    background: transparent;
    transition: var(--transition-normal);
    z-index: 1000;
}

.navbar.scrolled {
    background: var(--bg-navbar);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
    padding: 0.5rem 0;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.navbar-logo {
    width: 45px;
    height: 45px;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.5));
    transition: var(--transition-normal);
}

.navbar-brand:hover .navbar-logo {
    filter: drop-shadow(0 0 20px rgba(139, 92, 246, 0.8));
    transform: rotate(-5deg) scale(1.05);
}

.navbar-brand-text {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.logo-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.75rem;
    font-weight: 900;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-rp {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-secondary);
}

.nav-link {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary) !important;
    padding: 0.5rem 1rem !important;
    position: relative;
    letter-spacing: 0.5px;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition-normal);
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

.navbar-toggler {
    border: 1px solid var(--border-color);
    padding: 0.5rem 0.75rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* Discord Status Component */
.discord-status {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    padding: 0.5rem 1rem;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-dot {
    width: 10px;
    height: 10px;
    background: #22C55E;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
    }
}

.status-text {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.player-count {
    color: var(--text-primary);
    font-weight: 600;
}

/* =====================================================
   Hero Section
   ===================================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 120px 0 80px;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(135deg, rgba(10, 10, 15, 0.85) 0%, rgba(10, 10, 15, 0.7) 100%),
        url('/assets/images/hero-bg.jpg') center center / cover no-repeat,
        radial-gradient(ellipse at 20% 80%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(236, 72, 153, 0.15) 0%, transparent 50%);
    z-index: 0;
}

.hero-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(139, 92, 246, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(139, 92, 246, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    padding: 0.5rem 1.25rem;
    margin-bottom: 2rem;
    animation: fadeInDown 0.8s ease;
}

.hero-badge i {
    color: var(--primary-purple);
}

.hero-badge span {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease;
}

.hero-title .highlight {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    animation: fadeInUp 0.8s ease 0.4s backwards;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* =====================================================
   Buttons
   ===================================================== */
.btn-primary-gradient {
    background: var(--gradient-primary);
    border: none;
    color: var(--text-primary);
    font-weight: 600;
    padding: 0.875rem 2rem;
    border-radius: 50px;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.btn-primary-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-hover);
    opacity: 0;
    transition: var(--transition-normal);
}

.btn-primary-gradient:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
    color: var(--text-primary);
}

.btn-primary-gradient:hover::before {
    opacity: 1;
}

.btn-primary-gradient span,
.btn-primary-gradient i {
    position: relative;
    z-index: 1;
}

.btn-outline-custom {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    font-weight: 600;
    padding: 0.875rem 2rem;
    border-radius: 50px;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-normal);
}

.btn-outline-custom:hover {
    border-color: var(--primary-purple);
    color: var(--text-primary);
    background: rgba(139, 92, 246, 0.1);
    transform: translateY(-3px);
}

/* =====================================================
   Sections
   ===================================================== */
.section {
    padding: var(--section-padding);
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    padding: 0.5rem 1rem;
    margin-bottom: 1rem;
}

.section-badge i {
    color: var(--primary-pink);
}

.section-badge span {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
}

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

/* =====================================================
   Features Section
   ===================================================== */
.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    height: 100%;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: var(--transition-normal);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-lg);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.feature-icon i {
    font-size: 1.5rem;
    color: var(--text-primary);
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 0;
}

/* =====================================================
   Rules Section
   ===================================================== */
.rules-section {
    background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-card) 50%, var(--bg-dark) 100%);
}

.rule-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: var(--transition-normal);
}

.rule-card:hover {
    border-color: var(--border-hover);
    transform: translateX(5px);
}

.rule-number {
    width: 36px;
    height: 36px;
    background: var(--gradient-primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.rule-content h4 {
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
}

.rule-content p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.9375rem;
}

/* Accordion Styles */
.accordion-custom .accordion-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px !important;
    margin-bottom: 1rem;
    overflow: hidden;
}

.accordion-custom .accordion-button {
    background: var(--bg-card);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.125rem;
    padding: 1.25rem 1.5rem;
    box-shadow: none;
}

.accordion-custom .accordion-button:not(.collapsed) {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.accordion-custom .accordion-button::after {
    filter: brightness(0) invert(1);
}

.accordion-custom .accordion-button:focus {
    box-shadow: none;
    border-color: var(--border-hover);
}

.accordion-custom .accordion-body {
    background: var(--bg-card);
    color: var(--text-secondary);
    padding: 0 1.5rem 1.25rem;
}

.accordion-custom .accordion-body ul {
    padding-left: 1.25rem;
    margin: 0;
}

.accordion-custom .accordion-body li {
    margin-bottom: 0.5rem;
}

/* =====================================================
   Factions Section
   ===================================================== */
.faction-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition-normal);
    height: 100%;
}

.faction-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-glow);
}

.faction-card.pd:hover {
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.3);
}

.faction-card.ems:hover {
    box-shadow: 0 0 30px rgba(34, 197, 94, 0.3);
}

.faction-card.gang:hover {
    box-shadow: var(--shadow-glow-pink);
}

.faction-image {
    height: 200px;
    position: relative;
    overflow: hidden;
}

.faction-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.faction-card:hover .faction-image img {
    transform: scale(1.1);
}

.faction-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background: linear-gradient(transparent, var(--bg-card));
}

.faction-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.375rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.faction-badge.pd {
    background: rgba(59, 130, 246, 0.2);
    color: #3B82F6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.faction-badge.ems {
    background: rgba(34, 197, 94, 0.2);
    color: #22C55E;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.faction-badge.gang {
    background: rgba(236, 72, 153, 0.2);
    color: var(--primary-pink);
    border: 1px solid rgba(236, 72, 153, 0.3);
}

.faction-content {
    padding: 1.5rem;
}

.faction-content h3 {
    font-size: 1.375rem;
    margin-bottom: 0.75rem;
}

.faction-content p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-bottom: 1rem;
}

.faction-stats {
    display: flex;
    gap: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.stat {
    text-align: center;
}

.stat-value {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--text-primary);
    display: block;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* =====================================================
   Whitelist Section
   ===================================================== */
.whitelist-section {
    position: relative;
}

.whitelist-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.whitelist-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 0% 0%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 100% 100%, rgba(236, 72, 153, 0.1) 0%, transparent 50%);
    z-index: 0;
}

.whitelist-content {
    position: relative;
    z-index: 1;
}

.step-card {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    background: rgba(10, 10, 15, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: var(--transition-normal);
}

.step-card:hover {
    border-color: var(--border-hover);
    transform: translateX(5px);
}

.step-number {
    width: 48px;
    height: 48px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.step-content h4 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.step-content p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.9375rem;
}

/* =====================================================
   Footer
   ===================================================== */
.footer {
    background: var(--bg-card);
    padding: 4rem 0 2rem;
    position: relative;
    overflow: hidden;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
    filter: drop-shadow(0 0 15px rgba(139, 92, 246, 0.6));
    transition: var(--transition-normal);
}

.footer-brand:hover .footer-logo {
    filter: drop-shadow(0 0 25px rgba(236, 72, 153, 0.8));
    transform: scale(1.1);
}

.footer-brand-text {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.footer-brand .logo-text {
    font-size: 1.5rem;
}

.footer-brand .logo-rp {
    font-size: 1rem;
}

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

.footer-links {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-secondary);
    font-weight: 500;
}

.footer-links a:hover {
    color: var(--text-primary);
}

.social-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

@media (min-width: 992px) {
    .social-links {
        justify-content: flex-end;
    }
}

.social-link {
    color: var(--text-secondary);
    font-size: 1.1rem;
    transition: var(--transition-normal);
    text-decoration: none;
    opacity: 0.8;
}

.social-link:hover {
    color: var(--text-primary);
    opacity: 1;
}

.social-tagline {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.footer-divider {
    border-color: var(--border-color);
    margin: 2rem 0;
}

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

.copyright .separator {
    margin: 0 0.75rem;
    color: var(--border-color);
}

.copyright .fa-heart {
    color: var(--primary-pink);
}

.footer-glow {
    position: absolute;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 200px;
    background: var(--gradient-glow);
    filter: blur(100px);
    opacity: 0.3;
    pointer-events: none;
}

/* =====================================================
   Page Headers
   ===================================================== */
.page-header {
    padding: 160px 0 80px;
    position: relative;
    overflow: hidden;
}

.page-header-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(135deg, rgba(10, 10, 15, 0.85) 0%, rgba(10, 10, 15, 0.7) 100%),
        radial-gradient(ellipse at 30% 30%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 70%, rgba(236, 72, 153, 0.1) 0%, transparent 50%);
    background-size: cover;
    background-position: center;
    z-index: 0;
}

/* Specific backgrounds for different pages */
.page-whitelist .page-header-bg {
    background: 
        linear-gradient(135deg, rgba(10, 10, 15, 0.85) 0%, rgba(10, 10, 15, 0.7) 100%),
        url('/assets/images/allowlist-bg.jpg') center center / cover no-repeat;
}

.page-rules .page-header-bg {
    background: 
        linear-gradient(135deg, rgba(10, 10, 15, 0.85) 0%, rgba(10, 10, 15, 0.7) 100%),
        url('/assets/images/rules-bg.jpg') center center / cover no-repeat;
}

.page-header-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.page-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1rem;
}

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

/* =====================================================
   CTA Section
   ===================================================== */
.cta-section {
    padding: 100px 0;
    position: relative;
    overflow: hidden;
    background-color: var(--bg-dark);
}

.cta-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    opacity: 0.1;
}

.cta-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.cta-title {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
}

.cta-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* =====================================================
   Utilities
   ===================================================== */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glow-effect {
    filter: drop-shadow(0 0 20px rgba(139, 92, 246, 0.5));
}

/* =====================================================
   Responsive Styles
   ===================================================== */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background: var(--bg-navbar);
        padding: 1rem;
        border-radius: 12px;
        margin-top: 1rem;
    }
    
    .discord-status {
        margin-top: 1rem;
        justify-content: center;
        display: flex;
    }
    
    .hero {
        padding: 140px 0 60px;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .whitelist-card {
        padding: 2rem;
    }
}

@media (max-width: 767.98px) {
    .footer-links {
        gap: 1rem;
    }
    
    .step-card {
        flex-direction: column;
        text-align: center;
    }
    
    .step-number {
        margin: 0 auto;
    }
    
    .faction-stats {
        justify-content: center;
    }
}

@media (max-width: 575.98px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .faction-content {
        padding: 1rem;
    }
}

/* =====================================================
   New Faction System Styles
   ===================================================== */

/* Faction Card New Style */
.faction-card-new {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition-normal);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.faction-card-new:hover {
    transform: translateY(-5px);
    border-color: var(--faction-color, var(--primary-purple));
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 0 0 20px color-mix(in srgb, var(--faction-color, var(--primary-purple)) 20%, transparent);
}

.faction-card-header {
    padding: 1.5rem 1.5rem 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.faction-badge-card {
    background: var(--faction-color, var(--primary-purple));
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.official-badge {
    color: #FBBF24;
    font-size: 1rem;
}

.faction-card-body {
    padding: 1.25rem 1.5rem;
    flex-grow: 1;
}

.faction-card-body h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.faction-card-body p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0;
}

.faction-card-footer {
    padding: 1rem 1.5rem 1.5rem;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.faction-stats-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.faction-stats-row .stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.faction-stats-row .stat-item i {
    color: var(--faction-color, var(--primary-purple));
}

.recruitment-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.btn-faction {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: transparent;
    border: 1px solid var(--faction-color, var(--primary-purple));
    color: var(--faction-color, var(--primary-purple));
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition-normal);
}

.btn-faction:hover {
    background: var(--faction-color, var(--primary-purple));
    color: white;
}

/* Faction Badge Sizes */
.faction-badge-small {
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 0.75rem;
    color: white;
    letter-spacing: 0.5px;
}

.faction-badge-large {
    padding: 0.75rem 1.25rem;
    border-radius: 10px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 1rem;
    letter-spacing: 1px;
}

.faction-badge-xl {
    padding: 1rem 2rem;
    border-radius: 12px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 1.5rem;
    color: white;
    letter-spacing: 2px;
}

/* My Faction Card */
.my-faction-card {
    display: block;
    padding: 1rem;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    transition: var(--transition-normal);
}

.my-faction-card:hover {
    border-color: var(--primary-purple);
    color: var(--text-primary);
    transform: translateX(5px);
}

/* Member List */
.member-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.member-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--bg-dark);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.member-item:hover {
    border-color: var(--primary-purple);
}

/* Member Role Badges */
.member-role-leader {
    background: linear-gradient(135deg, #FBBF24 0%, #F59E0B 100%);
    color: #000;
}

.member-role-co_leader {
    background: linear-gradient(135deg, #A78BFA 0%, #8B5CF6 100%);
    color: white;
}

.member-role-officer {
    background: linear-gradient(135deg, #60A5FA 0%, #3B82F6 100%);
    color: white;
}

.member-role-member {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

/* Status Indicators */
.status-indicator-large {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.status-indicator-large.active {
    background: #22C55E;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
}

.status-indicator-large.inactive {
    background: #6B7280;
}

/* Application Item */
.application-item {
    padding: 1.25rem;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.application-item:hover {
    border-color: var(--primary-purple);
}

/* Search Result Item */
.search-result-item:hover {
    background: var(--bg-card-hover) !important;
    border: 1px solid var(--border-color);
}

/* =====================================================
   Form Controls - Dark Theme Fix
   ===================================================== */
.form-control,
.form-select {
    background: var(--bg-dark) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

.form-control::placeholder {
    color: var(--text-muted) !important;
}

.form-control:focus,
.form-select:focus {
    background: var(--bg-dark) !important;
    border-color: var(--primary-purple) !important;
    color: var(--text-primary) !important;
    box-shadow: 0 0 0 0.25rem rgba(139, 92, 246, 0.25) !important;
}

.form-label {
    color: var(--text-primary) !important;
}

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

.form-check-label {
    color: var(--text-primary) !important;
}

/* Table Styling - Dark Theme */
.table-dark {
    --bs-table-bg: var(--bg-dark);
    --bs-table-color: var(--text-primary);
    --bs-table-border-color: var(--border-color);
    --bs-table-hover-bg: var(--bg-card-hover);
    --bs-table-hover-color: var(--text-primary);
}

.table-dark thead th {
    color: var(--text-secondary);
    background: var(--bg-card);
    border-bottom-color: var(--border-color);
}

.table-dark tbody td {
    color: var(--text-primary);
}

/* Modal Styling - Fix z-index and backdrop issues */
.modal {
    z-index: 1055 !important;
}

.modal-backdrop {
    z-index: 1050 !important;
    background-color: rgba(0, 0, 0, 0.7) !important;
}

.modal-backdrop.show {
    opacity: 1 !important;
}

.modal.show {
    z-index: 1055 !important;
}

.modal-dialog {
    z-index: 1056 !important;
    position: relative;
    pointer-events: auto;
}

.modal-content {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    position: relative;
    z-index: 1057 !important;
    pointer-events: auto;
}

.modal-header {
    border-bottom-color: var(--border-color) !important;
}

.modal-footer {
    border-top-color: var(--border-color) !important;
}

.modal-title {
    color: var(--text-primary) !important;
}

.modal-body {
    color: var(--text-primary) !important;
}

.modal-body p,
.modal-body label,
.modal-body strong {
    color: var(--text-primary) !important;
}

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

/* Ensure form select dropdown has proper colors */
.form-select option {
    background: var(--bg-dark);
    color: var(--text-primary);
}

/* Alert styling in modals */
.modal .alert {
    color: inherit;
}

/* Fix for modals nested inside cards - remove stacking context */
.card,
.whitelist-card,
.feature-card {
    position: relative;
    z-index: auto !important;
    transform: none !important;
}

/* Ensure modal is always on top and clickable */
body.modal-open {
    overflow: hidden;
}

body.modal-open .modal {
    overflow-x: hidden;
    overflow-y: auto;
}

.modal.show .modal-dialog {
    pointer-events: auto;
}

.modal .btn,
.modal button,
.modal input,
.modal textarea,
.modal select,
.modal a {
    pointer-events: auto !important;
    position: relative;
    z-index: 1;
}

/* =====================================================
   Text Color Fixes for Dark Theme
   ===================================================== */

/* Make text-muted and text-secondary more readable */
.text-muted {
    color: #9CA3AF !important;
}

.text-secondary {
    color: #B4B4B4 !important;
}

/* Card text colors */
.card,
.card-body {
    color: var(--text-primary);
}

.card h6,
.card .h6 {
    color: var(--text-primary) !important;
}

.card small.text-muted {
    color: #9CA3AF !important;
}

/* Whitelist card text */
.whitelist-card,
.whitelist-content {
    color: var(--text-primary);
}

/* Ensure all paragraph text is white */
p {
    color: var(--text-primary);
}

/* Strong/bold text */
strong, b {
    color: var(--text-primary);
}

/* Date text in cards */
.card-body .col-md-2 {
    color: var(--text-primary);
}

/* Admin section specific fixes */
.admin-text,
.card-body > div {
    color: var(--text-primary);
}

/* Fix h6 headers */
h6, .h6 {
    color: var(--text-primary);
}

/* Ensure date displays are readable */
.card-body small.text-muted + br + span,
.card-body small.text-muted ~ *:not(.text-muted):not(.badge) {
    color: var(--text-primary);
}
