/* ===== SHARED STYLES - Creed Server ===== */
/* This file contains common design elements shared across all pages */
/* Import this file before page-specific styles */

/* ===== CSS VARIABLES ===== */
:root {
    /* Core Colors */
    --primary: #e63946;
    --primary-light: #ff6b6b;
    --primary-dark: #c1121f;
    --secondary: #1d3557;
    --secondary-light: #2a5a8a;
    --accent: #f4a261;
    --accent-light: #f9c74f;
    --dark: #0d0d0d;
    --darker: #050505;
    --light: #f8f9fa;
    --gray: #2d2d2d;
    --gray-light: #3d3d3d;
    --gray-dark: #1a1a1a;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    --gradient-dark: linear-gradient(180deg, var(--dark) 0%, var(--darker) 100%);
    --gradient-glow: radial-gradient(circle, rgba(230, 57, 70, 0.15) 0%, transparent 70%);
    --gradient-hero: linear-gradient(135deg, rgba(230, 57, 70, 0.12) 0%, rgba(29, 53, 87, 0.15) 50%, rgba(244, 162, 97, 0.1) 100%);
    --gradient-text: linear-gradient(90deg, var(--light) 0%, var(--primary-light) 100%);
    
    /* Glassmorphism */
    --glass-bg: rgba(30, 30, 30, 0.65);
    --glass-bg-solid: rgba(30, 30, 30, 0.95);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    
    /* Glow Effects */
    --glow-primary: 0 0 30px rgba(230, 57, 70, 0.4);
    --glow-primary-strong: 0 0 40px rgba(230, 57, 70, 0.6);
    --glow-accent: 0 0 30px rgba(244, 162, 97, 0.4);
    --glow-text: 0 0 20px rgba(230, 57, 70, 0.8);
    
    /* 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 20px rgba(230, 57, 70, 0.3);
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    --transition-bounce: 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    
    /* Spacing */
    --header-height: 80px;
    
    /* Rank Colors (for character inspection) */
    --rank-normal: #888888;      /* Gray */
    --rank-magic: #0070DD;       /* Blue */
    --rank-rare: #A335EE;        /* Purple */
    --rank-epic: #FF8000;        /* Orange */
    --rank-legendary: #E63946;   /* Red */
    --rank-unique: #FFD700;      /* Gold */
    --rank-divine: #00FF00;      /* Green */
}

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Exo 2', sans-serif;
    background: var(--dark);
    color: var(--light);
    overflow-x: hidden;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Unbounded', sans-serif;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== NOISE OVERLAY ===== */
.noise-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    pointer-events: none;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ===== BACKGROUND TEXTURE ===== */
.bg-texture {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: 
        radial-gradient(ellipse at 15% 20%, rgba(230, 57, 70, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 85% 80%, rgba(29, 53, 87, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(244, 162, 97, 0.04) 0%, transparent 60%);
}

/* ===== HEADER ===== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 15px 0;
    background: linear-gradient(to bottom, rgba(13, 13, 13, 0.95) 0%, rgba(13, 13, 13, 0) 100%);
    transition: all var(--transition-normal);
}

header.scrolled {
    background: rgba(13, 13, 13, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--glass-border);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: var(--gradient-primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    transform: rotate(45deg);
    box-shadow: var(--glow-primary);
    transition: all var(--transition-normal);
}

.logo-icon:hover {
    transform: rotate(45deg) scale(1.1);
    box-shadow: var(--glow-primary-strong);
}

.logo-icon i {
    transform: rotate(-45deg);
}

.logo-text {
    font-family: 'Unbounded', sans-serif;
    font-size: 1.4rem;
    font-weight: 900;
    letter-spacing: 3px;
    color: var(--light);
}

.logo-text span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 8px;
    align-items: center;
}

.nav-links a {
    color: var(--light);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    position: relative;
    padding: 10px 16px;
    border-radius: 8px;
    transition: all var(--transition-normal);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transform: translateX(-50%);
    transition: width var(--transition-normal);
    border-radius: 2px;
}

.nav-links a:hover {
    color: var(--primary-light);
    background: rgba(230, 57, 70, 0.1);
}

.nav-links a:hover::after {
    width: 30px;
}

.nav-links a.active {
    color: var(--primary);
}

.nav-links a.active::after {
    width: 30px;
}

.btn-discord {
    background: #5865F2;
    color: white;
    padding: 12px 22px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-normal);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.btn-discord::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.1);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.btn-discord:hover {
    background: transparent;
    border-color: #5865F2;
    box-shadow: 0 0 20px rgba(88, 101, 242, 0.4);
    transform: translateY(-2px);
}

.btn-discord:hover::before {
    opacity: 1;
}

/* Mobile Menu Toggle */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 1001;
    padding: 10px;
    background: transparent;
    border: none;
}

.hamburger span {
    width: 26px;
    height: 2px;
    background: var(--light);
    transition: all var(--transition-normal);
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    width: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 320px;
    height: 100vh;
    background: rgba(13, 13, 13, 0.98);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    padding: 100px 30px 30px;
    transition: right var(--transition-slow);
    z-index: 999;
    border-left: 1px solid var(--glass-border);
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    z-index: 998;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 5px;
}

.mobile-menu .nav-links a {
    padding: 15px 20px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
}

.mobile-menu .nav-links a:hover {
    background: rgba(230, 57, 70, 0.15);
    border-color: var(--primary);
}

/* ===== FOOTER ===== */
footer, .site-footer {
    background: var(--darker);
    padding: 70px 0 30px;
    border-top: 1px solid var(--glass-border);
    position: relative;
}

footer::before, .site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--primary) 50%, transparent 100%);
    opacity: 0.4;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.2fr;
    gap: 50px;
    margin-bottom: 50px;
}

