/**
 * akitap.com.tr - Modern Frontend Design System
 * Version: 2.0.0
 * Architecture: Clean, High-Fidelity, Responsive
 */

:root {
    --brand-primary: #6366f1;
    --brand-primary-dark: #4f46e5;
    --brand-secondary: #8b5cf6;
    --brand-accent: #f43f5e;
    --brand-pink: #ec4899;
    --brand-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #d946ef 100%);
    --ai-gradient: linear-gradient(135deg, #7c3aed 0%, #ec4899 100%);
    --hero-bg: radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.12) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(217, 70, 239, 0.1) 0px, transparent 50%),
        radial-gradient(at 50% 100%, rgba(14, 165, 233, 0.08) 0px, transparent 50%),
        #f8fafc;
    --card-glass: rgba(255, 255, 255, 0.85);
    --border-glass: rgba(226, 232, 240, 0.8);
    --text-dark: #0f172a;
    --text-muted: #64748b;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f8fafc;
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6,
.brand-font {
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.02em;
}

/* ==========================================================================
   1. DUAL-TIER GLASS NAVBAR & HEADER
   ========================================================================== */
.glass-nav {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.85);
    position: sticky;
    top: 0;
    z-index: 1040;
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.04);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.header-main-bar {
    padding: 10px 0;
    border-bottom: 1px solid rgba(241, 245, 249, 0.95);
}

.header-subnav-bar {
    padding: 7px 0;
    background: rgba(248, 250, 252, 0.7);
}

.nav-brand-img {
    max-width: 170px;
    object-fit: contain;
    transition: transform 0.2s ease;
}

.nav-brand-img:hover {
    transform: scale(1.02);
}

.nav-pill-item {
    position: relative;
    padding: 6px 14px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #334155 !important;
    border-radius: 9999px;
    transition: all 0.2s ease-in-out;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    white-space: nowrap !important;
    flex-shrink: 0;
}

.nav-pill-item:hover {
    color: var(--brand-primary) !important;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transform: translateY(-1px);
}

.nav-pill-item.active {
    color: #4f46e5 !important;
    background: #ffffff;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.12);
}

.header-subnav-bar {
    padding: 7px 0;
    background: rgba(248, 250, 252, 0.7);
    position: relative;
    z-index: 1030;
    overflow: visible;
}

.nav-scrollable-strip {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: visible !important;
}

@media (max-width: 991.98px) {
    .nav-scrollable-strip {
        overflow-x: auto !important;
        overflow-y: visible !important;
        padding-bottom: 4px;
        scrollbar-width: none;
    }
    .nav-scrollable-strip::-webkit-scrollbar {
        display: none;
    }
}

.category-mega-dropdown {
    width: 680px !important;
    max-width: 92vw !important;
    border-radius: 1rem !important;
    z-index: 1070 !important;
    margin-top: 10px !important;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.15) !important;
    border: 1px solid rgba(226, 232, 240, 0.9) !important;
}

.category-grid-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s ease;
    background: transparent;
}

.category-grid-item:hover {
    background-color: #f1f5f9;
    transform: translateX(2px);
}

.category-grid-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 0.85rem;
    flex-shrink: 0;
}

/* ==========================================================================
   2. SPOTLIGHT LIVE SEARCH
   ========================================================================== */
.spotlight-search-box {
    position: relative;
    width: 100%;
}

.spotlight-search-input {
    background: #f1f5f9;
    border: 1.5px solid transparent;
    border-radius: 9999px;
    padding: 9px 45px 9px 42px;
    font-size: 0.88rem;
    font-weight: 500;
    color: #0f172a;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    width: 100%;
}

.spotlight-search-input:focus {
    background: #ffffff;
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15), 0 10px 25px -5px rgba(0, 0, 0, 0.06);
    outline: none;
}

.spotlight-search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.92rem;
    pointer-events: none;
    transition: color 0.2s;
}

.spotlight-search-input:focus~.spotlight-search-icon {
    color: var(--brand-primary);
}

.search-shortcut-badge {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: #e2e8f0;
    border: 1px solid #cbd5e1;
    color: #64748b;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 6px;
    pointer-events: none;
}

.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(25px);
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.05);
    margin-top: 10px;
    z-index: 1050;
    display: none;
    overflow: hidden;
    max-height: 440px;
    overflow-y: auto;
    border: 1px solid rgba(226, 232, 240, 0.8);
}

/* ==========================================================================
   3. CATEGORIES MEGA MENU
   ========================================================================== */
