/* ============================================
   Uranus Novel Platform - Website CSS
   أورانوس - منصة الروايات
   Dark / Gold Cosmic Design
   ============================================ */

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    /* App Colors from Flutter - Purple/Rose Palette */
    --bg-primary: #190019;
    --bg-secondary: #1f0020;
    --bg-tertiary: #2B124C;
    --bg-card: #220028;
    --gold: #DFB6B2;
    --gold-light: #FBE4D8;
    --gold-dark: #854F6C;
    --text-primary: #FBE4D8;
    --text-secondary: #DFB6B2;
    --text-muted: #854F6C;
    --border-color: rgba(82, 43, 91, 0.5);
    --border-gold: #522B5B;
    --accent: #522B5B;
    --accent-light: #854F6C;
    --btn-color: #DFB6B2;
    --btn-text: #190019;
    --danger: #FF5C7A;
    --success: #00C896;
    --warning: #CF9D4C;
    --sidebar-width: 236px;
    --header-height: 60px;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    --transition: 0.3s ease;
    --shadow-gold: 0 0 20px rgba(223, 182, 178, 0.15);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.4);
}

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

html {
    direction: rtl;
    scroll-behavior: smooth;
}

body {
    font-family: 'Tajawal', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* ---------- Stars Background Effect ---------- */
body::before,
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

body::before {
    background-image:
        radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,0.4) 0%, transparent 100%),
        radial-gradient(1px 1px at 25% 50%, rgba(255,255,255,0.3) 0%, transparent 100%),
        radial-gradient(1.5px 1.5px at 40% 15%, rgba(201,168,76,0.4) 0%, transparent 100%),
        radial-gradient(1px 1px at 55% 70%, rgba(255,255,255,0.3) 0%, transparent 100%),
        radial-gradient(1px 1px at 70% 35%, rgba(255,255,255,0.25) 0%, transparent 100%),
        radial-gradient(1.5px 1.5px at 85% 60%, rgba(201,168,76,0.3) 0%, transparent 100%),
        radial-gradient(1px 1px at 15% 80%, rgba(255,255,255,0.2) 0%, transparent 100%),
        radial-gradient(1px 1px at 60% 90%, rgba(255,255,255,0.3) 0%, transparent 100%),
        radial-gradient(1px 1px at 90% 10%, rgba(255,255,255,0.35) 0%, transparent 100%),
        radial-gradient(1px 1px at 35% 40%, rgba(255,255,255,0.2) 0%, transparent 100%),
        radial-gradient(0.8px 0.8px at 48% 28%, rgba(255,255,255,0.2) 0%, transparent 100%),
        radial-gradient(1.2px 1.2px at 78% 48%, rgba(201,168,76,0.25) 0%, transparent 100%);
}

body::after {
    background-image:
        radial-gradient(1px 1px at 5% 45%, rgba(255,255,255,0.15) 0%, transparent 100%),
        radial-gradient(1px 1px at 20% 75%, rgba(201,168,76,0.2) 0%, transparent 100%),
        radial-gradient(1px 1px at 45% 5%, rgba(255,255,255,0.3) 0%, transparent 100%),
        radial-gradient(1.5px 1.5px at 65% 55%, rgba(255,255,255,0.2) 0%, transparent 100%),
        radial-gradient(1px 1px at 80% 85%, rgba(201,168,76,0.25) 0%, transparent 100%),
        radial-gradient(1px 1px at 95% 40%, rgba(255,255,255,0.2) 0%, transparent 100%),
        radial-gradient(1px 1px at 50% 30%, rgba(255,255,255,0.15) 0%, transparent 100%),
        radial-gradient(1px 1px at 75% 15%, rgba(255,255,255,0.25) 0%, transparent 100%),
        radial-gradient(0.8px 0.8px at 32% 62%, rgba(255,255,255,0.18) 0%, transparent 100%),
        radial-gradient(1px 1px at 88% 72%, rgba(201,168,76,0.15) 0%, transparent 100%);
}

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

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

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

ul, ol {
    list-style: none;
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--gold-dark);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gold);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--gold-dark) var(--bg-primary);
}

/* ============================================
   LAYOUT
   ============================================ */
