/* Gaming Legion DACH - Main Stylesheet */

/* CSS Variables */
:root {
    --color-black: #000000;
    --color-white: #FFFFFF;
    --color-red: #C41E3A;
    --color-red-dark: #9A1829;
    --color-gray-dark: #1a1a1a;
    --color-gray: #2a2a2a;
    --color-gray-light: #3a3a3a;
    --color-text: #e0e0e0;
    --color-text-muted: #999999;

    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'Outfit', 'Inter', sans-serif;

    --transition: all 0.3s ease;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    background: linear-gradient(135deg, var(--color-black) 0%, var(--color-gray-dark) 100%);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3rem;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 2rem;
}

a {
    color: var(--color-red);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--color-white);
}

img {
    max-width: 100%;
    height: auto;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Navigation */
.navbar {
    background: rgba(20, 20, 20, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 0.8rem 2rem;
    position: sticky;
    top: 1.5rem;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    width: 95%;
    max-width: 1400px;
    margin: 1.5rem auto 0 auto;
    transition: var(--transition);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    padding: 0;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
    z-index: 2;
}

.nav-brand:hover {
    opacity: 0.8;
}

.logo {
    height: 50px;
    width: auto;
}

.brand-name {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-white);
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.nav-collapse {
    display: contents;
    /* On desktop, essentially ignored so children position freely */
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    align-items: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.nav-link {
    color: var(--color-text);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: var(--transition);
    position: relative;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-white);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--color-red);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 20px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 2;
}

.btn-nav-login {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-white);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.btn-nav-login:hover {
    color: var(--color-red);
}

/* Burger Menu (Mobile) */
.burger-menu {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.burger-menu span {
    width: 25px;
    height: 3px;
    background: var(--color-white);
    border-radius: 3px;
    transition: var(--transition);
}

.burger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.burger-menu.active span:nth-child(2) {
    opacity: 0;
}

.burger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* User Menu */
.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--color-red);
    object-fit: cover;
    transition: var(--transition);
}

.user-avatar:hover {
    border-color: var(--color-white);
    transform: scale(1.05);
}

.user-name {
    color: var(--color-white);
    font-weight: 600;
    display: none;
    /* Hidden on desktop, shown on mobile */
}

.user-avatar {
    width: 45px;
    height: 45px;
}

/* Mobile Responsive */
@media (max-width: 900px) {
    .burger-menu {
        display: flex;
    }

    .nav-collapse {
        display: flex;
        position: fixed;
        top: 2rem;
        right: -100%;
        width: 300px;
        height: max-content;
        max-height: calc(100vh - 4rem);
        background: rgba(20, 20, 20, 0.98);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 16px;
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: flex-start;
        padding: 2rem;
        gap: 1.5rem;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -10px 10px 40px rgba(0, 0, 0, 0.6);
        overflow-y: auto;
        z-index: 999;
    }

    .nav-collapse.active {
        right: 2rem;
    }

    .nav-menu {
        position: static;
        transform: none;
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        gap: 1rem;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-link {
        display: block;
        width: 100%;
        padding: 0.75rem 1rem;
    }

    .nav-right {
        margin-left: 0;
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding-top: 1.5rem;
        gap: 1.5rem;
    }

    .user-menu {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }

    .user-profile {
        width: 100%;
    }

    .user-name {
        display: block;
        /* Show username on mobile */
        font-size: 0.9rem;
    }

    .user-menu .btn {
        width: 100%;
    }
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-red) 0%, var(--color-red-dark) 100%);
    color: var(--color-white);
    box-shadow: 0 4px 15px rgba(196, 30, 58, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(196, 30, 58, 0.6);
}

.btn-secondary {
    background: var(--color-gray-light);
    color: var(--color-white);
}

.btn-secondary:hover {
    background: var(--color-gray);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--color-red);
    color: var(--color-red);
}

