:root {
    /* Color Palette - Modern Dark Fantasy */
    --bg-base: #0f1115;
    --bg-surface: #1a1d24;
    --bg-glass: rgba(26, 29, 36, 0.4);
    --bg-glass-hover: rgba(40, 44, 52, 0.7);
    --bg-blur: blur(12px);
    
    --accent-primary: #9d4edd; /* Deep Purple */
    --accent-primary-hover: #c77dff;
    --accent-secondary: #f3c623; /* Gold */
    --accent-danger: #e63946;
    
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --text-heading: #ffffff;
    
    /* Typography */
    --font-heading: 'Cinzel', serif;
    --font-body: 'Inter', sans-serif;
    
    /* Effects */
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 10px 25px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 25px rgba(157, 78, 221, 0.4);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-base);
    color: var(--text-main);
    overflow: hidden;
    line-height: 1.6;
    cursor: url('assets/images/cursor.png'), auto;
    /* Atmospheric subtle background gradient elements */
    background-image: 
        radial-gradient(circle at 10% 50%, rgba(157, 78, 221, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 90% 20%, rgba(243, 198, 35, 0.05) 0%, transparent 40%);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-heading);
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Layout */
#app {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background-color: rgba(20, 23, 29, 0.85);
    backdrop-filter: var(--bg-blur);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    padding: 32px 0;
    z-index: 10;
    box-shadow: 4px 0 24px rgba(0,0,0,0.5);
    transition: var(--transition-smooth);
}

.sidebar-header {
    padding: 0 24px 40px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--accent-primary), #3c096c);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: white;
    box-shadow: var(--shadow-glow);
    animation: float 4s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); box-shadow: 0 0 25px rgba(157, 78, 221, 0.4); }
    50% { transform: translateY(-8px); box-shadow: 0 15px 35px rgba(157, 78, 221, 0.8); }
}

.sidebar-header h1 {
    font-size: 1.4rem;
    line-height: 1.2;
    background: linear-gradient(to right, #ffffff, #a7b5cc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-menu {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 16px;
}

.nav-item {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 16px 20px;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, rgba(157, 78, 221, 0.15) 0%, transparent 100%);
    transition: var(--transition-smooth);
    z-index: -1;
}

.nav-item i {
    font-size: 1.15rem;
    width: 24px;
    text-align: center;
    transition: var(--transition-fast);
}

.nav-item:hover {
    color: var(--text-main);
    transform: translateX(4px);
}

.nav-item:hover::before {
    width: 100%;
}

.nav-item.active {
    color: white;
    border-left: 4px solid var(--accent-primary);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.nav-item.active::before {
    width: 100%;
    background: linear-gradient(90deg, rgba(157, 78, 221, 0.25) 0%, transparent 100%);
}

.nav-item.active i {
    color: var(--accent-primary-hover);
    text-shadow: 0 0 10px rgba(157, 78, 221, 0.6);
}

.sidebar-footer {
    padding: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.copyright-info {
    margin-top: 20px;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.6;
    opacity: 0.7;
}

.copyright-info i.fa-discord {
    color: #5865F2; /* Official Discord Blurple */
    margin-right: 4px;
    font-size: 0.85rem;
}

.status-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.9rem;
    color: var(--text-muted);
    background: rgba(0,0,0,0.2);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255,255,255,0.03);
    transition: var(--transition-fast);
}

.status-box:hover {
    background: rgba(255,255,255,0.03);
    border-color: rgba(243, 198, 35, 0.2);
}

.status-box span {
    text-align: right;
    line-height: 1.4;
}

.status-indicator {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 10px #10b981;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* Topbar */
.topbar {
    height: 80px;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    background-color: rgba(15, 17, 21, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 5;
}

.topbar-actions {
    display: flex;
    align-items: center;
}

.btn-donate {
    background: linear-gradient(135deg, #FF424D, #f96854);
    color: white;
    text-decoration: none;
    padding: 10px 22px;
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(255, 66, 77, 0.2);
    transition: var(--transition-smooth);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-donate:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 66, 77, 0.4);
    background: linear-gradient(135deg, #ff5e67, #fa8372);
}

.btn-donate i {
    font-size: 1rem;
}

.search-bar {
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.03);
    border-radius: 24px;
    padding: 12px 24px;
    width: 100%;
    max-width: 480px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition-smooth);
}

.search-bar:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(157, 78, 221, 0.15);
    background-color: rgba(255, 255, 255, 0.05);
}

.search-bar i {
    color: var(--text-muted);
    margin-right: 14px;
    font-size: 1.1rem;
}

.search-bar input {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 1rem;
    width: 100%;
    outline: none;
}

.search-bar input::placeholder {
    color: rgba(148, 163, 184, 0.5);
}

/* Content Container */
.content-container {
    flex: 1;
    overflow-y: auto;
    padding: 40px;
    scroll-behavior: smooth;
}

.page-content {
    animation: fadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    max-width: 1200px;
    margin: 0 auto;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Page Headers */
.page-header {
    margin-bottom: 40px;
}

.header-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    flex-wrap: wrap;
}

