* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Light mode - Bastion inspired */
    --primary-bg: #f5f8fc;
    --secondary-bg: rgba(255, 255, 255, 0.85);
    --accent-bg: rgba(232, 242, 255, 0.8);
    --primary-teal: #3d7ba8;
    --secondary-teal: #4a90c2;
    --primary-blue: #6ba3d6;
    --secondary-blue: #4a90c2;
    --text-dark: #1a1f2e;
    --text-muted: #5a6c7d;
    --border-color: #d1dce6;
    --shadow-light: rgba(107, 163, 214, 0.1);
    --gradient-primary: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(232, 242, 255, 0.85) 100%);
    --gradient-accent: linear-gradient(135deg, #3d7ba8 0%, #4a90c2 100%);
    --gradient-blue: linear-gradient(135deg, #6ba3d6 0%, #4a90c2 100%);
}

[data-theme="dark"] {
    /* Dark mode */
    --primary-bg: #0a0e1a;
    --secondary-bg: rgba(26, 31, 46, 0.85);
    --accent-bg: rgba(42, 52, 65, 0.8);
    --primary-teal: #7bb3d9;
    --secondary-teal: #6ba3d6;
    --primary-blue: #6ba3d6;
    --secondary-blue: #4a90c2;
    --text-dark: #e8e9ed;
    --text-muted: #a8b2c8;
    --border-color: #3a4553;
    --shadow-light: rgba(123, 179, 217, 0.1);
    --gradient-primary: linear-gradient(135deg, rgba(26, 31, 46, 0.9) 0%, rgba(42, 52, 65, 0.85) 100%);
    --gradient-accent: linear-gradient(135deg, #7bb3d9 0%, #6ba3d6 100%);
    --gradient-blue: linear-gradient(135deg, #6ba3d6 0%, #4a90c2 100%);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--primary-bg);
    color: var(--text-dark);
    line-height: 1.6;
    position: relative;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Bastion background overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg,
            rgba(134, 158, 184, 0.4) 0%,
            rgba(160, 180, 200, 0.3) 20%,
            rgba(180, 195, 210, 0.25) 40%,
            rgba(200, 210, 220, 0.2) 60%,
            rgba(220, 225, 235, 0.15) 80%,
            rgba(240, 245, 250, 0.1) 100%);
    z-index: -1;
    pointer-events: none;
}

[data-theme="dark"] body::before {
    background:
        radial-gradient(circle at 20% 30%, rgba(107, 163, 214, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(90, 155, 196, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 70%, rgba(74, 144, 194, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(123, 179, 217, 0.06) 0%, transparent 50%),
        linear-gradient(135deg,
            rgba(107, 163, 214, 0.03) 0%,
            rgba(90, 155, 196, 0.05) 25%,
            rgba(74, 144, 194, 0.02) 50%,
            rgba(123, 179, 217, 0.04) 75%,
            rgba(107, 163, 214, 0.02) 100%);
}

/* Navigation */
nav {
    background: var(--secondary-bg);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 2px solid var(--border-color);
    backdrop-filter: blur(20px);
    box-shadow: 0 2px 20px var(--shadow-light);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 6px;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-teal);
    background: var(--shadow-light);
    transform: translateY(-1px);
}

/* Theme toggle button */
.theme-toggle {
    background: var(--gradient-blue);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 1rem;
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px var(--shadow-light);
}

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

/* Main content */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Hero section */
.hero {
    text-align: center;
    padding: 4rem 0;
    background: var(--gradient-primary);
    border-radius: 16px;
    margin: 2rem 0;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 32px var(--shadow-light);
    position: relative;
    overflow: hidden;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
}

.hero .subtitle {
    font-size: 1.3rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.hero .guild-info {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.guild-stat {
    text-align: center;
}

.guild-stat .number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-teal);
    display: block;
}

.guild-stat .label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Page sections */
.page {
    display: none;
    padding: 2rem 0;
}

.page.active {
    display: block;
}

.section {
    background: var(--gradient-primary);
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem 0;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px var(--shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.section:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--shadow-light);
}

.section h2 {
    color: var(--primary-teal);
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.section h3 {
    color: var(--primary-blue);
    margin-top: 2rem;
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    background: var(--accent-bg);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-dark);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(107, 163, 214, 0.1);
    transform: translateY(-1px);
}

.btn {
    background: var(--gradient-blue);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px var(--shadow-light);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(107, 163, 214, 0.3);
}

.btn:active {
    transform: translateY(-1px);
}

/* Events */
.event-card {
    background: var(--accent-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1rem 0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.event-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-blue);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.event-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary-blue);
    box-shadow: 0 8px 25px var(--shadow-light);
}

.event-card:hover::before {
    transform: scaleY(1);
}

.event-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.event-title {
    color: var(--primary-teal);
    font-size: 1.2rem;
    font-weight: bold;
}

.event-date {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.event-type {
    background: var(--gradient-blue);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(107, 163, 214, 0.3);
}

/* Grid layout for recruitment form */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-grid .form-group.full-width {
    grid-column: 1/-1;
}

/* Responsive design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--secondary-bg);
        flex-direction: column;
        padding: 1rem;
        border-top: 1px solid var(--border-color);
    }

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

    .menu-toggle {
        display: block;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero .guild-info {
        gap: 1.5rem;
    }

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

    .event-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    main {
        padding: 0 1rem;
    }
}