/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600;700&family=Crimson+Text:ital,wght@0,400;0,600;1,400&display=swap');

/* CSS Custom Properties */
:root {
    --background: 0 0% 100%;
    --foreground: 222.2 84% 4.9%;
    --card: 0 0% 100%;
    --card-foreground: 222.2 84% 4.9%;
    --popover: 0 0% 100%;
    --popover-foreground: 222.2 84% 4.9%;
    --primary: 262 83% 58%;
    --primary-foreground: 210 40% 98%;
    --secondary: 210 40% 96%;
    --secondary-foreground: 222.2 84% 4.9%;
    --muted: 210 40% 96%;
    --muted-foreground: 215.4 16.3% 46.9%;
    --accent: 210 40% 96%;
    --accent-foreground: 222.2 84% 4.9%;
    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 210 40% 98%;
    --border: 214.3 31.8% 91.4%;
    --input: 214.3 31.8% 91.4%;
    --ring: 262 83% 58%;
    --chart-1: 12 76% 61%;
    --chart-2: 173 58% 39%;
    --chart-3: 197 37% 24%;
    --chart-4: 43 74% 66%;
    --chart-5: 27 87% 67%;
    --radius: 0.75rem;
}

.dark {
    --background: 222.2 84% 4.9%;
    --foreground: 210 40% 98%;
    --card: 222.2 84% 4.9%;
    --card-foreground: 210 40% 98%;
    --popover: 222.2 84% 4.9%;
    --popover-foreground: 210 40% 98%;
    --primary: 262 83% 58%;
    --primary-foreground: 222.2 84% 4.9%;
    --secondary: 217.2 32.6% 17.5%;
    --secondary-foreground: 210 40% 98%;
    --muted: 217.2 32.6% 17.5%;
    --muted-foreground: 215 20.2% 65.1%;
    --accent: 217.2 32.6% 17.5%;
    --accent-foreground: 210 40% 98%;
    --destructive: 0 62.8% 30.6%;
    --destructive-foreground: 210 40% 98%;
    --border: 217.2 32.6% 17.5%;
    --input: 217.2 32.6% 17.5%;
    --ring: 262 83% 58%;
    --chart-1: 220 70% 50%;
    --chart-2: 160 60% 45%;
    --chart-3: 30 80% 55%;
    --chart-4: 280 65% 60%;
    --chart-5: 340 75% 55%;
}

@media (prefers-color-scheme: dark) {
    :root {
        --background: #0a0a0a;
        --foreground: #ededed;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    border-color: hsl(var(--border));
}

body {
    font-family: 'Crimson Text', serif;
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    min-height: 100vh;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(120, 119, 198, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(118, 75, 162, 0.1) 0%, transparent 50%);
}

/* Container */
.container {
    margin: 0 auto;
    padding: 0 1rem;
    max-width: 80rem;
    width: 100%;
}

@media (min-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 2rem;
    }
}

/* Fantasy Typography */
.fantasy-title {
    font-family: 'Cinzel', serif;
    font-weight: bold;
    letter-spacing: 0.025em;
}

.fantasy-text {
    font-family: 'Crimson Text', serif;
    line-height: 1.625;
}

/* Gaming Gradient */
.gaming-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Gaming Card */
.gaming-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    border: 2px solid rgba(214, 219, 220, 0.5);
    border-radius: 0.5rem;
    position: relative;
    background-image: 
        linear-gradient(45deg, transparent 49%, rgba(102, 126, 234, 0.1) 50%, transparent 51%),
        linear-gradient(-45deg, transparent 49%, rgba(118, 75, 162, 0.1) 50%, transparent 51%);
    background-size: 20px 20px;
}