.site-wrapper {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* ============================================
   TOP BAR (Horizontal Navigation)
   ============================================ */
.top-bar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(25, 0, 25, .92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
}
.top-bar-inner {
    max-width: 1480px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    height: 62px;
    gap: 16px;
}

/* Right side: Logo + Nav */
.top-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}
.top-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    flex-shrink: 0;
    margin-left: 16px;
}
.top-logo-img {
    height: 38px;
    width: auto;
    object-fit: contain;
}
.top-logo-text {
    font-family: 'Aref Ruqaa', serif;
    font-size: 1.3rem;
    font-weight: 700;
    background: linear-gradient(180deg, var(--gold-light), var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navigation items */
.top-nav {
    display: flex;
    align-items: center;
    gap: 2px;
}
.top-nav-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    font-family: 'Cairo', sans-serif;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.25s;
    white-space: nowrap;
}
.top-nav-item i {
    font-size: 0.8rem;
    color: var(--gold-dark);
    opacity: 0.5;
}
.top-nav-item:hover {
    background: rgba(82, 43, 91, .3);
    color: var(--gold);
}
.top-nav-item:hover i {
    opacity: 1;
}
.top-nav-item.active {
    background: linear-gradient(180deg, var(--gold-light), var(--gold));
    color: var(--bg-primary);
}
.top-nav-item.active i {
    color: var(--bg-primary);
    opacity: 1;
}

/* Left side: Search + Actions */
.top-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.top-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 25px;
    padding: 0 14px;
    height: 38px;
    width: 200px;
    transition: all 0.3s;
}
.top-search:focus-within {
    border-color: var(--gold);
    width: 280px;
}
.top-search input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 13px;
    text-align: right;
}
.top-search input::placeholder {
    color: var(--text-muted);
}
.top-icon-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--text-secondary);
    font-size: 14px;
    text-decoration: none;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.25s;
    position: relative;
}
.top-icon-btn:hover {
    color: var(--gold);
    background: rgba(82, 43, 91, .3);
}
.notif-badge {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #FF5C7A;
    color: #fff;
    font-size: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}
.top-create-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: linear-gradient(180deg, var(--gold-light), var(--gold));
    color: var(--bg-primary);
    font-family: 'Cairo', sans-serif;
    font-weight: 800;
    font-size: 13px;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s;
    white-space: nowrap;
}
.top-create-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(223, 182, 178, .3);
}
.top-create-btn i {
    font-size: 12px;
}
.top-login-btn {
    padding: 8px 22px;
    background: linear-gradient(180deg, var(--gold-light), var(--gold));
    color: var(--bg-primary);
    font-family: 'Cairo', sans-serif;
    font-weight: 800;
    font-size: 13px;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s;
}
.top-login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(223, 182, 178, .3);
}

/* User avatar & dropdown */
.top-user {
    position: relative;
    cursor: pointer;
}
.top-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--border-gold);
    object-fit: cover;
    transition: border-color 0.3s;
}
.top-user:hover .top-avatar {
    border-color: var(--gold);
}
.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: 220px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 8px;
    box-shadow: 0 12px 40px rgba(0,0,0,.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.25s;
    z-index: 999;
}
.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.dropdown-header {
    padding: 10px 12px;
    text-align: right;
}
.dropdown-header strong {
    display: block;
    color: var(--text-primary);
    font-size: 14px;
}
.dropdown-header small {
    color: var(--text-muted);
    font-size: 12px;
}
.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 4px 0;
}
.user-dropdown a, .user-dropdown button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    color: var(--text-secondary);
    font-size: 13.5px;
    text-decoration: none;
    border-radius: 8px;
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
    text-align: right;
}
.user-dropdown a:hover, .user-dropdown button:hover {
    background: rgba(82, 43, 91, .3);
    color: var(--gold);
}
.user-dropdown i {
    width: 18px;
    text-align: center;
    font-size: 13px;
}

/* Hamburger (mobile only) */
.hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
}

/* ============================================
   MAIN CONTENT (no sidebar margin)
   ============================================ */
.page-content {
    max-width: 1480px;
    margin: 0 auto;
    padding: 24px 30px 40px;
    min-height: 70vh;
}

/* ============================================
   TOP HEADER (legacy - keep for compatibility)
   ============================================ */
