/* ==========================================================================
   سامع — Samaa | Arabic Audiobooks
   Dark Luxury RTL Theme for Middle East Market
   ========================================================================== */

:root {
    --bg-dark:      #0a0a0d;
    --bg-surface:   #12121a;
    --bg-card:      #1a1a27;
    --border-gold:  #b89660;
    --border-dark:  #2a2a3a;
    --text-primary: #f5f5f5;
    --text-secondary: #b8b8b8;
    --text-muted:   #888888;
    --accent-gold:  #d4af37;
    --accent-gold-dark: #a88a2a;
    --accent-blue:  #165dff;
    --gold-gradient: linear-gradient(135deg, #d4af37 0%, #f0c14b 50%, #d4af37 100%);
    --dark-gradient: linear-gradient(180deg, #12121a 0%, #0a0a0d 100%);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.4);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.6);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.8);
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Amiri", "Traditional Arabic",
        "Droid Arabic Kufi", "Tahoma", sans-serif;
    background: var(--bg-dark);
    background: var(--dark-gradient);
    color: var(--text-primary);
    line-height: 1.8;
    min-height: 100vh;
    direction: rtl;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ── Typography (Arabic) ───────────────────────────────────────────── */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.6;
    color: var(--text-primary);
}

h1 { font-size: 2.4rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.25rem; }

p {
    color: var(--text-secondary);
}

a {
    color: var(--accent-gold);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--gold-gradient);
    text-decoration: underline;
}

/* ── Header ─────────────────────────────────────────────────────────── */
.site-header {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-dark);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
}

.logo .logo-text {
    font-family: "Amiri", serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--accent-gold);
    letter-spacing: 2px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.main-nav a {
    font-size: 15px;
    color: var(--text-secondary);
    padding: 6px 0;
    border-bottom: 2px solid transparent;
}

.main-nav a:hover {
    color: var(--accent-gold);
    border-bottom-color: var(--accent-gold);
    text-decoration: none;
}

.badge.premium {
    background: var(--gold-gradient);
    color: var(--bg-dark);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--accent-gold);
    font-size: 24px;
    cursor: pointer;
}

.mobile-menu {
    display: none;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-dark);
}

.mobile-menu nav {
    display: flex;
    flex-direction: column;
    padding: 16px;
    gap: 12px;
}

.mobile-menu a {
    padding: 8px 12px;
    border-radius: var(--radius-sm);
}

.mobile-menu a:hover {
    background: var(--bg-card);
}

