/* ===== CSS Variables ===== */
:root {
    --primary: #1a1a2e;
    --primary-light: #16213e;
    --accent: #e94560;
    --accent-hover: #ff6b6b;
    --gold: #f0a500;
    --gold-light: #ffc947;
    --text: #e0e0e0;
    --text-dark: #1a1a2e;
    --text-muted: #a0a0a0;
    --bg-dark: #0f0f1a;
    --bg-card: #1e1e32;
    --bg-card-hover: #2a2a44;
    --border: #2a2a44;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 8px 30px rgba(233, 69, 96, 0.2);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s ease;
    --max-width: 1200px;
    --font-main: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Navigation ===== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(15, 15, 26, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.navbar {
    padding: 0;
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--gold);
}

.logo-icon {
    font-size: 1.5rem;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-link {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--gold);
    background: rgba(240, 165, 0, 0.1);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.hamburger {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--text);
    border-radius: 3px;
    position: relative;
    transition: var(--transition);
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 3px;
    background: var(--text);
    border-radius: 3px;
    transition: var(--transition);
}

.hamburger::before { top: -8px; }
.hamburger::after { top: 8px; }

/* ===== Hero Banner ===== */
.hero-banner {
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 20px 80px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    overflow: hidden;
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.03)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.5;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(15, 15, 26, 0.7) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 30px;
    line-height: 1.6;
}

.hero-cta {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, #ff6b6b 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(233, 69, 96, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--gold);
    border: 2px solid var(--gold);
}

.btn-secondary:hover {
    background: var(--gold);
    color: var(--text-dark);
    transform: translateY(-2px);
}

/* ===== Sections ===== */
.section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 10px;
    color: var(--text);
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 50px;
}

/* ===== Card Grid ===== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.nav-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 35px 25px;
    text-align: center;
    transition: var(--transition);
    display: block;
}

.nav-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--gold);
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.card-icon {
    font-size: 2.5rem;
    color: var(--gold);
    margin-bottom: 20px;
}

.nav-card h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: var(--text);
}

.nav-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ===== Featured Guides ===== */
.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.featured-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
}

.featured-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent);
}

.featured-img {
    height: 200px;
    background-size: cover;
    background-position: center;
    background-color: var(--primary-light);
}

.featured-img-carry {
    background: linear-gradient(135deg, #e94560 0%, #533483 100%);
}

.featured-img-support {
    background: linear-gradient(135deg, #0f3460 0%, #16213e 100%);
}

.featured-img-meta {
    background: linear-gradient(135deg, #f0a500 0%, #e94560 100%);
}

.featured-body {
    padding: 25px;
}

.featured-tag {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(233, 69, 96, 0.15);
    color: var(--accent);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.featured-body h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--text);
}

.featured-body p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

.read-more {
    color: var(--gold);
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.read-more:hover {
    color: var(--gold-light);
    gap: 10px;
}

/* ===== Beginner Section ===== */
.beginner-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.beginner-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 30px;
    position: relative;
}

.step-number {
    position: absolute;
    top: -15px;
    left: 25px;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent) 0%, #ff6b6b 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: white;
}

.beginner-card h3 {
    margin-bottom: 12px;
    font-size: 1.2rem;
    color: var(--text);
    margin-top: 10px;
}

.beginner-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 15px;
}

.beginner-list {
    list-style: none;
}

.beginner-list li {
    padding: 6px 0;
    padding-left: 20px;
    position: relative;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.beginner-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--gold);
    font-weight: 700;
}

/* ===== Roles Section ===== */
.roles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.role-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 25px;
    text-align: center;
    transition: var(--transition);
}

.role-card:hover {
    border-color: var(--gold);
    transform: translateY(-3px);
}

.role-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-weight: 800;
    font-size: 1.2rem;
    color: white;
}