.top-header {
    position: sticky;
    top: 0;
    z-index: 900;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 25px;
    background: rgba(5, 5, 16, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    height: var(--header-height);
}

.hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.hamburger:hover {
    color: var(--gold);
    background: var(--bg-tertiary);
}

/* --- Search --- */
.search-container {
    flex: 1;
    max-width: 500px;
    margin: 0 auto;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    right: 14px;
    color: var(--text-muted);
    font-size: 0.85rem;
    pointer-events: none;
}

.search-box input {
    width: 100%;
    padding: 10px 38px 10px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 25px;
    color: var(--text-primary);
    font-family: 'Tajawal', sans-serif;
    font-size: 0.88rem;
    outline: none;
    transition: all var(--transition);
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-box input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 10px rgba(201, 168, 76, 0.1);
}

/* --- Header Actions --- */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-right: auto;
}

.header-icon,
.header-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 1.05rem;
    transition: all var(--transition);
}

.header-icon:hover,
.header-btn:hover {
    background: var(--bg-tertiary);
    color: var(--gold);
}

.coins-display {
    width: auto;
    gap: 6px;
    padding: 0 12px;
    font-size: 0.85rem;
    color: var(--gold);
    font-weight: 600;
}

.notification-badge {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: var(--danger);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-primary);
}

/* --- User Menu --- */
.user-menu {
    position: relative;
    cursor: pointer;
}

.avatar-sm {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    border: 2px solid var(--border-color);
    object-fit: cover;
    transition: border-color var(--transition);
}

.avatar-sm:hover {
    border-color: var(--gold);
}

.user-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 200px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 8px 0;
    box-shadow: var(--shadow-card);
    z-index: 1100;
}

.user-dropdown.show {
    display: block;
    animation: fadeIn 0.2s ease;
}

.user-dropdown a,
.user-dropdown button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-family: 'Tajawal', sans-serif;
    background: none;
    border: none;
    width: 100%;
    cursor: pointer;
    transition: all var(--transition);
}

.user-dropdown a:hover,
.user-dropdown button:hover {
    background: var(--bg-tertiary);
    color: var(--gold);
}

.user-dropdown a i,
.user-dropdown button i {
    width: 18px;
    text-align: center;
    color: var(--gold);
    opacity: 0.7;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 6px 0;
}

/* ============================================
   CONTENT AREA
   ============================================ */
.content-area {
    padding: 25px;
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
    padding: 12px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 15px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease;
}

.alert-success {
    background: rgba(46, 204, 113, 0.1);
    border: 1px solid rgba(46, 204, 113, 0.3);
    color: #2ecc71;
}

.alert-danger {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.3);
    color: #e74c3c;
}

/* ============================================
   SECTION HEADERS
   ============================================ */
.novel-section {
    margin-bottom: 35px;
    animation: fadeIn 0.5s ease;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.section-title {
    color: var(--gold);
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
}

.section-title i {
    font-size: 0.95rem;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to left, transparent, var(--border-color));
    margin-right: 12px;
}

.section-header .section-title::after {
    display: none;
}

.see-all {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-muted);
    transition: color var(--transition);
    white-space: nowrap;
}

.see-all:hover {
    color: var(--gold);
}

.see-all i {
    font-size: 0.7rem;
    margin-right: 4px;
}

/* ============================================
   NOVEL CARD
   ============================================ */
.novel-card {
    width: 155px;
    flex-shrink: 0;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid transparent;
    transition: all var(--transition);
    cursor: pointer;
    position: relative;
    display: block;
}

.novel-card:hover {
    border-color: var(--gold);
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(201, 168, 76, 0.15);
    color: inherit;
}

.novel-card .cover {
    aspect-ratio: 2 / 3;
    width: 100%;
    overflow: hidden;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    position: relative;
    background: var(--bg-tertiary);
}

.novel-card .cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.novel-card:hover .cover img {
    transform: scale(1.05);
}

.novel-card .cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    color: var(--text-muted);
    font-size: 2rem;
}

/* --- Card Badges --- */
.novel-card .exclusive-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--bg-primary);
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    gap: 3px;
    z-index: 2;
}

.novel-card .completed-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(46, 204, 113, 0.9);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    z-index: 2;
}

/* --- Card Info --- */
.novel-card .info,
.novel-card .card-body {
    padding: 10px;
}

.novel-card .novel-title,
.novel-card .card-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.novel-card .novel-author,
.novel-card .card-author {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.novel-card .novel-stats,
.novel-card .card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.novel-card .novel-stats i,
.novel-card .card-meta i {
    color: var(--gold);
    opacity: 0.7;
    margin-left: 3px;
    font-size: 0.65rem;
}

/* ============================================
   NOVEL GRID (for listing pages)
   ============================================ */
.novel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    gap: 20px;
}