.footer-brand h3 {
    font-size: 1.5rem;
    margin-bottom: 18px;
}

.footer-brand h3 span {
    color: var(--primary);
}

.footer-brand p, .footer-tagline {
    color: #888;
    margin-bottom: 22px;
    line-height: 1.7;
    font-size: 0.95rem;
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-links a {
    width: 45px;
    height: 45px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light);
    text-decoration: none;
    transition: all var(--transition-normal);
    font-size: 1.1rem;
}

.social-links a:hover {
    transform: translateY(-4px) scale(1.1);
    border-color: var(--primary);
    box-shadow: var(--glow-primary);
    color: var(--primary);
    background: rgba(230, 57, 70, 0.15);
}

.footer-section h4, .footer-column h4 {
    font-size: 1rem;
    margin-bottom: 22px;
    color: var(--light);
}

.footer-section a, .footer-section p, .footer-column a {
    display: block;
    color: #888;
    text-decoration: none;
    margin-bottom: 14px;
    font-size: 0.92rem;
    transition: color var(--transition-normal);
}

.footer-section a:hover, .footer-column a:hover {
    color: var(--primary);
    transform: translateX(5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 35px;
    border-top: 1px solid var(--glass-border);
    color: #666;
    font-size: 0.88rem;
}

.footer-bottom span {
    color: var(--primary);
}

.footer-bottom p + p {
    margin-top: 10px;
}

.footer-bottom .disclaimer {
    font-size: 0.75rem;
    color: #444;
}

/* ===== BUTTONS ===== */
.btn-primary {
    background: var(--gradient-primary);
    color: white;
    padding: 16px 32px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all var(--transition-normal);
    border: none;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(230, 57, 70, 0.3);
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--glow-primary-strong);
}

.btn-primary:hover::before {
    transform: translateX(100%);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--light);
    padding: 16px 32px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    border: 2px solid var(--glass-border);
    transition: all var(--transition-normal);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    border-color: var(--primary);
    background: rgba(230, 57, 70, 0.1);
    transform: translateY(-3px);
}

/* ===== CARDS ===== */
.card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 35px;
    border: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
    box-shadow: var(--glass-shadow);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
}

.card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 60%);
    pointer-events: none;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(230, 57, 70, 0.7); }
    50% { opacity: 0.8; box-shadow: 0 0 0 10px rgba(230, 57, 70, 0); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes cardGlow {
    0%, 100% { box-shadow: var(--glass-shadow), 0 0 25px rgba(230, 57, 70, 0.25); }
    50% { box-shadow: var(--glass-shadow), 0 0 45px rgba(230, 57, 70, 0.4); }
}

@keyframes gradientShift {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.85; transform: scale(1.05); }
}

.fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1100px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-links, .btn-discord {
        display: none;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 35px;
    }
    
    .social-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    :root {
        --header-height: 70px;
    }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== UTILITY CLASSES ===== */
.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus visible for keyboard navigation */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}