/* ── Hero Section ───────────────────────────────────────────────────── */
.hero {
    padding: 60px 0;
    background: linear-gradient(135deg, #0a0a0d 0%, #12121a 100%);
}

.hero-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.hero-title {
    font-family: "Amiri", serif;
    font-size: 3rem;
    line-height: 1.4;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.8;
}

.hero-cta {
    display: flex;
    gap: 16px;
    margin-bottom: 36px;
}

.hero-features {
    display: flex;
    gap: 24px;
}

.hero-features .feature {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 1rem;
}

.hero-visual {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hero-cover {
    perspective: 1000px;
}

.cover-card {
    position: relative;
    padding: 32px 24px;
    border-radius: var(--radius-lg);
    color: white;
    margin-bottom: -20px;
    transform: rotate(-3deg);
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease;
}

.cover-card:nth-child(2) {
    transform: rotate(1deg) translateX(20px);
    z-index: 2;
}

.cover-card:nth-child(3) {
    transform: rotate(-2deg) translateX(-10px);
    z-index: 1;
}

.cover-card:hover {
    transform: rotate(0deg) scale(1.02) !important;
}

.cover-title {
    font-family: "Amiri", serif;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
}

.cover-author {
    font-size: 14px;
    opacity: 0.9;
}

.play-badge {
    position: absolute;
    bottom: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Buttons ─────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 32px;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-primary {
    background: var(--gold-gradient);
    color: var(--bg-dark);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
    color: var(--bg-dark);
    text-decoration: none;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-gold);
    color: var(--accent-gold);
}

.btn-outline:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: var(--accent-gold);
    color: var(--accent-gold);
    text-decoration: none;
}

.btn-large {
    padding: 16px 40px;
    font-size: 18px;
}

.btn-block {
    display: block;
    width: 100%;
}

/* ── Section Headers ────────────────────────────────────────────────── */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.section-header h2 {
    color: var(--text-primary);
}

.section-header a {
    color: var(--accent-gold);
    font-size: 15px;
}

.featured-section, .recent-section {
    padding: 60px 0;
}

/* ── Books Grid ───────────────────────────────────────────────────────── */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

.book-card {
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s ease;
}

.book-card:hover {
    border-color: var(--border-gold);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.book-cover {
    position: relative;
    padding: 40px 20px 60px;
    text-align: center;
}

.book-cover .book-title {
    font-family: "Amiri", serif;
    font-size: 22px;
    font-weight: 700;
    color: white;
    margin-bottom: 6px;
}

.book-cover .book-author {
    font-size: 14px;
    color: rgba(255,255,255,0.85);
}

.book-cover .chapter-count {
    position: absolute;
    bottom: 12px;
    right: 12px;
    font-size: 12px;
    background: rgba(0,0,0,0.3);
    padding: 4px 10px;
    border-radius: 12px;
    color: rgba(255,255,255,0.9);
}

.book-info {
    padding: 16px;
}

.book-info h3 {
    font-size: 18px;
    margin-bottom: 4px;
}

.book-info .author {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 4px;
}

.book-info .category {
    color: var(--text-muted);
    font-size: 13px;
}

/* ── Why Section ─────────────────────────────────────────────────────── */
.why-section {
    padding: 60px 0;
    background: var(--bg-surface);
}

.why-title {
    text-align: center;
    margin-bottom: 40px;
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}

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

.why-card .why-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.why-card h3 {
    margin-bottom: 10px;
    color: var(--accent-gold);
}

.why-card p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* ── CTA Bottom ─────────────────────────────────────────────────────── */
.cta-bottom {
    padding: 60px 0;
}

.cta-inner {
    background: linear-gradient(135deg, #1a1a27 0%, #0a0a0d 100%);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-lg);
    padding: 48px;
    text-align: center;
}

.cta-inner h2 {
    margin-bottom: 12px;
}

.cta-inner p {
    margin-bottom: 28px;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* ── Book Detail Page ────────────────────────────────────────────────── */
.page-header {
    padding: 32px 0 20px;
    text-align: center;
}

.page-header h1 {
    margin-bottom: 8px;
}

.page-header p {
    color: var(--text-secondary);
}

.book-detail-page {
    padding-bottom: 60px;
}

.book-header {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 32px;
    margin-bottom: 40px;
    align-items: start;
}

.book-cover-big {
    border-radius: var(--radius-lg);
    overflow: hidden;
    padding: 60px 20px;
    text-align: center;
}

.book-cover-big .inner h1 {
    color: white;
    font-family: "Amiri", serif;
    font-size: 28px;
    margin-bottom: 8px;
}

.book-cover-big .inner p {
    color: rgba(255,255,255,0.9);
    font-size: 16px;
}

.book-info-big .book-title-block h1 {
    margin-bottom: 6px;
}

.book-info-big .author {
    color: var(--text-secondary);
    font-size: 18px;
    margin-bottom: 20px;
}

.book-meta {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.meta-item {
    background: var(--bg-card);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
}

.meta-label {
    font-size: 12px;
    color: var(--text-muted);
    display: block;
}

.meta-value {
    font-size: 16px;
    color: var(--accent-gold);
}

.book-description {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 24px;
}

.book-description p {
    line-height: 1.8;
}

.book-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.toc-section {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--border-dark);
}

.toc-section h2 {
    margin-bottom: 16px;
}

.chapters-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chapter-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    color: var(--text-primary);
}

.chapter-item:hover {
    border-color: var(--border-gold);
}

.chapter-item.locked {
    opacity: 0.6;
}

.chapter-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chapter-number {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-surface);
    border-radius: 50%;
    font-size: 13px;
    color: var(--accent-gold);
    font-weight: 700;
}

.chapter-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chapter-meta .duration {
    font-size: 13px;
    color: var(--text-muted);
}

.chapter-meta .play-icon {
    color: var(--accent-gold);
    font-size: 16px;
}

.chapter-meta .lock-icon {
    font-size: 18px;
}

/* ── Listen Page ─────────────────────────────────────────────────────── */
.listen-page {
    padding: 32px 0 60px;
}

.listen-header {
    margin-bottom: 24px;
}

.listen-header .back-link {
    display: inline-block;
    margin-bottom: 8px;
}

.listen-title h2 {
    margin-bottom: 4px;
}

.listen-title p {
    color: var(--text-secondary);
}

.player-container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 24px;
    background: var(--bg-surface);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
}

.player-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.player-cover {
    width: 240px;
    height: 240px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.player-cover .big-icon {
    font-size: 64px;
    color: rgba(255,255,255,0.8);
    margin-bottom: 12px;
}

.player-cover .player-info-text h3 {
    color: white;
    text-align: center;
    margin-bottom: 4px;
}

.player-cover .player-info-text p {
    color: rgba(255,255,255,0.8);
    text-align: center;
}

audio {
    width: 100%;
    outline: none;
}

audio::-webkit-media-controls-panel {
    background: var(--bg-card);
}

audio::-webkit-media-controls-current-time-display,
audio::-webkit-media-controls-time-remaining-display {
    color: var(--text-primary);
}

.player-progress {
    width: 100%;
    height: 6px;
    background: var(--bg-card);
    border-radius: 3px;
    cursor: pointer;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gold-gradient);
    width: 0%;
    transition: width 0.1s linear;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    justify-content: space-between;
}

.control-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.2s;
}