/* Fantasy Card */
.fantasy-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    border: 2px solid;
    border-image: linear-gradient(45deg, #667eea, #764ba2, #667eea) 1;
    border-radius: 0.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.fantasy-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(118, 75, 162, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.fantasy-card > * {
    position: relative;
    z-index: 1;
}

/* Navigation */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 32px;
    background: hsl(var(--card) / 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid hsl(var(--border));
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    font-family: 'Cinzel', serif;
    font-size: 20px;
    font-weight: 600;
    color: hsl(var(--primary));
    letter-spacing: 0.025em;
}

.logo::before {
    content: "👑";
    margin-right: 8px;
    font-size: 20px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 32px;
    margin: 0;
}

.nav-links a {
    color: hsl(var(--muted-foreground));
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
    padding: 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-links a:hover {
    color: hsl(var(--primary));
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, hsl(var(--primary)), #9333EA);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.notification-btn, .theme-toggle-btn {
    background: none;
    border: none;
    color: hsl(var(--muted-foreground));
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 8px;
    border-radius: 6px;
}

.notification-btn:hover, .theme-toggle-btn:hover {
    color: hsl(var(--primary));
    background: hsl(var(--primary) / 0.1);
}

.theme-toggle-btn {
    font-size: 18px;
}

.profile-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(to right, hsl(var(--primary)), #9333EA);
    border: none;
    color: hsl(var(--primary-foreground));
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px hsl(var(--primary) / 0.3);
}

.join-guild-btn {
    background: linear-gradient(to right, hsl(var(--primary)), #9333EA);
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    color: hsl(var(--primary-foreground));
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.join-guild-btn:hover {
    background: linear-gradient(to right, #9333EA, hsl(var(--primary)));
    box-shadow: 0 4px 12px hsl(var(--primary) / 0.25);
    transform: translateY(-1px);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 100px 20px;
    position: relative;
}

.hero-badge {
    background: hsl(var(--primary) / 0.1);
    border: 1px solid hsl(var(--primary) / 0.3);
    padding: 12px 30px;
    border-radius: 25px;
    display: inline-block;
    margin-bottom: 40px;
    color: hsl(var(--muted-foreground));
    font-size: 14px;
}

.hero-badge::before, .hero-badge::after {
    content: "⚔️";
    margin: 0 10px;
}

.hero-title {
    font-size: 4.5rem;
    font-weight: bold;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    color: hsl(var(--foreground));
    font-family: 'Cinzel', serif;
    letter-spacing: 0.025em;
}

.hero-title .brand {
    background: linear-gradient(45deg, hsl(var(--primary)), #9966cc, #b19cd9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    color: hsl(var(--muted-foreground));
    font-size: 18px;
    margin-bottom: 10px;
    font-family: 'Cinzel', serif;
}

.hero-subtitle::before, .hero-subtitle::after {
    content: "⚜️";
    margin: 0 15px;
    color: hsl(var(--muted-foreground) / 0.6);
}

.hero-description {
    color: hsl(var(--muted-foreground));
    font-size: 16px;
    line-height: 1.6;
    max-width: 800px;
    margin: 40px auto 60px;
    font-family: 'Crimson Text', serif;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 80px;
}

.btn-primary {
    background: linear-gradient(45deg, hsl(var(--primary)), #9966cc);
    border: none;
    padding: 18px 40px;
    border-radius: 30px;
    color: hsl(var(--primary-foreground));
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Cinzel', serif;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px hsl(var(--primary) / 0.4);
}

.btn-secondary {
    background: hsl(var(--secondary) / 0.1);
    border: 2px solid hsl(var(--border));
    padding: 16px 40px;
    border-radius: 30px;
    color: hsl(var(--foreground));
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(10px);
    font-family: 'Cinzel', serif;
}

.btn-secondary:hover {
    background: hsl(var(--secondary) / 0.2);
    border-color: hsl(var(--primary) / 0.5);
    transform: translateY(-3px);
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.stat-card {
    background: hsl(var(--card) / 0.8);
    border: 1px solid hsl(var(--border));
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(45deg, hsl(var(--primary)), #9966cc);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover {
    background: hsl(var(--card) / 0.9);
    border-color: hsl(var(--primary) / 0.3);
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-icon {
    font-size: 48px;
    margin-bottom: 20px;
    color: hsl(var(--primary));
}

.stat-title {
    font-size: 18px;
    font-weight: bold;
    color: hsl(var(--muted-foreground));
    margin-bottom: 10px;
    font-family: 'Cinzel', serif;
}

.stat-value {
    font-size: 32px;
    font-weight: bold;
    color: hsl(var(--primary));
    margin-bottom: 5px;
    font-family: 'Cinzel', serif;
}

/* Animations */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.hero-badge {
    animation: float 3s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px hsl(var(--primary) / 0.3); }
    50% { box-shadow: 0 0 40px hsl(var(--primary) / 0.6); }
}

.btn-primary:hover {
    animation: glow 2s ease-in-out infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        padding: 15px 20px;
        flex-direction: column;
        gap: 20px;
    }

    .nav-links {
        gap: 20px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Parchment Background Pattern */
.parchment-bg {
    background: 
        linear-gradient(45deg, rgba(102, 126, 234, 0.05) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(118, 75, 162, 0.05) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(102, 126, 234, 0.05) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(118, 75, 162, 0.05) 75%);
    background-size: 30px 30px;
    background-position: 0 0, 0 15px, 15px -15px, -15px 0px;
}

/* Ornate Divider */
.ornate-divider {
    background: linear-gradient(90deg, transparent, #667eea, #764ba2, #667eea, transparent);
    height: 2px;
    position: relative;
}

.ornate-divider::before {
    content: '❦';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    color: #667eea;
    font-size: 16px;
}