@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700;800;900&family=Outfit:wght@300;400;600;800&display=swap&subset=latin-ext');

:root {
    --primary: #0A0A0A;
    --secondary: #121212;
    --surface: #171717;
    
    /* Dynamic Red Palette */
    --red-dark: #7f1d1d;    /* Deep Crimson */
    --red-base: #dc2626;    /* Solid Core Red */
    --red-light: #ff4d4d;   /* Neon Bright Red */
    
    /* Glows */
    --glow-dark: rgba(127, 29, 29, 0.5);
    --glow-base: rgba(220, 38, 38, 0.4);
    --glow-light: rgba(255, 77, 77, 0.3);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--red-dark), var(--red-base));
    --gradient-vibrant: linear-gradient(135deg, #b91c1c 0%, #dc2626 50%, #f87171 100%);
    --gradient-glow: linear-gradient(90deg, var(--red-dark), var(--red-base), var(--red-dark));
    
    --text: #F3F4F6;
    --text-muted: #9CA3AF;
    --glass: rgba(23, 23, 23, 0.8);
    --glass-border: rgba(255, 255, 255, 0.05);
}

/* Global Reset & Typography */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--primary);
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.6;
    position: relative;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1, h2, h3 {
    font-family: 'Montserrat', sans-serif;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Fixed Background - Optimized */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(rgba(10, 10, 10, 0.85), rgba(10, 10, 10, 0.98)), url('../assets/noxus_legal_hero_bg.png');
    background-size: cover;
    background-position: center;
    z-index: -10;
    pointer-events: none;
    transform: translateZ(0); /* Force GPU */
    will-change: opacity;
}

@keyframes bgZoom {
    from { transform: scale(1.1); }
    to { transform: scale(1); }
}

/* Form Elements Modernization */
select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='rgba(255,255,255,0.5)'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 14px;
    padding-right: 45px !important;
    cursor: pointer;
    transition: all 0.3s ease;
}

select:hover {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

select option {
    background-color: #121212;
    color: #fff;
    padding: 15px;
    border: none;
}

/* For Chrome/Edge/Safari, this helps a bit */
select::-ms-expand {
    display: none;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--primary); }
::-webkit-scrollbar-thumb { background: var(--gradient-primary); border-radius: 10px; }

/* Utilities */
.glass {
    background: rgba(20, 20, 20, 0.98); /* More solid to prevent background bleed */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
}