.btn-outline:hover {
    background: var(--color-red);
    color: var(--color-white);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-discord {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: #5865F2;
    color: var(--color-white);
    box-shadow: 0 4px 15px rgba(88, 101, 242, 0.4);
}

.btn-discord:hover {
    background: #4752C4;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(88, 101, 242, 0.6);
    color: var(--color-white);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1rem;
}


/* Messages */
.messages-container {
    position: fixed;
    top: 80px;
    right: 2rem;
    z-index: 2000;
    max-width: 400px;
}

.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.alert-success {
    background: #10b981;
    color: white;
}

.alert-error {
    background: #ef4444;
    color: white;
}

.alert-info {
    background: #3b82f6;
    color: white;
}

/* Hero Section */
.hero {
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.8) 100%),
        url('../images/hero_bg.png') center/cover no-repeat;
    padding: 8rem 0 6rem 0;
    text-align: center;
    border-radius: 0;
    /* Remove border-radius to stretch full width but let's keep it wrapped in main or stretch */
    margin: -100px 0 2rem 0;
    /* Pull up underneath navbar */
    min-height: 80vh;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 1;
    /* Below navbar */
}

.main-content {
    min-height: calc(100vh - 200px);
    padding: 0;
    /* Removed padding to allow hero to stretch */
}

.hero .container {
    position: relative;
    z-index: 10;
    width: 100%;
}

.hero-title {
    font-size: 4.5rem;
    margin-bottom: 0.5rem;
    color: var(--color-white);
    line-height: 1.1;
}

.hero-title-red {
    font-size: 4.5rem;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, var(--color-red), #ff4d4d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--color-text);
    max-width: 800px;
    margin: 0 auto 3rem;
    font-weight: 400;
}

/* Discord Hero Button */
.btn-hero-discord {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(196, 30, 58, 0.1);
    color: var(--color-white);
    border: 1px solid rgba(196, 30, 58, 0.5);
    box-shadow: 0 0 20px rgba(196, 30, 58, 0.3), inset 0 0 20px rgba(196, 30, 58, 0.1);
    backdrop-filter: blur(5px);
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1.125rem;
    font-weight: 600;
    transition: var(--transition);
    text-decoration: none;
}

.btn-hero-discord:hover {
    background: rgba(196, 30, 58, 0.2);
    box-shadow: 0 0 30px rgba(196, 30, 58, 0.5), inset 0 0 30px rgba(196, 30, 58, 0.2);
    border-color: var(--color-red);
    color: var(--color-white);
    transform: translateY(-2px);
}

/* Featured News */
.featured-news {
    margin: 3rem 0;
}

.featured-card {
    background: rgba(30, 30, 35, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    transition: var(--transition);
}

.featured-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
}

.featured-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.badge {
    display: inline-block;
    background: rgba(196, 30, 58, 0.2);
    border: 1px solid rgba(196, 30, 58, 0.5);
    color: var(--color-white);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
    width: fit-content;
    backdrop-filter: blur(5px);
}

/* Section Title */
.section-title {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--color-white);
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.news-card {
    background: rgba(30, 30, 35, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
}

.news-image-wrapper {
    position: relative;
    width: 100%;
    height: 220px;
}

.news-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-date-badge {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-white);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.news-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.news-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.news-meta {
    color: var(--color-text-muted);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    display: none;
    /* Hide since date is on image */
}

.news-excerpt {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.news-content .btn {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--color-text);
}

.news-content .btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-white);
}

/* Footer */
.footer {
    background: var(--color-black);
    padding: 2rem 0;
    text-align: center;
    border-top: 2px solid var(--color-red);
    margin-top: 4rem;
}

.footer p {
    color: var(--color-text-muted);
    margin: 0.5rem 0;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.empty-state {
    text-align: center;
    color: var(--color-text-muted);
    padding: 3rem;
    font-size: 1.125rem;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-menu {
        flex-direction: column;
        gap: 1rem;
    }

    .featured-card {
        grid-template-columns: 1fr;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.5rem;
    }
}