.control-btn:hover:not(.disabled) {
    background: var(--bg-card);
}

.control-btn.disabled {
    color: var(--text-muted);
    cursor: not-allowed;
}

.control-btn.big {
    width: 56px;
    height: 56px;
    background: var(--gold-gradient);
    color: var(--bg-dark);
}

.chapter-preview {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 20px;
}

.chapter-preview h3 {
    margin-bottom: 12px;
    color: var(--accent-gold);
}

.navigation-footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.nav-btn {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-md);
    padding: 16px;
    transition: border-color 0.2s;
    color: var(--text-primary);
}

.nav-btn:hover {
    border-color: var(--border-gold);
    color: var(--accent-gold);
    text-decoration: none;
}

.nav-btn .nav-label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
}

.nav-btn .nav-title {
    display: block;
    font-size: 16px;
    color: var(--text-primary);
}

/* ── Pricing Page ─────────────────────────────────────────────────────── */
.pricing-page {
    padding-bottom: 60px;
}

.pricing-header {
    text-align: center;
    padding: 32px 0;
}

.pricing-header h1 {
    margin-bottom: 12px;
}

.pricing-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.pricing-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    max-width: 900px;
    margin: 0 auto 48px;
}

.pricing-card {
    background: var(--bg-card);
    border: 2px solid var(--border-dark);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    position: relative;
    transition: border-color 0.3s;
}

.pricing-card.featured {
    border-color: var(--border-gold);
    transform: scale(1.05);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    right: 24px;
    background: var(--gold-gradient);
    color: var(--bg-dark);
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.pricing-header-card h3 {
    margin-bottom: 16px;
    text-align: center;
}

.price {
    text-align: center;
    margin-bottom: 24px;
}

.price .amount {
    font-size: 48px;
    font-weight: 700;
    color: var(--accent-gold);
}

.price .currency, .price .period {
    color: var(--text-muted);
    font-size: 14px;
}

.pricing-features {
    list-style: none;
    margin-bottom: 24px;
}

.pricing-features li {
    padding: 8px 0;
    color: var(--text-secondary);
    font-size: 15px;
}

.pricing-faq {
    max-width: 800px;
    margin: 0 auto;
}

.pricing-faq h2 {
    text-align: center;
    margin-bottom: 24px;
}

.faq-item {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-bottom: 12px;
}

.faq-item h3 {
    margin-bottom: 8px;
    color: var(--accent-gold);
}

.faq-item p {
    color: var(--text-secondary);
}

/* ── Login Page ──────────────────────────────────────────────────────── */
.login-page {
    padding: 60px 0;
}

.login-card {
    max-width: 480px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
}

.login-card h1 {
    text-align: center;
    margin-bottom: 24px;
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.login-form input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 15px;
}

.login-form input:focus {
    outline: none;
    border-color: var(--border-gold);
}

.login-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-dark);
    color: var(--text-secondary);
}