.category-mega-dropdown {
    width: 720px;
    max-width: 90vw;
    border-radius: 24px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 30px 60px -15px rgba(15, 23, 42, 0.18);
    background: #ffffff;
    padding: 20px;
}

.category-grid-item {
    padding: 10px 12px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #1e293b;
    transition: all 0.2s ease;
}

.category-grid-item:hover {
    background: #f8fafc;
    transform: translateX(3px);
    color: var(--brand-primary);
}

.category-grid-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: #ffffff;
    flex-shrink: 0;
}

/* ==========================================================================
   4. 3D BOOK CARDS & FLOATING STAGES
   ========================================================================== */
.book-card-3d {
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.book-card-3d:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 35px -10px rgba(79, 70, 229, 0.12), 0 12px 15px -8px rgba(0, 0, 0, 0.04);
    border-color: #c7d2fe;
}

.book-cover-stage {
    background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
    padding: 28px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 240px;
    perspective: 800px;
    overflow: hidden;
}

.book-cover-stage::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.18), transparent 70%);
    pointer-events: none;
}

.book-3d-img {
    width: 125px;
    height: 185px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 15px 30px -8px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.15);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    transform: rotateY(-6deg) rotateX(2deg);
}

.book-card-3d:hover .book-3d-img {
    transform: scale(1.06) rotateY(0deg) rotateX(0deg);
}

/* ==========================================================================
   5. BUTTONS, CHIPS & BADGES
   ========================================================================== */
.btn-ai-glow {
    background: var(--ai-gradient);
    color: #ffffff !important;
    border: none;
    border-radius: 9999px;
    padding: 7px 16px;
    font-weight: 700;
    font-size: 0.84rem;
    white-space: nowrap !important;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.25);
    transition: all 0.25s ease;
}

.btn-ai-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
    color: #ffffff !important;
}

.btn-gradient {
    background: var(--brand-gradient);
    color: #ffffff !important;
    border: none;
    font-weight: 600;
    border-radius: 9999px;
    padding: 10px 24px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px 0 rgba(99, 102, 241, 0.35);
}

.btn-gradient:hover {
    opacity: 0.95;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px 0 rgba(99, 102, 241, 0.45);
}

.btn-glass {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(226, 232, 240, 0.9);
    color: var(--text-dark);
    font-weight: 600;
    border-radius: 9999px;
    padding: 8px 18px;
    transition: all 0.25s ease;
}

.btn-glass:hover {
    background: #ffffff;
    border-color: #cbd5e1;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.rating-chip {
    background: #fef9c3;
    color: #854d0e;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ==========================================================================
   6. MOOD INTERACTIVE BOXES & CARDS
   ========================================================================== */
.mood-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 24px 20px;
    text-align: center;
    text-decoration: none;
    display: block;
    height: 100%;
    transition: all 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
}

.mood-box:hover {
    transform: translateY(-6px);
    border-color: transparent;
    box-shadow: 0 20px 30px -10px rgba(99, 102, 241, 0.2);
}

.mood-icon-wrap {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px auto;
    color: #ffffff;
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.mood-box:hover .mood-icon-wrap {
    transform: scale(1.1) rotate(4deg);
}

/* ==========================================================================
   7. MODERN TURKISH PAGINATION
   ========================================================================== */
.pagination-modern {
    margin: 0;
}

.page-link-modern {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #334155;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.page-link-modern:hover {
    color: var(--brand-primary);
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.06);
}

.page-link-modern.active {
    color: #ffffff;
    background: var(--brand-gradient);
    border-color: transparent;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.page-link-modern.disabled {
    color: #cbd5e1;
    background: #f8fafc;
    border-color: #f1f5f9;
    cursor: not-allowed;
    pointer-events: none;
    box-shadow: none;
}

.page-link-modern.dots {
    border: none;
    background: transparent;
    box-shadow: none;
    color: #94a3b8;
    pointer-events: none;
}

/* ==========================================================================
   8. SOCIAL QUOTE CARD & READING CHALLENGE
   ========================================================================== */
.quote-card-preview {
    background: linear-gradient(145deg, #0f172a 0%, #1e1b4b 50%, #31104b 100%);
    color: #ffffff;
    border-radius: 24px;
    padding: 32px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
}

.quote-card-preview::before {
    content: '“';
    position: absolute;
    top: -20px;
    left: 20px;
    font-size: 140px;
    font-family: serif;
    color: rgba(255, 255, 255, 0.06);
    line-height: 1;
    pointer-events: none;
}

.challenge-progress-bar {
    height: 12px;
    border-radius: 9999px;
    background: #e2e8f0;
    overflow: hidden;
}

.challenge-progress-fill {
    height: 100%;
    background: var(--brand-gradient);
    border-radius: 9999px;
    transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.badge-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 16px;
    text-align: center;
    transition: all 0.25s ease;
}

.badge-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 20px -5px rgba(99, 102, 241, 0.15);
    border-color: #c7d2fe;
}

.badge-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px auto;
    font-size: 1.25rem;
}