.sort-container {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    padding: 10px 20px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.sort-container label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.sort-select {
    background: transparent;
    border: none;
    color: var(--accent-secondary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    padding-right: 5px;
}

.sort-select option {
    background: var(--bg-surface);
    color: var(--text-main);
}

.page-title {
    font-size: 3rem;
    margin-bottom: 12px;
    text-shadow: 0 4px 20px rgba(0,0,0,0.6);
    background: linear-gradient(135deg, #fff, #9ca3af);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page-description {
    color: var(--text-muted);
    font-size: 1.15rem;
    max-width: 800px;
}

/* Hero Section (Home) */
.hero-section {
    position: relative;
    border-radius: var(--radius-lg);
    padding: 80px 48px;
    text-align: center;
    border: 1px solid rgba(157, 78, 221, 0.3);
    margin-bottom: 60px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    background-image: url('banner.png');
    background-size: cover;
    background-position: center;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(180deg, rgba(15, 17, 21, 0.5) 0%, rgba(15, 17, 21, 0.9) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 24px;
    background: linear-gradient(to right, var(--accent-secondary), #ffeaa7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    letter-spacing: 1px;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: #e2e8f0;
    max-width: 700px;
    margin: 0 auto;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 50px;
    position: relative;
    z-index: 2;
}

.stat-card {
    background: rgba(26, 29, 36, 0.6);
    backdrop-filter: blur(10px);
    padding: 24px;
    border-radius: var(--radius-md);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition-smooth);
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: rgba(243, 198, 35, 0.4);
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    color: var(--accent-secondary);
    margin-bottom: 4px;
    text-shadow: 0 0 15px rgba(243, 198, 35, 0.3);
}

.stat-label {
    color: var(--text-main);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 500;
}

/* Grid Layouts for Entity Cards */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
}

/* Entity Cards Container*/
.card {
    background-color: var(--bg-glass);
    backdrop-filter: var(--bg-blur);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 280px;
    cursor: pointer;
}

.card:hover {
    transform: translateY(-8px);
    background-color: var(--bg-glass-hover);
    border-color: rgba(157, 78, 221, 0.4);
    box-shadow: var(--shadow-md), 0 0 20px rgba(157, 78, 221, 0.1);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    opacity: 0;
    transition: var(--transition-smooth);
}

.card:hover::before {
    opacity: 1;
}

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

.card:hover .card-icon {
    transform: scale(1.1);
    color: var(--accent-primary-hover);
}

.card-title {
    font-size: 1.4rem;
    margin-bottom: 8px;
    color: var(--text-heading);
    font-family: var(--font-heading);
}

.card-subtitle {
    font-size: 0.85rem;
    color: var(--accent-primary-hover);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
    font-weight: 600;
}

.card-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0.8;
}

.card-date i {
    color: var(--accent-secondary);
    font-size: 0.8rem;
}

.card-description {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.5;
    flex: 1;
}

.card-tags {
    margin-top: 24px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    font-size: 0.75rem;
    padding: 6px 12px;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: var(--transition-fast);
}

.card:hover .tag {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Article view */
.article-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 32px;
    margin-bottom: 40px;
    position: relative;
}

.article-meta {
    display: flex;
    gap: 24px;
    color: var(--accent-secondary);
    font-size: 1.05rem;
    margin-top: 16px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.article-content {
    font-size: 1.15rem;
    color: var(--text-main);
    line-height: 1.8;
}

.article-content p {
    margin-bottom: 24px;
}

.article-content h3 {
    font-size: 1.8rem;
    margin-top: 48px;
    margin-bottom: 20px;
    color: var(--accent-primary-hover);
    border-bottom: 1px dashed rgba(255,255,255,0.1);
    padding-bottom: 8px;
    display: inline-block;
}

.article-content ul, .article-content ol {
    margin-bottom: 24px;
    padding-left: 24px;
    color: var(--text-muted);
}

.article-content li {
    margin-bottom: 12px;
    padding-left: 8px;
}

.article-content ul li::marker {
    color: var(--accent-secondary);
    content: "✦ ";
}

.article-content ol li::marker {
    color: var(--accent-secondary);
    font-weight: 600;
}

.btn-back {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    border-radius: 100px;
    padding: 10px 24px;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 32px;
    transition: var(--transition-smooth);
}

.btn-back:hover {
    background: rgba(157, 78, 221, 0.2);
    border-color: rgba(157, 78, 221, 0.4);
    color: #fff;
    transform: translateX(-4px);
}

/* Scrollbar customization */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-base);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(157, 78, 221, 0.5);
}

/* Nested Related Items Grid */
.related-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin: 40px 0 20px 0;
    color: var(--accent-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.related-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.related-card:hover {
    transform: translateY(-6px);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-primary);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5), 0 0 15px rgba(157, 78, 221, 0.3);
}

.related-img-container {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 15px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.3);
    transition: var(--transition-smooth);
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.related-card:hover .related-img-container {
    border-color: var(--accent-secondary);
    transform: scale(1.08);
}

.related-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-info h4 {
    font-family: var(--font-body);
    color: var(--text-heading);
    font-size: 1.1rem;
    margin-bottom: 5px;
    font-weight: 600;
}

.related-type {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Article Main Image */
.article-main-image-container {
    width: 100%;
    max-width: 600px;
    margin: 0 0 30px 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-md);
}

.article-main-img {
    width: 100%;
    height: auto;
    display: block;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), #3c096c);
    color: white;
    border: 1px solid rgba(255,255,255,0.1);
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5), 0 0 15px rgba(157, 78, 221, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(30px) scale(0.8);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 100;
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.scroll-to-top:hover {
    background: linear-gradient(135deg, var(--accent-primary-hover), var(--accent-primary));
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 10px 25px rgba(0,0,0,0.6), 0 0 25px rgba(199, 125, 255, 0.8);
}

/* Global Custom Cursor */
* {
    cursor: url('assets/images/cursor.png'), auto;
}
a, button, .card, .nav-item, .related-card, .btn-back, [onclick], .scroll-to-top {
    cursor: url('assets/images/cursor.png'), pointer !important;
}