.novel-grid .novel-card {
    width: 100%;
}

/* ============================================
   HORIZONTAL SCROLL
   ============================================ */
.horizontal-scroll {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 10px;
    scroll-snap-type: x mandatory;
}

.horizontal-scroll::-webkit-scrollbar {
    height: 4px;
}

.horizontal-scroll::-webkit-scrollbar-thumb {
    background: var(--gold-dark);
    border-radius: var(--radius-full);
}

.horizontal-scroll .novel-card {
    min-width: 155px;
    max-width: 155px;
    flex-shrink: 0;
    scroll-snap-align: start;
}

/* ============================================
   BANNER SLIDER
   ============================================ */
.banner-slider {
    width: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 30px;
    position: relative;
    border: 1px solid var(--border-color);
}

.banner-track {
    display: flex;
    transition: transform 0.5s ease;
    direction: ltr;
}

.banner-slide {
    min-width: 100%;
    flex-shrink: 0;
}

.banner-slide img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.banner-overlay {
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    padding: 30px 24px 20px;
    background: linear-gradient(to top, rgba(5, 5, 16, 0.9), transparent);
}

.banner-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.banner-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.banner-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
}

.banner-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all var(--transition);
}

.banner-dots .dot.active {
    background: var(--gold);
    width: 24px;
}

/* ============================================
   CATEGORIES
   ============================================ */
.categories-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all var(--transition);
    cursor: pointer;
    font-family: 'Tajawal', sans-serif;
}

.category-chip:hover,
.category-chip.active {
    border-color: var(--gold);
    color: var(--gold);
    background: rgba(201, 168, 76, 0.08);
}

.category-chip .category-count {
    font-size: 0.7rem;
    background: rgba(201, 168, 76, 0.15);
    color: var(--gold);
    padding: 1px 6px;
    border-radius: var(--radius-full);
}