.pos-1 { background: linear-gradient(135deg, #e94560, #ff6b6b); }
.pos-2 { background: linear-gradient(135deg, #533483, #7c3aed); }
.pos-3 { background: linear-gradient(135deg, #0f3460, #1e88e5); }
.pos-4 { background: linear-gradient(135deg, #f0a500, #ffc947); }
.pos-5 { background: linear-gradient(135deg, #2d6a4f, #40916c); }

.role-card h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--text);
}

.role-card p {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 12px;
}

.role-heroes {
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.role-heroes span {
    font-size: 0.8rem;
    color: var(--gold);
}

/* ===== Tips Section ===== */
.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.tip-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 25px;
    transition: var(--transition);
}

.tip-card:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
}

.tip-icon {
    font-size: 1.8rem;
    color: var(--accent);
    margin-bottom: 15px;
}

.tip-card h4 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--text);
}

.tip-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ===== Footer ===== */
.site-footer {
    background: var(--primary);
    border-top: 1px solid var(--border);
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-about h3 {
    color: var(--gold);
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.footer-about p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.7;
}

.footer-links h4 {
    color: var(--text);
    font-size: 1rem;
    margin-bottom: 15px;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--gold);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 25px;
    text-align: center;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ===== Page Header (for inner pages) ===== */
.page-header {
    padding: 120px 20px 60px;
    text-align: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--gold);
}

.page-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== Content Sections (inner pages) ===== */
.content-section {
    padding: 60px 0;
}

.content-section h2 {
    font-size: 1.8rem;
    color: var(--text);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent);
    display: inline-block;
}

.content-section h3 {
    font-size: 1.3rem;
    color: var(--gold);
    margin: 25px 0 12px;
}

.content-section p {
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 15px;
}

.content-section ul,
.content-section ol {
    margin: 15px 0;
    padding-left: 25px;
}

.content-section li {
    color: var(--text-muted);
    margin-bottom: 8px;
    line-height: 1.6;
}

.content-section ul li {
    list-style: disc;
}

.content-section ol li {
    list-style: decimal;
}

/* ===== Hero Grid (heroes page) ===== */
.hero-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 40px;
}

.filter-btn {
    padding: 8px 20px;
    border: 1px solid var(--border);
    border-radius: 25px;
    background: var(--bg-card);
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.heroes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.hero-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}

.hero-card:hover {
    border-color: var(--gold);
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.hero-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.hero-card h4 {
    font-size: 0.95rem;
    color: var(--text);
    margin-bottom: 5px;
}

.hero-card .hero-attr {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.attr-str { background: linear-gradient(135deg, #e94560, #ff6b6b); }
.attr-agi { background: linear-gradient(135deg, #2d6a4f, #40916c); }
.attr-int { background: linear-gradient(135deg, #0f3460, #1e88e5); }
.attr-uni { background: linear-gradient(135deg, #533483, #7c3aed); }

/* ===== Item Grid (items page) ===== */
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.item-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: var(--transition);
}

.item-card:hover {
    border-color: var(--gold);
    transform: translateY(-2px);
}

.item-card h4 {
    color: var(--text);
    margin-bottom: 5px;
}

.item-cost {
    color: var(--gold);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.item-card p {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.5;
}

/* ===== Table Styles ===== */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
}

.data-table th,
.data-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    background: var(--primary);
    color: var(--gold);
    font-weight: 600;
    font-size: 0.9rem;
}

.data-table td {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.data-table tr:hover td {
    background: var(--bg-card-hover);
}

/* ===== Sidebar Layout ===== */
.content-with-sidebar {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.sidebar {
    position: sticky;
    top: 90px;
    height: fit-content;
}

.sidebar-widget {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
}

.sidebar-widget h4 {
    color: var(--gold);
    margin-bottom: 12px;
    font-size: 1rem;
}

.sidebar-widget ul li {
    margin-bottom: 8px;
}

.sidebar-widget a {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.sidebar-widget a:hover {
    color: var(--gold);
}

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
    .content-with-sidebar {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }

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

@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(15, 15, 26, 0.98);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 40px;
        gap: 5px;
        transform: translateX(100%);
        transition: transform 0.3s ease;
    }

    .nav-menu.active {
        transform: translateX(0);
    }

    .nav-link {
        font-size: 1.1rem;
        padding: 12px 30px;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

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

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

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

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

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

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .heroes-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    .page-header h1 {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .hero-banner {
        min-height: 400px;
        padding: 100px 15px 60px;
    }

    .hero-content h1 {
        font-size: 1.6rem;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

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

    .section {
        padding: 50px 0;
    }

    .nav-container {
        padding: 0 15px;
    }
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.6s ease forwards;
}

/* ===== Utility Classes ===== */
.text-center { text-align: center; }
.text-gold { color: var(--gold); }
.text-accent { color: var(--accent); }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.mt-40 { margin-top: 40px; }
.mb-40 { margin-bottom: 40px; }