/* ==========================================================================
   9. TOASTS & UTILITIES
   ========================================================================== */
.custom-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 2000;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(12px);
    color: #fff;
    padding: 14px 22px;
    border-radius: 14px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    font-size: 0.95rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.custom-toast.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.spoiler-hidden {
    filter: blur(5px);
    user-select: none;
    cursor: pointer;
    transition: filter 0.3s ease;
    background: #f1f5f9;
    padding: 8px;
    border-radius: 8px;
}

.spoiler-revealed {
    filter: none !important;
    user-select: auto;
    background: transparent;
}

/* ==========================================================================
   10. MODERN BOOK COMPARISON ARENA (DÜELLO)
   ========================================================================== */
.compare-arena-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #311042 100%);
    border-radius: 28px;
    padding: 3.5rem 2rem;
    position: relative;
    overflow: hidden;
    color: #ffffff;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
    margin-bottom: 2.5rem;
}

.compare-arena-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.35), transparent 70%);
    pointer-events: none;
}

.compare-vs-badge {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #ef4444 0%, #f97316 100%);
    color: #ffffff;
    font-size: 1.35rem;
    font-weight: 900;
    font-family: var(--font-heading);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.5), 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 4px solid rgba(255, 255, 255, 0.9);
    position: relative;
    z-index: 10;
    animation: vsPulse 2.5s infinite ease-in-out;
}

@keyframes vsPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 25px rgba(239, 68, 68, 0.4); }
    50% { transform: scale(1.08); box-shadow: 0 0 40px rgba(239, 68, 68, 0.7); }
}

.compare-book-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 2.25rem;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    height: 100%;
}

.compare-book-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px -15px rgba(99, 102, 241, 0.18);
    border-color: #c7d2fe;
}

.compare-cover-img {
    height: 240px;
    width: 160px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 15px 30px -8px rgba(0, 0, 0, 0.25);
    transition: transform 0.3s ease;
}

.compare-book-card:hover .compare-cover-img {
    transform: scale(1.04) rotate(-1deg);
}

.compare-metric-card {
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.03);
    overflow: hidden;
}

.dual-metric-row {
    padding: 1.25rem 1.75rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.2s ease;
}

.dual-metric-row:last-child {
    border-bottom: none;
}

.dual-metric-row:hover {
    background: #f8fafc;
}

.metric-bar-container {
    height: 8px;
    background: #f1f5f9;
    border-radius: 9999px;
    overflow: hidden;
    margin-top: 6px;
}

.metric-bar-fill-left {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #818cf8);
    border-radius: 9999px;
    transition: width 1s ease-out;
}

.metric-bar-fill-right {
    height: 100%;
    background: linear-gradient(90deg, #f43f5e, #fb7185);
    border-radius: 9999px;
    transition: width 1s ease-out;
}

.winner-badge {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ==========================================================================
   11. MODERN AUTHENTICATION (GİRİŞ & ÜYELİK)
   ========================================================================== */
.auth-split-wrapper {
    background: #ffffff;
    border-radius: 28px;
    box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(226, 232, 240, 0.8);
    overflow: hidden;
    margin: 2rem auto;
    max-width: 1080px;
}

.auth-feature-panel {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 60%, #311042 100%);
    color: #ffffff;
    padding: 3.5rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.auth-feature-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.35), transparent 60%);
    pointer-events: none;
}

.auth-card-panel {
    padding: 3.5rem 3rem;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-input-group {
    position: relative;
    margin-bottom: 1.25rem;
}

.auth-input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1rem;
    pointer-events: none;
    transition: color 0.2s;
    z-index: 5;
}

.auth-input {
    padding: 12px 16px 12px 46px;
    border-radius: 14px;
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
    font-size: 0.95rem;
    font-weight: 500;
    color: #0f172a;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    width: 100%;
}

.auth-input:focus {
    background: #ffffff;
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
    outline: none;
}

.auth-input:focus ~ .auth-input-icon {
    color: #6366f1;
}

.password-toggle-btn {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 1rem;
    padding: 4px;
    z-index: 5;
    transition: color 0.2s;
}

.password-toggle-btn:hover {
    color: #334155;
}

.auth-benefit-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.85);
}

.auth-benefit-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #818cf8;
    flex-shrink: 0;
}