/* Import Google Fonts - Outfit for Headings, Inter for Body */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

/* Color Variables & Base Styles */
:root {
    --bg-dark: #0a0b10;
    --bg-card: rgba(17, 19, 31, 0.75);
    --bg-card-hover: rgba(26, 29, 47, 0.85);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-hover: rgba(255, 255, 255, 0.15);
    
    --primary-gradient: linear-gradient(135deg, #00d2ff 0%, #0066ff 100%);
    --secondary-gradient: linear-gradient(135deg, #b19ffb 0%, #7f53ac 100%);
    --accent-gradient: linear-gradient(135deg, #ff0844 0%, #ffb199 100%);
    
    --primary-color: #00d2ff;
    --primary-color-hover: #0099ff;
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --text-glow: #e0f2fe;
    
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --sidebar-width: 280px;
    --shadow-premium: 0 10px 30px -10px rgba(0, 0, 0, 0.7);
    --glass-blur: blur(12px);
}

/* Reset and Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(0, 210, 255, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(127, 83, 172, 0.05) 0%, transparent 40%);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.02em;
}

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

a:hover {
    color: var(--primary-color-hover);
}

/* Scrollbar Style */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

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

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* App Layout */
.app-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    width: var(--sidebar-width);
    background: rgba(10, 11, 16, 0.85);
    backdrop-filter: var(--glass-blur);
    border-right: 1px solid var(--border-color);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: var(--transition-smooth);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.logo-icon {
    font-size: 2rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px rgba(0, 210, 255, 0.3));
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, #a5f3fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-tag {
    font-size: 0.7rem;
    background: var(--primary-gradient);
    color: #ffffff;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-weight: 600;
    letter-spacing: 0.05em;
    vertical-align: middle;
}

.nav-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    color: var(--text-muted);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
}

.nav-item i {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.nav-item:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
    color: #ffffff;
    background: rgba(0, 210, 255, 0.1);
    border-color: rgba(0, 210, 255, 0.2);
    box-shadow: 0 4px 20px -5px rgba(0, 210, 255, 0.15);
}

.sidebar-footer {
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.server-ip-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.75rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.server-ip-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(0, 210, 255, 0.3);
}

.ip-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ip-value {
    font-family: monospace;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-top: 0.1rem;
}

.social-links {
    display: flex;
    justify-content: space-around;
    gap: 0.5rem;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 1.1rem;
    transition: var(--transition-smooth);
}

.social-btn:hover {
    color: #ffffff;
    transform: translateY(-2px);
    border-color: var(--border-color-hover);
}

.social-btn.discord:hover {
    background: #5865F2;
    border-color: #5865F2;
    box-shadow: 0 4px 14px rgba(88, 101, 242, 0.4);
}

.social-btn.store:hover {
    background: #10b981;
    border-color: #10b981;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

/* Main Content Area */
.main-content {
    margin-left: var(--sidebar-width);
    flex-grow: 1;
    padding: 2.5rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    max-width: calc(100vw - var(--sidebar-width));
}

/* Top Bar */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.search-box {
    position: relative;
    width: 350px;
}

.search-box input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    color: #ffffff;
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition-smooth);
}

.search-box input:focus {
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 2px rgba(0, 210, 255, 0.15);
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.95rem;
    pointer-events: none;
}

.server-status {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--success-color);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--success-color);
    border-radius: 50%;
    animation: pulse 1.8s infinite;
}

.version-badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
}

/* Page Views Container */
.page-view {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}

.page-view.active {
    display: block;
}

/* General Layout Elements */
.section-header {
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #a5f3fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.05rem;
}

/* Premium Card / Glassmorphism Grid */
.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.75rem;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-premium);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: transparent;
    transition: var(--transition-smooth);
}

.card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-color-hover);
    transform: translateY(-4px);
    box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.8);
}

.card.gradient-border-primary::before {
    background: var(--primary-gradient);
}

.card.gradient-border-secondary::before {
    background: var(--secondary-gradient);
}

.card.gradient-border-accent::before {
    background: var(--accent-gradient);
}

.card-icon {
    font-size: 2rem;
    margin-bottom: 1.25rem;
    display: inline-block;
}

.card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
}

.card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
}

/* Lists and Guides */
.guide-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.guide-step {
    display: flex;
    gap: 1.25rem;
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border-color);
    padding: 1.25rem;
    border-radius: 16px;
    transition: var(--transition-smooth);
}

.guide-step:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.12);
}

.step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.95rem;
}

.step-content h4 {
    font-size: 1.05rem;
    margin-bottom: 0.25rem;
}

.step-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.step-content code {
    background: rgba(0, 0, 0, 0.4);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-family: monospace;
    color: var(--primary-color);
}

/* Custom Alert Banner */
.banner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: linear-gradient(90deg, rgba(0, 210, 255, 0.1) 0%, rgba(127, 83, 172, 0.05) 100%);
    border: 1px solid rgba(0, 210, 255, 0.2);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2.5rem;
}

.banner-icon {
    font-size: 3rem;
    color: var(--primary-color);
    filter: drop-shadow(0 0 15px rgba(0, 210, 255, 0.3));
}