/* ── Filter (Books Page) ─────────────────────────────────────────────── */
.books-filter {
    margin-bottom: 28px;
}

.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: end;
}

.filter-form input[type="search"] {
    flex: 1;
    min-width: 200px;
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 15px;
}

.filter-form select {
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 15px;
    min-width: 150px;
}

.filter-form input:focus,
.filter-form select:focus {
    outline: none;
    border-color: var(--border-gold);
}

/* ── Error Page ──────────────────────────────────────────────────────── */
.error-page {
    padding: 60px 0;
}

.error-content {
    text-align: center;
}

.error-code {
    display: block;
    font-size: 8rem;
    font-weight: 700;
    color: var(--accent-gold);
    opacity: 0.3;
}

.error-content h2 {
    margin-bottom: 32px;
}

/* ── Footer ───────────────────────────────────────────────────────────── */
.site-footer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border-dark);
    padding: 32px 0;
    margin-top: auto;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: center;
}

.footer-brand .logo-text {
    font-family: "Amiri", serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--accent-gold);
    display: block;
    margin-bottom: 4px;
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 14px;
}

.footer-nav {
    display: flex;
    justify-content: flex-end;
    gap: 48px;
}

.footer-nav h4 {
    margin-bottom: 8px;
    color: var(--accent-gold);
}

.footer-nav a, .footer-nav p {
    display: block;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.8;
}

.footer-nav a:hover {
    color: var(--accent-gold);
}

.copyright {
    text-align: center;
    padding-top: 16px;
    margin-top: 16px;
    border-top: 1px solid var(--border-dark);
    color: var(--text-muted);
    font-size: 13px;
}

/* ── Bottom Player (Fixed like Ximalaya) ─────────────────────────────── */
.bottom-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-gold);
    padding: 10px 0;
    z-index: 99;
    backdrop-filter: blur(10px);
}

.player-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.player-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.player-cover {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.player-title {
    font-size: 14px;
    color: var(--text-primary);
}

.player-chapter {
    font-size: 12px;
    color: var(--text-muted);
}

.player-play {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--accent-gold);
    color: var(--bg-dark);
    border-radius: 50%;
    font-weight: 700;
}

/* ── Empty State ─────────────────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-surface);
    border: 1px dashed var(--border-dark);
    border-radius: var(--radius-lg);
}

.empty-state p {
    margin-bottom: 20px;
    color: var(--text-secondary);
}

/* ── Responsive (Mobile First for Middle East) ───────────────────────── */
@media (max-width: 968px) {
    .hero-inner {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-cta {
        flex-direction: column;
    }

    .hero-features {
        flex-direction: column;
        gap: 12px;
    }

    .book-header {
        grid-template-columns: 1fr;
    }

    .player-container {
        grid-template-columns: 1fr;
    }

    .pricing-cards {
        grid-template-columns: 1fr;
    }

    .pricing-card.featured {
        transform: none;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .footer-nav {
        justify-content: flex-start;
    }

    .main-nav {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .mobile-menu.open {
        display: block;
    }

    .books-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    .container { padding: 0 16px; }
    .book-meta { grid-template-columns: 1fr; }
}

/* ── Payment Success Page ───────────────────────────────────────────── */
.success-page {
    padding: 80px 0;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.success-card {
    max-width: 560px;
    margin: 0 auto;
    text-align: center;
    background: var(--bg-card);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-lg);
    padding: 48px 32px;
}

.success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--gold-gradient);
    color: var(--bg-dark);
    font-size: 48px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.success-card h1 {
    margin-bottom: 12px;
}

.success-card p {
    margin-bottom: 32px;
    color: var(--text-secondary);
}

.success-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ── Nav login button ───────────────────────────────────────────────── */
.btn-nav-primary {
    background: var(--gold-gradient);
    color: var(--bg-dark);
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
}

.btn-nav-primary:hover {
    color: var(--bg-dark);
    text-decoration: none;
    opacity: 0.9;
}

.nav-logout {
    color: var(--text-muted) !important;
    font-size: 13px !important;
}