/* /id/assets/css/main.css */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Syne', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: #f9fafc;
    color: #0f172a;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: background 0.3s, color 0.3s;
}

body.dark {
    background: #0d1117;
    color: #e6edf3;
}

::-webkit-scrollbar { width: 0; }

/* ===== NAVBAR ===== */
.navbar {
    width: 92%;
    position: fixed;
    top: 25px;
    left: 50%;
    transform: translate3d(-50%, 0, 0);
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 18px;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid #e5e7eb;
    backface-visibility: hidden;
    transition: background 0.3s, border-color 0.3s;
}
.dark .navbar {
    background: rgba(22, 27, 34, 0.85);
    border-color: #30363d;
}
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}
.logo img { width: 26px; object-fit: contain; }
.nav-center { display: flex; gap: 25px; }
.nav-center a {
    text-decoration: none;
    color: inherit;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
}
.nav-center a:hover { color: #2E5FE6; }
.dark .nav-center a:hover { color: #b0fc42; }
.navbar-right { display: flex; align-items: center; gap: 18px; }
.tooltip-container { position: relative; display: inline-block; }
.tooltip {
    position: absolute;
    background: #0f172a;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
    z-index: 1000;
}
.dark .tooltip { background: #e6edf3; color: #0f172a; }
.tooltip-container.active .tooltip { opacity: 1; transform: translateX(-50%) translateY(12px); }
.btn-premium {
    font-size: 28px;
    cursor: pointer;
    background: linear-gradient(50deg, #3C24F9, #F70565);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.btn-premium-free {
    font-size: 28px;
    cursor: pointer;
    color: #94a3b8;
    transition: color 0.3s ease;
}
.search-container { position: relative; cursor: pointer; font-size: 28px; display: flex; align-items: center; color: inherit; }
.menu-toggle { font-size: 30px; cursor: pointer; display: flex; align-items: center; color: inherit; }

/* ===== SIDEBAR ===== */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    z-index: 399;
}
.sidebar-overlay.active { opacity: 1; pointer-events: auto; }
.sidebar {
    position: fixed;
    top: 86px;
    right: 4%;
    width: 92%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 10px;
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    gap: 6px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.35s;
    pointer-events: none;
    z-index: 400;
}
.dark .sidebar { background: rgba(22, 27, 34, 0.85); border-color: #30363d; }
.sidebar.active { opacity: 1; transform: translateY(0); pointer-events: auto; }
.sidebar a {
    text-decoration: none;
    color: inherit;
    font-weight: 600;
    padding: 10px 14px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background 0.2s;
}
.sidebar a:hover { background: rgba(46, 95, 230, 0.08); }
.dark .sidebar a:hover { background: rgba(176, 252, 66, 0.08); }
.sidebar i { color: #2E5FE6; font-size: 18px; }
.dark .sidebar i { color: #b0fc42; }
.sidebar hr { border: none; border-top: 1px solid #e5e7eb; margin: 8px 0; }
.dark .sidebar hr { border-color: #30363d; }

/* ===== SEARCH POPUP ===== */
.search-popup {
    position: fixed;
    top: 86px;
    right: 4%;
    width: 92%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 20px;
    border: 1px solid #e5e7eb;
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 400;
}
.dark .search-popup { background: rgba(22, 27, 34, 0.85); border-color: #30363d; }
.search-popup.active { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.search-input-wrapper { position: relative; margin-bottom: 20px; }
.search-input-wrapper i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: #64748b; font-size: 20px; }
.search-input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border-radius: 16px;
    border: 1.2px solid #e5e7eb;
    background: rgba(255, 255, 255, 0.9);
    font-size: 15px;
    font-weight: 500;
    outline: none;
    color: #0f172a;
    font-family: 'Syne', sans-serif;
}
.dark .search-input { background: rgba(13, 17, 23, 0.9); border-color: #30363d; color: #e6edf3; }
.search-input:focus { border-color: #2E5FE6; box-shadow: 0 0 0 3px rgba(46, 95, 230, 0.1); }
.dark .search-input:focus { border-color: #b0fc42; box-shadow: 0 0 0 3px rgba(176, 252, 66, 0.1); }
.search-suggestions { display: flex; flex-direction: column; gap: 8px; }
.search-section-title { font-size: 13px; font-weight: 600; color: #64748b; margin-bottom: 8px; padding-left: 8px; }
.dark .search-section-title { color: #8b949e; }
.search-item { padding: 12px 16px; border-radius: 12px; display: flex; align-items: center; gap: 12px; cursor: pointer; transition: all 0.2s ease; text-decoration: none; color: inherit; }
.search-item:hover { background: rgba(46, 95, 230, 0.08); }
.dark .search-item:hover { background: rgba(176, 252, 66, 0.08); }
.search-item i { color: #2E5FE6; font-size: 18px; }
.dark .search-item i { color: #b0fc42; }
.search-item-text { display: flex; flex-direction: column; gap: 2px; }
.search-item-title { font-weight: 600; font-size: 14px; }
.search-item-subtitle { font-size: 12px; color: #64748b; }
.dark .search-item-subtitle { color: #8b949e; }

/* ===== FOOTER ===== */
footer { margin-top: auto; padding: 30px 0; border-top: 1px solid #dcdcdc; }
.dark footer { border-color: #30363d; }
.footer-bottom {
    width: 90%;
    max-width: 1200px;
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
}
@media (min-width: 768px) {
    .footer-bottom { flex-direction: row; justify-content: space-between; align-items: center; text-align: left; }
}
.footer-menu-container { display: flex; align-items: center; gap: 25px; font-size: 14px; flex-wrap: wrap; justify-content: center; }
.footer-menu { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; }
.footer-menu a { text-decoration: none; color: #666; font-size: 13px; transition: color 0.2s; }
.footer-menu a:hover { color: #2E5FE6; }
.dark .footer-menu a { color: #8b949e; }
.footer-sosmed { display: flex; align-items: center; gap: 12px; }
.footer-sosmed i { font-size: 18px; padding: 6px; cursor: pointer; color: #666; transition: color 0.2s; }
.footer-sosmed a { color: #666; text-decoration: none; transition: color 0.2s; }
.footer-sosmed a:hover { color: #2E5FE6; }
.dark .footer-sosmed i, .dark .footer-sosmed a { color: #8b949e; }
.theme-btn { cursor: pointer; }

/* ===== MAIN CONTAINER ===== */
.main-content {
    max-width: 1200px;
    margin: 100px auto 0;
    padding: 0 22px 80px;
    flex: 1;
    width: 100%;
}

/* ===== PAGE TITLE ===== */
.page-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    font-family: 'Syne', sans-serif;
}
.page-subtitle { font-size: 14px; color: #64748b; margin-bottom: 30px; }
.dark .page-subtitle { color: #8b949e; }

/* ===== SECTION TITLE ===== */
.section-title { font-size: 18px; font-weight: 700; margin-bottom: 18px; }

/* ===== CARDS ===== */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
.book-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.2s;
    text-decoration: none;
    color: inherit;
    display: block;
}
.dark .book-card { background: #131828; border-color: #1e2540; }
.book-card:hover { border-color: #3b82f6; transform: translateY(-3px); }
.book-card-cover { width: 100%; aspect-ratio: 2/3; overflow: hidden; position: relative; background: #e5e7eb; }
.dark .book-card-cover { background: #1e2540; }
.book-card-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.book-card:hover .book-card-cover img { transform: scale(1.05); }
.book-card-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 3px;
}
.book-card-badge.premium { background: linear-gradient(50deg, #3C24F9, #F70565); }
.book-card-badge i { font-size: 12px; }
.book-card-info { padding: 10px 12px; }
.book-card-category { font-size: 10px; text-transform: uppercase; color: #94a3b8; font-weight: 600; letter-spacing: 0.5px; margin-bottom: 4px; }
.book-card-title { font-size: 13px; font-weight: 700; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 4px; }
.book-card-author { font-size: 11px; color: #64748b; }
.dark .book-card-author { color: #8892a4; }
.book-card-price { font-size: 13px; font-weight: 700; color: #2E5FE6; margin-top: 6px; }
.dark .book-card-price { color: #b0fc42; }
.book-card-price.free { color: #22c55e; }

/* ===== STAT CARDS ===== */
.stat-row {
    display: flex;
    align-items: center;
    gap: 11px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 10px 13px;
    transition: border-color 0.2s;
}
.dark .stat-row { background: #131828; border-color: #1e2540; }
.stat-row:hover { border-color: #3b82f6; }
.stat-icon-wrap { width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.stat-icon-wrap i { font-size: 17px; }
.stat-icon-wrap.yellow { background: rgba(234,179,8,0.12); }
.stat-icon-wrap.yellow i { color: #eab308; }
.stat-icon-wrap.blue { background: rgba(59,130,246,0.12); }
.stat-icon-wrap.blue i { color: #60a5fa; }
.stat-icon-wrap.purple { background: rgba(85,247,200,0.12); }
.stat-icon-wrap.purple i { color: #1F9883; }
.stat-icon-wrap.red { background: rgba(247,85,85,0.12); }
.stat-icon-wrap.red i { color: #f75555; }
.stat-icon-wrap.green { background: rgba(34,197,94,0.12); }
.stat-icon-wrap.green i { color: #22c55e; }
.stat-label { font-size: 10px; color: #64748b; font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }
.dark .stat-label { color: #5a6377; }
.stat-value { font-size: 13px; font-weight: 600; margin-top: 1px; }

/* ===== BUTTONS ===== */
.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    background: #0d41e1;
    border: 2.5px solid #456fe8;
    box-shadow: 0 6px 0px #456fe8;
    border-radius: 16px;
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Syne', sans-serif;
    text-decoration: none;
    width: 100%;
}
.btn-primary:hover { background: #1e40af; transform: translateY(-2px); box-shadow: 0 8px 0px #456fe8; }
.btn-primary:active { transform: translateY(6px); box-shadow: none; }
.btn-primary i { font-size: 20px; }
.btn-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: transparent;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    color: inherit;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Syne', sans-serif;
    text-decoration: none;
}
.btn-secondary:hover { border-color: #2E5FE6; color: #2E5FE6; }
.dark .btn-secondary { border-color: #30363d; }
.dark .btn-secondary:hover { border-color: #b0fc42; color: #b0fc42; }

/* ===== FORM ===== */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; color: #475569; }
.dark .form-label { color: #8b949e; }
.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    font-size: 14px;
    font-family: 'Syne', sans-serif;
    color: #0f172a;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.dark .form-input { background: #131828; border-color: #1e2540; color: #e6edf3; }
.form-input:focus { border-color: #2E5FE6; box-shadow: 0 0 0 3px rgba(46,95,230,0.1); }
.dark .form-input:focus { border-color: #b0fc42; box-shadow: 0 0 0 3px rgba(176,252,66,0.1); }
.form-hint { font-size: 12px; color: #94a3b8; margin-top: 6px; }

/* ===== TAGS ===== */
.tag {
    display: inline-block;
    padding: 6px 14px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
}
.dark .tag { background: #131828; border-color: #1e2540; color: #8892a4; }
.tag:hover { border-color: #3b82f6; color: #3b82f6; }

/* ===== ALERT ===== */
.alert { padding: 14px 18px; border-radius: 12px; font-size: 14px; margin-bottom: 20px; border: 1px solid; display: flex; align-items: center; gap: 10px; }
.alert-success { background: rgba(34,197,94,0.1); border-color: #22c55e; color: #166534; }
.dark .alert-success { color: #86efac; }
.alert-error { background: rgba(239,68,68,0.1); border-color: #ef4444; color: #991b1b; }
.dark .alert-error { color: #fca5a5; }
.alert-info { background: rgba(59,130,246,0.1); border-color: #3b82f6; color: #1e40af; }
.dark .alert-info { color: #93c5fd; }

/* ===== EMPTY STATE ===== */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-state i { font-size: 48px; color: #94a3b8; margin-bottom: 16px; display: block; }
.empty-state h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.empty-state p { font-size: 14px; color: #64748b; max-width: 300px; margin: 0 auto 24px; }
.dark .empty-state p { color: #8b949e; }

/* ===== LOADING ===== */
.loading { display: flex; align-items: center; justify-content: center; padding: 40px; }
.spinner { width: 32px; height: 32px; border: 3px solid #e5e7eb; border-top-color: #2E5FE6; border-radius: 50%; animation: spin 0.8s linear infinite; }
.dark .spinner { border-color: #30363d; border-top-color: #b0fc42; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    .nav-center { display: none; }
    .sidebar .mobile-only { display: flex; }
}
@media (min-width: 993px) {
    .sidebar .mobile-only { display: none !important; }
}
@media (max-width: 768px) {
    .main-content { margin-top: 90px; padding: 0 16px 80px; }
    .page-title { font-size: 22px; }
    .card-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .footer-bottom { flex-direction: column; gap: 16px; }
    .footer-menu-container { flex-direction: column; gap: 12px; }
}