.category-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-gold {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    background: linear-gradient(135deg, #c9a84c, #a08030);
    color: #0a0a18;
    font-family: 'Tajawal', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

.btn-gold:hover {
    background: linear-gradient(135deg, #e8d48b, #c9a84c);
    box-shadow: var(--shadow-gold);
    color: #0a0a18;
    transform: translateY(-2px);
}

.btn-gold.btn-sm {
    padding: 7px 18px;
    font-size: 0.85rem;
    border-radius: 6px;
}

.btn-gold.btn-lg {
    padding: 14px 36px;
    font-size: 1.05rem;
}

.btn-outline-gold {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    background: transparent;
    color: var(--gold);
    font-family: 'Tajawal', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    border: 1px solid var(--gold);
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

.btn-outline-gold:hover {
    background: rgba(201, 168, 76, 0.1);
    border-color: var(--gold-light);
    color: var(--gold-light);
}

.btn-outline-gold.btn-sm {
    padding: 7px 18px;
    font-size: 0.85rem;
}

.btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    background: var(--danger);
    color: #fff;
    font-family: 'Tajawal', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-danger:hover {
    opacity: 0.85;
}

/* ============================================
   BADGES
   ============================================ */
.badge-gold {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: rgba(201, 168, 76, 0.15);
    color: var(--gold);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.badge-success {
    background: rgba(46, 204, 113, 0.15);
    color: var(--success);
    border-color: rgba(46, 204, 113, 0.3);
}

.badge-danger {
    background: rgba(231, 76, 60, 0.15);
    color: var(--danger);
    border-color: rgba(231, 76, 60, 0.3);
}

.badge-purple {
    background: rgba(108, 92, 231, 0.15);
    color: var(--purple-accent);
    border-color: rgba(108, 92, 231, 0.3);
}

/* ============================================
   DARK PANEL / CARD
   ============================================ */
.dark-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 20px;
}

.dark-panel .panel-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dark-panel .panel-title i {
    color: var(--gold);
}

/* ============================================
   TABS
   ============================================ */
.tab-nav {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
    overflow-x: auto;
}

.tab-nav .tab-item,
.tab-btn {
    padding: 12px 24px;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: all var(--transition);
    cursor: pointer;
    white-space: nowrap;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    font-family: 'Tajawal', sans-serif;
}

.tab-nav .tab-item:hover,
.tab-btn:hover {
    color: var(--text-secondary);
}

.tab-nav .tab-item.active,
.tab-btn.active {
    color: var(--gold);
    border-bottom-color: var(--gold);
}

/* ============================================
   PROGRESS BAR
   ============================================ */
.progress-bar {
    width: 100%;
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar .progress-fill {
    height: 100%;
    background: var(--gold);
    border-radius: 2px;
    transition: width 0.5s ease;
}

/* ============================================
   AVATARS
   ============================================ */
.avatar {
    border-radius: var(--radius-full);
    border: 2px solid var(--border-color);
    object-fit: cover;
    width: 50px;
    height: 50px;
}

.avatar-xs { width: 28px; height: 28px; }
.avatar-sm { width: 36px; height: 36px; border: 2px solid var(--border-color); }
.avatar-md { width: 48px; height: 48px; }
.avatar-lg { width: 90px; height: 90px; border: 3px solid var(--gold); }
.avatar-xl { width: 96px; height: 96px; border: 3px solid var(--gold); }
.avatar-xxl { width: 120px; height: 120px; border: 3px solid var(--gold); }

/* ============================================
   FORM CONTROLS
   ============================================ */
.form-control-dark {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: #fff;
    font-family: 'Tajawal', sans-serif;
    font-size: 0.95rem;
    outline: none;
    transition: all var(--transition);
}

.form-control-dark:focus {
    border-color: var(--gold);
    box-shadow: 0 0 10px rgba(201, 168, 76, 0.1);
}

.form-control-dark::placeholder {
    color: var(--text-muted);
}

textarea.form-control-dark {
    min-height: 120px;
    resize: vertical;
}

select.form-control-dark {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23606078' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 14px center;
    padding-left: 36px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group {
    margin-bottom: 18px;
}

.form-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.form-error {
    font-size: 0.8rem;
    color: var(--danger);
    margin-top: 4px;
}

/* ============================================
   STAT CARDS
   ============================================ */
.stat-number {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--gold);
    line-height: 1;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-align: center;
}

/* ============================================
   PAGE HEADER
   ============================================ */
.page-header {
    margin-bottom: 25px;
}

.page-title {
    color: var(--gold);
    font-size: 1.4rem;
    font-weight: 700;
}

/* ============================================
   CHAPTERS LIST
   ============================================ */
.chapters-list .chapter-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    transition: background var(--transition);
}

.chapters-list .chapter-item:hover {
    background: var(--bg-tertiary);
}

/* ============================================
   COMMENTS
   ============================================ */
.comment-item {
    display: flex;
    gap: 12px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.comment-item .comment-avatar {
    flex-shrink: 0;
}

.comment-item .comment-body {
    flex: 1;
}

.comment-item .comment-author {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.comment-item .comment-author span {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-right: 8px;
}

.comment-item .comment-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.comment-item .comment-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.comment-item .comment-actions button {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: 'Tajawal', sans-serif;
    transition: color var(--transition);
}

.comment-item .comment-actions button:hover {
    color: var(--gold);
}

/* ============================================
   NOTIFICATIONS
   ============================================ */
.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    transition: background var(--transition);
}

.notification-item:hover {
    background: var(--bg-tertiary);
}

.notification-item.unread {
    background: rgba(201, 168, 76, 0.05);
    border-right: 3px solid var(--gold);
}

.notification-item .notif-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    flex-shrink: 0;
}

.notification-item .notif-content {
    flex: 1;
}

.notification-item .notif-text {
    font-size: 0.9rem;
    color: var(--text-primary);
    line-height: 1.5;
}

.notification-item .notif-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 15px;
    opacity: 0.5;
    display: block;
}

.empty-state h3 {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 0.9rem;
    color: var(--text-muted);
    max-width: 360px;
    margin: 0 auto 20px;
}

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
}

.modal-overlay.show {
    opacity: 1;
    pointer-events: all;
}

.modal-dark {
    background: var(--bg-secondary);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 500px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-card);
    animation: fadeIn 0.3s ease;
}

.modal-dark .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-dark .modal-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gold);
}

.modal-dark .modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px;
    transition: color var(--transition);
}

.modal-dark .modal-close:hover {
    color: var(--danger);
}

.modal-dark .modal-body {
    padding: 24px;
}

.modal-dark .modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
}

/* ============================================
   READING CONTENT
   ============================================ */
.reading-content {
    max-width: 720px;
    margin: 0 auto;
    padding: 32px 24px;
    font-size: 1.15rem;
    line-height: 2;
    color: var(--text-primary);
}

.reading-content p {
    margin-bottom: 1.2em;
    text-align: justify;
}