.glass-simple {
    background: rgba(23, 23, 23, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
}



.text-gradient {
    background: linear-gradient(135deg, #b91c1c 0%, #dc2626 25%, #f87171 50%, #dc2626 75%, #b91c1c 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    padding: 0.15em 0; /* Extra space for dots and accents */
    line-height: 1.2;
    filter: drop-shadow(0 0 10px rgba(220, 38, 38, 0.25)); /* Enhanced subtle glow */
    animation: gradientFlow 4s linear infinite;
}

@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: all 0.3s ease;
    background: rgba(10, 10, 10, 0.5);
    border-bottom: 1px solid transparent;
}

nav.scrolled {
    padding: 12px 60px;
    background: rgba(15, 15, 15, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.logo-container { display: flex; align-items: center; gap: 12px; }
.nav-logo { height: 45px; filter: drop-shadow(0 0 8px var(--glow-base)); transition: 0.3s; }
nav.scrolled .nav-logo { height: 38px; }
.logo-text { display: flex; flex-direction: column; }
.main-logo { font-size: 1.4rem; font-weight: 800; color: var(--red-base); line-height: 1; letter-spacing: 1.5px; }
.sub-logo { font-size: 0.65rem; text-transform: uppercase; color: var(--text-muted); letter-spacing: 0.8px; }

.nav-links { display: flex; gap: 35px; }
.nav-links a {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    padding: 8px 0;
}
.nav-links a::after {
    content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 0; height: 3px; background: var(--red-base); transition: 0.3s;
    box-shadow: 0 0 15px var(--red-base); border-radius: 10px;
}
.nav-links a:hover, .nav-links a.active { color: var(--red-base); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.discord-btn {
    background: var(--red-base);
    color: white;
    padding: 10px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: 0.4s;
    box-shadow: 0 4px 15px var(--glow-base);
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.discord-btn:hover { background: var(--red-light); transform: translateY(-3px); box-shadow: 0 8px 25px var(--glow-light); }

/* User Dropdown */
.user-dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

.user-menu {
    position: absolute;
    top: 100%; /* Align directly to the bottom of the button */
    right: 0;
    width: 200px;
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 10px;
    display: none;
    flex-direction: column;
    gap: 5px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    z-index: 2000;
    margin-top: 10px; /* Visual gap instead of physical top gap */
}

/* Invisible bridge to keep hover state */
.user-dropdown::after {
    content: '';
    position: absolute;
    bottom: -25px;
    left: 0;
    width: 100%;
    height: 25px;
}

.user-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 25px;
    width: 12px;
    height: 12px;
    background: rgba(15, 15, 15, 0.95);
    border-left: 1px solid var(--glass-border);
    border-top: 1px solid var(--glass-border);
    transform: rotate(45deg);
}

.user-dropdown:hover .user-menu {
    display: flex;
    animation: fadeInDown 0.3s ease;
}

.dropdown-item {
    padding: 12px 15px;
    border-radius: 10px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: 0.3s;
}

.dropdown-item i {
    font-size: 1rem;
    color: var(--red-base);
}

.dropdown-item:hover {
    background: rgba(220, 38, 38, 0.1);
    color: white;
    transform: translateX(5px);
}

.dropdown-divider {
    height: 1px;
    background: var(--glass-border);
    margin: 5px 0;
}

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

/* Common Buttons */
.btn {
    padding: 15px 35px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    transition: 0.4s;
    letter-spacing: 1px;
    display: inline-block;
}

.btn-primary { background: var(--gradient-primary); color: white; box-shadow: 0 0 20px var(--glow-base); border: none; }
.btn-primary:hover { transform: translateY(-5px); box-shadow: 0 10px 30px var(--glow-light); }

.btn-secondary {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-secondary::before {
    content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
    background: var(--gradient-primary); transition: 0.5s; z-index: -1;
}

.btn-secondary:hover::before { left: 0; }
.btn-secondary:hover { border-color: transparent; transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4); }

/* Common Sections */
.page-header {
    padding: 180px 10% 80px;
    background: linear-gradient(to bottom, rgba(10, 10, 10, 0.6), transparent);
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.page-header h1 {
    font-size: 4rem;
    margin-bottom: 15px;
    font-weight: 800;
    letter-spacing: -2px;
}

section { padding: 100px 10%; }
.section-header { text-align: center; margin-bottom: 60px; }
.section-header h2 { font-size: 3rem; margin-bottom: 12px; font-weight: 800; }
.section-header p { color: var(--text-muted); }

/* Common Cards */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, 280px);
    gap: 30px;
    justify-content: center;
    width: 100%;
}

.card {
    padding: 40px;
    background: var(--surface);
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    border-top: 3px solid var(--red-base);
}

.card:hover {
    transform: translateY(-12px);
    border-top-color: var(--red-light);
    background: rgba(255, 255, 255, 0.01);
}

/* Footer */
footer {
    padding: 20px 5%;
    background: rgba(15, 15, 15, 0.4);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: auto; /* Pushes footer to the bottom in a flex container */
    width: 100%;
}

.footer-content { display: flex; justify-content: space-between; align-items: center; max-width: 1400px; margin: 0 auto; }
.footer-center { text-align: center; }
.footer-center p { color: var(--text-muted); font-size: 0.85rem; margin: 2px 0; }
.powered-by { font-size: 0.75rem !important; opacity: 0.7; }
.powered-by span { color: var(--red-light); font-weight: 800; letter-spacing: 1px; }
.footer-right { display: flex; gap: 15px; }
.social-icon { color: var(--text-muted); font-size: 1.5rem; transition: 0.3s; }
.social-icon:hover { color: var(--red-light); transform: translateY(-3px); filter: drop-shadow(0 0 10px var(--glow-light)); }

/* Common Animations */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInRight { from { opacity: 0; transform: translateX(50px); } to { opacity: 1; transform: translateX(0); } }

@media (max-width: 768px) {
    nav { padding: 10px 20px; }
    .nav-links { display: none; }
    .footer-content { flex-direction: column; gap: 20px; text-align: center; }
}
