/*
  AdvanceMMO Wiki - Modern Glass Design
  Inspired by index.html Style
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700;800&display=swap');

:root {
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-hover: rgba(255, 255, 255, 0.08);
    --text-primary: #e2e8f0;
    --text-muted: #94a3b8;
    --accent-blue: #3b82f6;
    --accent-glow: rgba(59, 130, 246, 0.5);
    --gradient-primary: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: radial-gradient(circle at top left, #1a1a2e, #16213e, #0f3460);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

.wiki-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    z-index: 10;
}

/* Header */
.wiki-header {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1.5rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

.wiki-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.wiki-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.wiki-subtitle {
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

/* Body Layout */
.wiki-body {
    display: flex;
    flex: 1;
    max-width: 1400px;
    margin: 2rem auto;
    width: 95%;
    gap: 2rem;
}

/* Sidebar */
.wiki-sidebar {
    width: 280px;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    padding: 1.5rem 0;
    height: fit-content;
    position: sticky;
    top: 6rem;
    max-height: calc(100vh - 8rem);
    overflow-y: auto;
}

.wiki-sidebar::-webkit-scrollbar {
    width: 6px;
}

.wiki-sidebar::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 3px;
}

.wiki-nav {
    padding: 0 1rem;
}

.nav-list {
    list-style: none;
}

.nav-label {
    display: block;
    padding: 1rem 0.75rem 0.5rem;
    color: var(--accent-blue);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nav-item > a {
    display: block;
    padding: 0.6rem 0.75rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 0.75rem;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.nav-item > a:hover, .nav-item.active > a {
    background: var(--glass-hover);
    color: var(--text-primary);
    padding-left: 1rem;
}

.nav-submenu {
    list-style: none;
    margin-left: 1rem;
    margin-top: 0.25rem;
    border-left: 1px solid var(--glass-border);
}

.nav-subitem a {
    display: block;
    padding: 0.4rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.nav-subitem a:hover, .nav-subitem.active a {
    color: var(--accent-blue);
}

/* Content Area */
.wiki-content {
    flex: 1;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    padding: 3rem;
    min-width: 0;
}

/* Breadcrumbs */
.breadcrumbs {
    margin-bottom: 2.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.breadcrumbs ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.breadcrumbs li {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.breadcrumbs li:not(:last-child)::after {
    content: '›';
    margin-left: 0.5rem;
    color: var(--text-muted);
    font-size: 1.2rem;
    line-height: 0;
}

.breadcrumbs a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumbs a:hover {
    color: var(--text-primary);
}

/* Content Styles */
.content-section h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.content-section h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 2.5rem 0 1.25rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.5rem;
}

.content-section h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 2rem 0 1rem;
    color: var(--text-primary);
}

.content-section p {
    margin-bottom: 1.25rem;
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.7;
}

.content-section ul, .content-section ol {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

.content-section li {
    margin-bottom: 0.5rem;
}

.content-section strong {
    color: var(--text-primary);
}

/* Cards */
.card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 1.25rem;
    padding: 2rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.card:hover {
    background: var(--glass-hover);
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.card h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.3rem;
    font-weight: 700;
}

/* Code blocks */
pre {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    padding: 1.5rem;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

code {
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.9rem;
    color: #4facfe;
}

pre code {
    color: var(--text-primary);
}

/* Tables */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 2rem;
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    overflow: hidden;
}

table th {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    padding: 1rem;
    text-align: left;
    font-weight: 700;
    border-bottom: 1px solid var(--glass-border);
}

table td {
    padding: 1rem;
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-muted);
}

table tr:last-child td {
    border-bottom: none;
}

table tr:hover td {
    background: var(--glass-hover);
    color: var(--text-primary);
}

/* Alerts */
.alert {
    padding: 1.25rem 1.5rem;
    border-radius: 1rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid;
    background: var(--glass-bg);
}

.alert-info { border-color: #3b82f6; color: #93c5fd; }
.alert-warning { border-color: #f59e0b; color: #fcd34d; }
.alert-danger { border-color: #ef4444; color: #fca5a5; }
.alert-success { border-color: #10b981; color: #6ee7b7; }

/* Footer */
.wiki-footer {
    margin-top: auto;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--glass-border);
    padding: 3rem 2rem;
    text-align: center;
}

.footer-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.footer-links {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.footer-links a:hover {
    color: var(--accent-blue);
    transform: translateY(-2px);
}

/* Decorative Blobs */
.blob {
    position: fixed;
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(0, 242, 254, 0.1) 100%);
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    pointer-events: none;
    animation: pulse 15s infinite alternate;
}

@keyframes pulse {
    from { transform: scale(1); opacity: 0.5; }
    to { transform: scale(1.2); opacity: 0.8; }
}

/* Responsive */
@media (max-width: 1024px) {
    .wiki-body {
        flex-direction: column;
        width: 90%;
    }
    
    .wiki-sidebar {
        width: 100%;
        position: relative;
        top: 0;
        max-height: none;
    }

    .wiki-content {
        padding: 2rem;
    }

    .content-section h1 {
        font-size: 2.2rem;
    }
}