.reading-content h2,
.reading-content h3 {
    color: var(--gold);
    margin: 1.5em 0 0.8em;
}

.reading-toolbar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-card);
    z-index: 800;
}

.reading-toolbar button {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.reading-toolbar button:hover {
    color: var(--gold);
    background: var(--bg-tertiary);
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 32px;
}

.pagination .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: all var(--transition);
}

.pagination .page-link:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.pagination .page-link.active {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--bg-primary);
    font-weight: 700;
}

.pagination .page-link.disabled {
    opacity: 0.3;
    pointer-events: none;
}

/* ============================================
   TAGS
   ============================================ */
.tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 0.8rem;
    border-radius: var(--radius-full);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* ============================================
   SKELETON / LOADING
   ============================================ */
.skeleton {
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-secondary) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}

.skeleton-card .skeleton-cover {
    aspect-ratio: 2 / 3;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.skeleton-card .skeleton-title {
    height: 14px;
    margin: 12px;
    width: 70%;
}

.skeleton-card .skeleton-author {
    height: 10px;
    margin: 0 12px 12px;
    width: 50%;
}

/* ============================================
   GUEST / AUTH PAGES
   ============================================ */
.guest-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.guest-page::before {
    background-image:
        radial-gradient(2px 2px at 10% 20%, rgba(201,168,76,0.5) 0%, transparent 100%),
        radial-gradient(2px 2px at 30% 65%, rgba(255,255,255,0.4) 0%, transparent 100%),
        radial-gradient(1.5px 1.5px at 50% 10%, rgba(201,168,76,0.4) 0%, transparent 100%),
        radial-gradient(2px 2px at 70% 80%, rgba(255,255,255,0.3) 0%, transparent 100%),
        radial-gradient(1.5px 1.5px at 90% 30%, rgba(201,168,76,0.3) 0%, transparent 100%),
        radial-gradient(1px 1px at 15% 85%, rgba(255,255,255,0.25) 0%, transparent 100%),
        radial-gradient(1px 1px at 45% 45%, rgba(201,168,76,0.2) 0%, transparent 100%),
        radial-gradient(2px 2px at 85% 60%, rgba(255,255,255,0.3) 0%, transparent 100%);
}

.guest-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
}

.auth-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 40px 32px;
    box-shadow: var(--shadow-card);
}

.auth-card .auth-logo {
    text-align: center;
    margin-bottom: 32px;
}

.auth-card .auth-logo img {
    width: 64px;
    height: 64px;
    margin: 0 auto 12px;
    border-radius: var(--radius-lg);
}

.auth-card .auth-logo h1 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--gold);
}

.auth-card .auth-logo p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--gold);
    font-weight: 600;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-gold { color: var(--gold); }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-center { text-align: center; }
.text-sm { font-size: 0.85rem; }
.text-xs { font-size: 0.75rem; }

.fw-400 { font-weight: 400; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }

.d-flex { display: flex; }
.d-grid { display: grid; }
.d-none { display: none; }
.d-block { display: block; }
.flex-wrap { flex-wrap: wrap; }
.align-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }
.gap-24 { gap: 24px; }

.mb-0 { margin-bottom: 0; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }

.p-16 { padding: 16px; }
.p-20 { padding: 20px; }
.p-24 { padding: 24px; }