.banner-text h3 {
    font-size: 1.6rem;
    margin-bottom: 0.4rem;
}

.banner-text p {
    color: var(--text-glow);
    font-size: 1.05rem;
}

/* Commands & Tables Styling */
.table-container {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 2.5rem;
    box-shadow: var(--shadow-premium);
}

.commands-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.commands-table th {
    background: rgba(255, 255, 255, 0.02);
    padding: 1.2rem 1.5rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    color: #ffffff;
    border-bottom: 1px solid var(--border-color);
}

.commands-table td {
    padding: 1.1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 0.95rem;
    color: var(--text-main);
    vertical-align: middle;
}

.commands-table tr:last-child td {
    border-bottom: none;
}

.commands-table tr:hover td {
    background: rgba(255, 255, 255, 0.015);
}

.cmd-badge {
    font-family: monospace;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    color: var(--primary-color);
    font-weight: 600;
    display: inline-block;
}

.perm-badge {
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.currency-type {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
}

.currency-type.money {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.currency-type.coins {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.currency-type.crates {
    background: rgba(127, 83, 172, 0.15);
    color: #c084fc;
    border: 1px solid rgba(127, 83, 172, 0.3);
}

.btn-copy {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: var(--transition-smooth);
}

.btn-copy:hover {
    background: rgba(0, 210, 255, 0.1);
    border-color: var(--primary-color);
    color: #ffffff;
}

.btn-copy.copied {
    background: rgba(16, 185, 129, 0.2);
    border-color: var(--success-color);
    color: #ffffff;
}

/* Category filter tags */
.filter-container {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 10px;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border-color-hover);
    color: #ffffff;
}

.filter-btn.active {
    background: var(--primary-gradient);
    border-color: transparent;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(0, 102, 255, 0.25);
}

/* Ranks & Levels Design */
.ranks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.rank-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    position: relative;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.rank-card:hover {
    transform: scale(1.02);
    border-color: var(--border-color-hover);
}

.rank-badge {
    align-self: flex-start;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 0.8rem;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.rank-badge.default { background: #6b7280; color: #fff; }
.rank-badge.knight { background: #3b82f6; color: #fff; }
.rank-badge.lord { background: #06b6d4; color: #fff; }
.rank-badge.paladin { background: #10b981; color: #fff; }
.rank-badge.duke { background: #f59e0b; color: #fff; }
.rank-badge.king { background: #a855f7; color: #fff; }
.rank-badge.staff { background: #ef4444; color: #fff; }
.rank-badge.builder { background: #ec4899; color: #fff; }

.rank-title {
    font-size: 1.25rem;
    font-weight: 700;
}

.rank-perks {
    list-style: none;
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.rank-perks li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rank-perks li::before {
    content: '✓';
    color: var(--success-color);
    font-weight: bold;
}

/* Editing Guides Elements */
.accordion {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.accordion-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.accordion-header {
    padding: 1.25rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    transition: var(--transition-smooth);
    user-select: none;
}

.accordion-header:hover {
    background: rgba(255, 255, 255, 0.02);
}

.accordion-icon {
    font-size: 0.8rem;
    transition: var(--transition-smooth);
}

.accordion-item.open .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0, 1, 0, 1);
    background: rgba(0, 0, 0, 0.2);
}

.accordion-item.open .accordion-content {
    max-height: 1000px;
    transition: max-height 0.5s ease-in-out;
}

.accordion-body {
    padding: 1.5rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.accordion-body p {
    margin-bottom: 1rem;
}

.path-badge {
    display: inline-block;
    font-family: monospace;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    color: #ffffff;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.code-block {
    background: #050608;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    font-family: monospace;
    font-size: 0.85rem;
    color: #38bdf8;
    overflow-x: auto;
    position: relative;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Toast Notification Styles */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.toast {
    background: rgba(10, 11, 16, 0.95);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    color: #ffffff;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 250px;
    animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    pointer-events: auto;
    border-left: 4px solid var(--primary-color);
}

.toast.success {
    border-left-color: var(--success-color);
}

.toast i {
    font-size: 1.2rem;
}

.toast.success i {
    color: var(--success-color);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateY(20px);
    }
}

/* Mobile responsive styles */
.mobile-header {
    display: none;
    background: rgba(10, 11, 16, 0.9);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 110;
}

.menu-toggle {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 1024px) {
    body {
        flex-direction: column;
    }
    
    .mobile-header {
        display: flex;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        max-height: 0;
        overflow: hidden;
        position: fixed;
        top: 60px; /* height of mobile header */
        left: 0;
        padding: 0;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .sidebar.open {
        max-height: 100vh;
        padding: 1.5rem;
        overflow-y: auto;
    }
    
    .main-content {
        margin-left: 0;
        padding: 5.5rem 1.5rem 2.5rem 1.5rem; /* space for mobile header */
        max-width: 100vw;
    }
    
    .top-bar {
        flex-direction: column;
        gap: 1.25rem;
        align-items: stretch;
    }
    
    .search-box {
        width: 100%;
    }
}