.w-full { width: 100%; }
.rounded-lg { border-radius: var(--radius-lg); }
.overflow-hidden { overflow: hidden; }

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

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

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes pulse-gold {
    0%, 100% { box-shadow: 0 0 0 0 rgba(201, 168, 76, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(201, 168, 76, 0); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

.animate-fadeIn { animation: fadeIn 0.4s ease; }
.animate-slideIn { animation: slideIn 0.4s ease; }
.animate-pulse-gold { animation: pulse-gold 2s infinite; }

/* ============================================
   SIDEBAR OVERLAY (mobile)
   ============================================ */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999;
    backdrop-filter: blur(2px);
}

.sidebar-overlay.show {
    display: block;
}

/* ============================================
   WALLET NOTIFICATION (inline)
   ============================================ */
.wallet-notification {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: var(--bg-card);
    border: 1px solid var(--gold);
    color: var(--gold);
    padding: 12px 20px;
    border-radius: 10px;
    z-index: 99999;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.wallet-notification.show {
    transform: translateY(0);
    opacity: 1;
}

.wallet-notification i {
    margin-left: 8px;
}

.balance-updated {
    animation: pulse-gold 0.5s ease;
}

/* ============================================
   RESPONSIVE - TABLET (max 1024px)
   ============================================ */
@media (max-width: 1024px) {
    .sidebar {
        width: 60px;
    }

    .sidebar .logo-text,
    .sidebar .logo-moon,
    .sidebar .nav-item span {
        display: none;
    }

    .sidebar .nav-item {
        justify-content: center;
        padding: 14px 0;
        margin: 3px 6px;
    }

    .sidebar .nav-item i {
        font-size: 1.15rem;
    }

    .sidebar .logo {
        padding: 16px 10px;
    }

    .nav-divider {
        margin: 12px 10px;
    }

    .main-content {
        margin-right: 60px;
    }

    .sidebar-footer {
        padding: 10px 8px;
    }

    .create-novel-btn span {
        display: none;
    }

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

    .content-area {
        padding: 20px 16px;
    }
}

/* ============================================
   RESPONSIVE - MOBILE (max 768px)
   ============================================ */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        right: -260px;
        width: 240px;
        transition: right var(--transition);
        z-index: 1100;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.5);
    }

    .sidebar.open {
        right: 0;
    }

    .sidebar .logo-text,
    .sidebar .logo-moon,
    .sidebar .nav-item span {
        display: inline;
    }

    .sidebar .nav-item {
        justify-content: flex-start;
        padding: 10px 20px;
        margin: 3px 10px;
    }

    .sidebar-footer {
        padding: 15px;
    }

    .create-novel-btn span {
        display: inline;
    }

    .main-content {
        margin-right: 0;
    }

    .main-content.sidebar-collapsed {
        margin-right: 0;
    }

    .hamburger {
        display: flex;
    }

    .top-header {
        padding: 0 14px;
    }

    .search-container {
        max-width: none;
    }

    .coins-display span {
        display: none;
    }

    .content-area {
        padding: 16px 12px;
    }

    .novel-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 12px;
    }

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

    .horizontal-scroll .novel-card {
        min-width: 140px;
        max-width: 140px;
    }

    .reading-content {
        padding: 20px 14px;
        font-size: 1.05rem;
    }

    .stat-number {
        font-size: 1.3rem;
    }

    .auth-card {
        padding: 28px 20px;
    }

    .sidebar-overlay.show {
        display: block;
    }

    .banner-slide img {
        height: 160px;
    }
}

/* ============================================
   RESPONSIVE - SMALL MOBILE (max 480px)
   ============================================ */
@media (max-width: 480px) {
    .novel-card {
        width: 130px;
    }

    .novel-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 10px;
    }

    .horizontal-scroll .novel-card {
        min-width: 130px;
        max-width: 130px;
    }

    .horizontal-scroll {
        gap: 10px;
    }

    .novel-card .info,
    .novel-card .card-body {
        padding: 8px;
    }

    .novel-card .novel-title,
    .novel-card .card-title {
        font-size: 0.78rem;
    }

    .novel-card .novel-author,
    .novel-card .card-author {
        font-size: 0.68rem;
    }

    .novel-card .novel-stats,
    .novel-card .card-meta {
        font-size: 0.65rem;
    }

    .banner-slide img {
        height: 140px;
    }

    .btn-gold, .btn-outline-gold {
        padding: 8px 18px;
        font-size: 0.85rem;
    }

    .content-area {
        padding: 12px 10px;
    }

    .top-header {
        gap: 8px;
    }

    .header-icon,
    .header-btn {
        width: 34px;
        height: 34px;
        font-size: 1rem;
    }

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

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    position: relative;
    background: linear-gradient(180deg, var(--bg-primary) 0%, #0f000f 20%, #1a0520 60%, #2B124C 100%);
    margin-top: 60px;
    overflow: hidden;
}
.footer-glow {
    position: absolute;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 160px;
    background: radial-gradient(ellipse, rgba(82,43,91,.3) 0%, transparent 70%);
    pointer-events: none;
}
.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 70px 40px 30px;
    position: relative;
    z-index: 2;
}
.footer-top {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
    gap: 50px;
    margin-bottom: 40px;
}

/* About column */
.footer-about {}
.footer-logo { margin-bottom: 18px; }
.footer-logo-img {
    height: 80px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(133,79,108,.3));
}
.footer-desc {
    color: #854F6C;
    font-size: 13.5px;
    line-height: 1.85;
    margin-bottom: 22px;
}
.footer-socials {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.footer-social-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid #522B5B;
    background: rgba(43,18,76,.4);
    color: #DFB6B2;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s;
}
.footer-social-btn:hover {
    border-color: #DFB6B2;
    background: rgba(82,43,91,.5);
    color: #FBE4D8;
    transform: translateY(-3px);
}

/* Column headings */
.footer-heading {
    font-family: 'Cairo', sans-serif;
    font-weight: 800;
    font-size: 16px;
    color: #FBE4D8;
    margin-bottom: 18px;
    position: relative;
    padding-bottom: 10px;
}
.footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, #DFB6B2, transparent);
    border-radius: 2px;
}

/* Links */
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-links li {
    margin-bottom: 12px;
}
.footer-links a {
    color: #854F6C;
    text-decoration: none;
    font-size: 13.5px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}
.footer-links a i {
    font-size: 9px;
    transition: transform 0.3s;
}
.footer-links a:hover {
    color: #DFB6B2;
    padding-right: 5px;
}
.footer-links a:hover i {
    transform: translateX(-4px);
}

/* Contact links */
.footer-contact a i {
    font-size: 14px;
    width: 18px;
    text-align: center;
}

/* App badges */
.footer-apps {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.app-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border: 1px solid #522B5B;
    border-radius: 10px;
    background: rgba(43,18,76,.3);
    color: #DFB6B2;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s;
}
.app-badge:hover {
    border-color: #DFB6B2;
    background: rgba(82,43,91,.4);
    color: #FBE4D8;
    transform: translateY(-2px);
}

/* Divider */
.footer-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #522B5B 30%, #522B5B 70%, transparent);
    margin: 10px 0 20px;
}

/* Bottom */
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}
.footer-copy {
    color: #522B5B;
    font-size: 13px;
}
.footer-legal {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12.5px;
}
.footer-legal a {
    color: #854F6C;
    text-decoration: none;
    transition: color 0.3s;
}
.footer-legal a:hover {
    color: #DFB6B2;
}
.footer-legal span {
    color: #522B5B;
}

/* Responsive */
@media (max-width: 1024px) {
    .footer-top {
        grid-template-columns: 1fr 1fr;
        gap: 35px;
    }
}
@media (max-width: 768px) {
    .footer-top {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .footer-inner {
        padding: 50px 25px 25px;
    }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* ============================================
   TOP BAR RESPONSIVE
   ============================================ */
@media (max-width: 1200px) {
    .top-nav-item span { display: none; }
    .top-nav-item { padding: 8px 10px; }
    .top-nav-item i { font-size: 1rem; }
    .top-create-btn span { display: none; }
    .top-create-btn { padding: 8px 12px; }
}
@media (max-width: 900px) {
    .top-nav {
        display: none;
        position: absolute;
        top: 62px;
        right: 0;
        left: 0;
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border-color);
        flex-direction: column;
        padding: 10px;
        gap: 2px;
        box-shadow: 0 10px 30px rgba(0,0,0,.5);
    }
    .top-nav.mobile-open { display: flex; }
    .top-nav-item span { display: inline; }
    .top-nav-item { justify-content: flex-end; padding: 12px 16px; }
    .hamburger { display: flex; }
    .top-search { width: 140px; }
    .top-search:focus-within { width: 200px; }
    .top-logo-text { display: none; }
    .page-content { padding: 16px 15px 30px; }
}
@media (max-width: 480px) {
    .top-bar-inner { padding: 0 12px; gap: 8px; }
    .top-search { display: none; }
    .top-create-btn { display: none; }
}

/* Avatar placeholder */
.top-avatar-ph{display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#522B5B,#854F6C);object-fit:unset}
.top-avatar-ph span{font-family:'Cairo',sans-serif;font-size:1rem;font-weight:900;color:#FBE4D8}

/* LTR Support for English */
html[dir="ltr"] .top-nav { direction: ltr; }
html[dir="ltr"] .section-header { flex-direction: row-reverse; }
html[dir="ltr"] .horizontal-scroll { direction: ltr; }
html[dir="ltr"] .footer-heading::after { right: auto; left: 0; }
html[dir="ltr"] .footer-links a i { transform: rotate(180deg); }
html[dir="ltr"] .novel-card .info { text-align: left; }
html[dir="ltr"] .page-title { text-align: left; }
html[dir="ltr"] .pf-header { direction: ltr; }
html[dir="ltr"] .pf-stats { direction: ltr; }
