/*
Theme Name: Chaos Novel
Theme URI: https://chaosnovel.com.tr
Description: Profesyonel Türkçe roman, light novel ve web novel okuma platformu
Version: 3.0.0
Author: Chaos Novel
Author URI: https://chaosnovel.com.tr
License: GPL v2 or later
Text Domain: chaos-novel
*/

/* ========== CSS Variables ========== */
:root {
    --primary: #0a0e27;
    --primary-light: #111633;
    --secondary: #ff6b35;
    --accent: #f7931e;
    --bg-dark: #0f1419;
    --bg-card: #1a1f3a;
    --bg-card-hover: #222850;
    --text-white: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.65);
    --text-light: rgba(255, 255, 255, 0.85);
    --border: #2a2a3e;
    --success: #4caf50;
    --radius: 8px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--primary);
    color: var(--text-white);
    line-height: 1.6;
    min-height: 100vh;
}

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

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

img {
    max-width: 100%;
    height: auto;
}

/* ========== HEADER ========== */
.site-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--bg-dark) 100%);
    border-bottom: 3px solid var(--secondary);
    position: relative !important;
    top: auto !important;
    z-index: 9999;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.6);
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
    gap: 1.5rem;
}

/* Logo */
.site-branding {
    flex-shrink: 0;
}

.site-branding a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-white);
    font-weight: 800;
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.site-branding .logo-icon {
    color: var(--secondary);
    font-size: 1.6rem;
}

.site-branding .logo-text {
    color: var(--secondary);
}

.site-branding .logo-sub {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-left: 0.5rem;
    letter-spacing: 0;
    text-transform: none;
}

/* Navigation - YATAY MENU */
.primary-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.primary-nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0;
    margin: 0;
    padding: 0;
}

.primary-nav > ul > li {
    position: relative;
}

.primary-nav > ul > li > a {
    display: flex;
    align-items: center;
    padding: 1.2rem 1rem;
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    transition: var(--transition);
}

.primary-nav > ul > li > a:hover,
.primary-nav > ul > li.current-menu-item > a {
    color: var(--secondary);
    border-bottom-color: var(--secondary);
    background: rgba(255, 107, 53, 0.08);
}

/* Dropdown */
.primary-nav ul ul {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 0 0 var(--radius) var(--radius);
    min-width: 200px;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: var(--transition);
    z-index: 9999;
    display: flex;
    flex-direction: column;
}

.primary-nav ul li:hover > ul {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.primary-nav ul ul li a {
    display: block;
    padding: 0.75rem 1.25rem;
    color: var(--text-light);
    font-size: 0.88rem;
    border-left: 3px solid transparent;
    transition: var(--transition);
}

.primary-nav ul ul li a:hover {
    background: rgba(255, 107, 53, 0.1);
    border-left-color: var(--secondary);
    color: var(--secondary);
    padding-left: 1.5rem;
}

/* Mobile Toggle */
.nav-toggle {
    display: none;
    background: none;
    border: 2px solid var(--border);
    border-radius: 4px;
    color: var(--text-white);
    font-size: 1.5rem;
    padding: 0.3rem 0.6rem;
    cursor: pointer;
    transition: var(--transition);
}

.nav-toggle:hover {
    border-color: var(--secondary);
    color: var(--secondary);
}

/* Search */
.header-search {
    flex-shrink: 0;
}

.header-search form {
    display: flex;
    gap: 0;
}

.header-search input[type="search"],
.header-search input[type="text"] {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border);
    border-right: none;
    border-radius: var(--radius) 0 0 var(--radius);
    color: var(--text-white);
    font-size: 0.9rem;
    width: 200px;
    transition: var(--transition);
    outline: none;
    min-width: 120px;
}

.header-search input:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--secondary);
    box-shadow: 0 0 8px rgba(255, 107, 53, 0.2);
}

.header-search button {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--secondary), var(--accent));
    border: none;
    border-radius: 0 var(--radius) var(--radius) 0;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.header-search button:hover {
    filter: brightness(1.1);
    box-shadow: 0 2px 10px rgba(255, 107, 53, 0.4);
}

/* ========== MAIN CONTENT ========== */
.site-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    min-height: calc(100vh - 200px);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--primary-light) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 3rem 2rem;
    text-align: center;
    margin-bottom: 2.5rem;
}

.hero-section h1 {
    font-size: 2.2rem;
    color: var(--secondary);
    margin-bottom: 0.5rem;
    font-weight: 800;
}

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

/* Section Title */
.section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border);
}

.section-title .icon {
    font-size: 1.4rem;
}

/* ========== NOVEL GRID ========== */
.novel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

.novel-card {
    background: linear-gradient(180deg, var(--bg-card) 0%, var(--primary-light) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.novel-card:hover {
    transform: translateY(-6px);
    border-color: var(--secondary);
    box-shadow: 0 8px 30px rgba(255, 107, 53, 0.2);
}

.novel-card .card-image {
    width: 100%;
    height: 240px;
    overflow: hidden;
    position: relative;
    background: var(--bg-card);
}

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

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

.novel-card .card-image .placeholder-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 3rem;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.15), rgba(247, 147, 30, 0.08));
}

.novel-card .card-body {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.novel-card .card-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    line-height: 1.3;
}

.novel-card .card-title a {
    color: var(--text-white);
}

.novel-card .card-title a:hover {
    color: var(--secondary);
}

.novel-card .card-author {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
}

.novel-card .card-meta {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.novel-card .card-meta .tag {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 600;
}

.tag-genre {
    background: rgba(76, 175, 80, 0.15);
    color: #4caf50;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.tag-status {
    background: rgba(255, 107, 53, 0.15);
    color: var(--secondary);
    border: 1px solid rgba(255, 107, 53, 0.3);
}

.tag-rating {
    background: rgba(247, 147, 30, 0.15);
    color: var(--accent);
    border: 1px solid rgba(247, 147, 30, 0.3);
}

/* ========== CHAPTERS LIST ========== */
.chapters-list {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 2rem;
}

.chapter-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
    gap: 1rem;
}

.chapter-item:last-child {
    border-bottom: none;
}

.chapter-item:hover {
    background: rgba(255, 107, 53, 0.06);
}

.chapter-item a {
    color: var(--text-light);
    font-weight: 500;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chapter-item a:hover {
    color: var(--secondary);
}

.chapter-item .chapter-date {
    font-size: 0.82rem;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

/* ========== SINGLE NOVEL ========== */
.novel-detail {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.novel-detail .novel-cover {
    border-radius: var(--radius);
    overflow: hidden;
    border: 2px solid var(--border);
}

.novel-detail .novel-cover img {
    width: 100%;
    display: block;
}

.novel-detail .novel-cover .placeholder-cover {
    width: 100%;
    height: 340px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    background: linear-gradient(135deg, var(--bg-card), var(--primary-light));
}

.novel-detail .novel-info h1 {
    font-size: 1.8rem;
    color: var(--secondary);
    margin-bottom: 1rem;
    font-weight: 800;
    line-height: 1.3;
}

.novel-meta-table {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.5rem 1rem;
    margin-bottom: 1rem;
}

.novel-meta-table .meta-label {
    font-weight: 700;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.novel-meta-table .meta-value {
    color: var(--text-light);
    font-size: 0.9rem;
}

.novel-meta-table .meta-value .tag {
    margin-right: 0.4rem;
    margin-bottom: 0.3rem;
}

.novel-description {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.novel-description h2 {
    color: var(--secondary);
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.novel-description .content {
    color: var(--text-light);
    line-height: 1.8;
}

.novel-description .content p {
    margin-bottom: 0.8rem;
}

/* ========== SINGLE CHAPTER ========== */
.chapter-header {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.chapter-header h1 {
    color: var(--secondary);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.chapter-header .chapter-novel-link {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.chapter-header .chapter-novel-link a {
    color: var(--accent);
}

.chapter-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem 2.5rem;
    margin-bottom: 1.5rem;
    line-height: 2;
    font-size: 1.05rem;
    color: var(--text-light);
}

.chapter-content p {
    margin-bottom: 1rem;
}

.chapter-nav {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
}

.chapter-nav a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-light);
    font-weight: 600;
    transition: var(--transition);
}

.chapter-nav a:hover {
    border-color: var(--secondary);
    color: var(--secondary);
    background: rgba(255, 107, 53, 0.08);
}

/* ========== GENRE FILTER ========== */
.genre-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.genre-filter a {
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid var(--border);
    color: var(--text-light);
    transition: var(--transition);
}

.genre-filter a:hover,
.genre-filter a.active {
    background: var(--secondary);
    border-color: var(--secondary);
    color: #fff;
}

/* ========== NO CONTENT ========== */
.no-content {
    text-align: center;
    padding: 4rem 2rem;
}

.no-content h2 {
    color: var(--secondary);
    margin-bottom: 1rem;
}

.no-content p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.btn-primary {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--secondary), var(--accent));
    color: #fff;
    border-radius: var(--radius);
    font-weight: 700;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    filter: brightness(1.1);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
    color: #fff;
    transform: translateY(-2px);
}

/* ========== PAGINATION ========== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    padding: 0.5rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}

.pagination a:hover {
    background: var(--secondary);
    border-color: var(--secondary);
    color: #fff;
}

.pagination .current {
    background: var(--secondary);
    border-color: var(--secondary);
    color: #fff;
}

/* ========== FOOTER ========== */
.site-footer {
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--primary) 100%);
    border-top: 3px solid var(--secondary);
    margin-top: 3rem;
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.footer-section h3 {
    color: var(--secondary);
    font-size: 1rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 1rem;
    letter-spacing: 0.5px;
}

.footer-section p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: var(--secondary);
    padding-left: 0.3rem;
}

.social-links {
    display: flex;
    gap: 0.75rem;
}

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

.social-links a:hover {
    background: var(--secondary);
    border-color: var(--secondary);
    color: #fff;
    transform: translateY(-3px);
}

.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 992px) {
    .novel-detail {
        grid-template-columns: 180px 1fr;
    }

    .footer-inner {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header-inner {
        flex-wrap: wrap;
        padding: 1rem 0.75rem;
        gap: 0.75rem;
    }

    .site-branding {
        min-width: 100%;
        order: 1;
    }

    .site-branding a {
        font-size: 1.2rem;
    }

    .site-branding .logo-sub {
        display: none;
    }

    .nav-toggle {
        display: block;
        order: 2;
        flex-shrink: 0;
    }

    .header-search {
        order: 3;
        flex: 1;
        min-width: 100%;
    }

    .header-search form {
        width: 100%;
    }

    .header-search input[type="search"],
    .header-search input[type="text"] {
        width: 100%;
        min-width: unset;
    }

    .header-auth {
        order: 4;
        width: 100%;
        gap: 0.5rem;
        margin-left: 0;
    }

    .header-auth .auth-btn {
        flex: 1;
        min-width: 100px;
        text-align: center;
    }

    .primary-nav {
        order: 5;
        width: 100%;
        display: none;
        background: rgba(0, 0, 0, 0.3);
        border-top: 1px solid var(--border);
        margin-top: 0.5rem;
    }

    .primary-nav.active {
        display: block;
    }

    .primary-nav ul {
        flex-direction: column;
        width: 100%;
    }

    .primary-nav > ul > li > a {
        padding: 0.85rem 1rem;
        border-bottom: 1px solid var(--border);
        border-left: 3px solid transparent;
    }

    .primary-nav > ul > li > a:hover {
        border-bottom-color: var(--border);
        border-left-color: var(--secondary);
    }

    .primary-nav ul ul {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background: rgba(0, 0, 0, 0.2);
        border-radius: 0;
    }

    .novel-detail {
        grid-template-columns: 1fr;
    }

    .novel-detail .novel-cover {
        max-width: 250px;
        margin: 0 auto;
    }

    .chapter-content {
        padding: 1.5rem 1rem;
    }

    .chapter-nav {
        flex-direction: column;
    }
}

@media (max-width: 576px) {
    .site-content {
        padding: 1rem 0.75rem;
    }

    .header-inner {
        padding: 0.75rem 0.5rem;
    }

    .site-branding a {
        font-size: 1rem;
    }

    .header-search button {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }

    .header-auth .auth-btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }

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

    .novel-card .card-image {
        height: 180px;
    }

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

    .hero-section {
        padding: 1.5rem 1rem;
        border-radius: 4px;
    }

    .hero-section h1 {
        font-size: 1.4rem;
        margin-bottom: 0.5rem;
    }

    .hero-section p {
        font-size: 0.95rem;
    }

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

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

/* ========== Page Content ========== */
.page-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* ========== Profile Card ========== */
.profile-card {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.profile-avatar img {
    border-radius: 50%;
    border: 3px solid var(--secondary);
}

.profile-info h2 {
    color: var(--text-white);
    margin: 0 0 0.3rem 0;
    font-size: 1.5rem;
}

.profile-stats {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    flex-wrap: wrap;
}

.stat-box {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.2rem 1.5rem;
    text-align: center;
    flex: 1;
    min-width: 120px;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary);
}

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

.profile-links {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    flex-wrap: wrap;
}

.btn-primary {
    display: inline-block;
    background: var(--secondary);
    color: var(--text-white);
    padding: 0.7rem 1.5rem;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.btn-primary:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

/* ========== Genre Filter ========== */
.genre-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0 1rem;
    margin-bottom: 1.5rem;
}

.genre-filter a {
    background: var(--bg-card);
    color: var(--text-muted);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.85rem;
    transition: var(--transition);
}

.genre-filter a:hover,
.genre-filter a.active {
    background: var(--secondary);
    color: var(--text-white);
}

/* ========== Pagination ========== */
.pagination {
    text-align: center;
    padding: 2rem 1rem;
}

.pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    background: var(--bg-card);
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    text-decoration: none;
    transition: var(--transition);
}

.pagination a:hover,
.pagination .current {
    background: var(--secondary);
    color: var(--text-white);
}

@media (max-width: 600px) {
    .profile-card {
        flex-direction: column;
        text-align: center;
    }
    .profile-stats {
        flex-direction: column;
    }
    .profile-links {
        flex-direction: column;
    }
    .profile-links .btn-primary {
        text-align: center;
    }
}

/* ========== Auth Pages - Giriş / Kayıt / Şifre Sıfırlama ========== */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 2rem 1rem;
}

.auth-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 2.5rem;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    color: var(--secondary);
    font-size: 1.8rem;
    margin: 0 0 0.5rem 0;
}

.auth-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

.auth-form .form-group {
    margin-bottom: 1.2rem;
}

.auth-form label {
    display: block;
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--primary-light);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-white);
    font-size: 0.95rem;
    transition: var(--transition);
    box-sizing: border-box;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.15);
}

.auth-form input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 3rem;
}

.cna-toggle-password {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 1.1rem;
    user-select: none;
    opacity: 0.6;
    transition: var(--transition);
}

.cna-toggle-password:hover {
    opacity: 1;
}

.form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 0.4rem;
    font-weight: 400 !important;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    accent-color: var(--secondary);
}

.forgot-link {
    color: var(--secondary);
    font-size: 0.85rem;
    text-decoration: none;
    transition: var(--transition);
}

.forgot-link:hover {
    text-decoration: underline;
}

.cna-submit {
    width: 100%;
    padding: 0.85rem;
    background: var(--secondary);
    color: var(--text-white);
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 0.5rem;
}

.cna-submit:hover {
    background: var(--accent);
    transform: translateY(-1px);
}

.cna-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.cna-message {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    text-align: center;
}

.cna-message.success {
    background: rgba(76, 175, 80, 0.15);
    color: #4caf50;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.cna-message.error {
    background: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.auth-footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

.auth-footer a {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.auth-footer a:hover {
    text-decoration: underline;
}

@media (max-width: 480px) {
    .auth-card {
        padding: 1.5rem;
        margin: 0 0.5rem;
    }
    .auth-header h1 {
        font-size: 1.4rem;
    }
    .form-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* ========== Header Auth Buttons ========== */
.header-auth {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-left: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.auth-btn {
    padding: 0.45rem 1rem;
    border-radius: var(--radius);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition);
    white-space: nowrap;
}

.login-btn {
    color: var(--text-white);
    border: 1px solid var(--border);
    background: transparent;
}

.login-btn:hover {
    border-color: var(--secondary);
    color: var(--secondary);
}

.register-btn {
    background: var(--secondary);
    color: var(--text-white);
}

.register-btn:hover {
    background: var(--accent);
}

/* ========== User Menu Dropdown ========== */
.user-menu {
    position: relative;
}

.user-menu-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.3rem 0.8rem 0.3rem 0.3rem;
    cursor: pointer;
    color: var(--text-white);
    transition: var(--transition);
}

.user-menu-toggle:hover {
    border-color: var(--secondary);
}

.user-menu-toggle img {
    border-radius: 50%;
    width: 28px;
    height: 28px;
}

.user-name {
    font-size: 0.85rem;
    font-weight: 500;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    min-width: 200px;
    box-shadow: var(--shadow);
    z-index: 1000;
    overflow: hidden;
}

.user-menu:hover .user-dropdown,
.user-menu.active .user-dropdown {
    display: block;
}

.user-dropdown a {
    display: block;
    padding: 0.7rem 1rem;
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.user-dropdown a:hover {
    background: var(--bg-card-hover);
    color: var(--secondary);
}

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

.logout-link {
    color: #e74c3c !important;
}

.logout-link:hover {
    color: #ff6b6b !important;
}

@media (max-width: 768px) {
    .header-auth {
        margin-left: 0;
    }
    .user-name {
        display: none;
    }
    .auth-btn {
        padding: 0.4rem 0.7rem;
        font-size: 0.8rem;
    }
}

/* ========== Novel Actions - Okumaya Başla & Yer İşareti ========== */
.novel-actions {
    display: flex;
    gap: 0.8rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.btn-read-now {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--secondary), var(--accent));
    color: var(--text-white);
    padding: 0.8rem 1.8rem;
    border-radius: var(--radius);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 700;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.35);
}

.btn-read-now:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.5);
}

.btn-read-now .btn-icon {
    font-size: 1.1rem;
}

.btn-read-now.btn-disabled {
    background: var(--bg-card);
    color: var(--text-muted);
    cursor: not-allowed;
    box-shadow: none;
    border: 1px solid var(--border);
}

.btn-read-now.btn-disabled:hover {
    transform: none;
    box-shadow: none;
}

.btn-bookmark {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    color: var(--text-muted);
    padding: 0.8rem 1.4rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-bookmark:hover {
    border-color: #f1c40f;
    color: #f1c40f;
}

.btn-bookmark.bookmarked {
    background: rgba(241, 196, 15, 0.1);
    border-color: #f1c40f;
    color: #f1c40f;
}

.btn-bookmark .bookmark-icon {
    font-size: 1.2rem;
    line-height: 1;
}

.btn-bookmark.bookmarked .bookmark-icon {
    color: #f1c40f;
}

/* Bookmark toast notification */
.cna-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--bg-card);
    color: var(--text-white);
    padding: 0.8rem 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    z-index: 9999;
    font-size: 0.9rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.cna-toast.show {
    opacity: 1;
    transform: translateY(0);
}

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

.cna-toast.error {
    border-color: #e74c3c;
}

@media (max-width: 600px) {
    .novel-actions {
        flex-direction: column;
    }
    .btn-read-now,
    .btn-bookmark {
        width: 100%;
        justify-content: center;
    }
}

/* ========== Header asla sticky/fixed olmayacak ========== */
.site-header,
.site-header.header-hidden {
    position: relative !important;
    top: auto !important;
    display: block !important;
}

/* ========== Card Stats (Puan, Görüntüleme, Bölüm) ========== */
.card-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 6px 0;
    font-size: 0.8rem;
}

.card-stats .card-rating {
    color: #ffc107;
    font-weight: 600;
}

.card-stats .card-rating small {
    color: var(--text-muted);
    font-weight: 400;
}

.card-stats .card-views {
    color: var(--text-muted);
}

.card-stats .card-chapters {
    color: var(--accent);
}

/* ========== Rating Widget (Oy Verme) ========== */
.cnf-rating-widget {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 16px 0;
    padding: 12px 16px;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.cnf-rating-widget .rating-label {
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.9rem;
    margin-right: 4px;
}

.cnf-rating-widget .cnf-stars {
    display: flex;
    gap: 2px;
}

.cnf-rating-widget .cnf-star {
    font-size: 1.5rem;
    cursor: pointer;
    color: #555;
    transition: color 0.15s ease, transform 0.15s ease;
    user-select: none;
    line-height: 1;
}

.cnf-rating-widget .cnf-star:hover {
    transform: scale(1.2);
}

.cnf-rating-widget .cnf-star.active {
    color: #ffc107;
}

.cnf-rating-widget .cnf-star.disabled {
    pointer-events: none;
    opacity: 0.5;
}

.cnf-rating-widget .cnf-avg-rating {
    color: #ffc107;
    font-weight: 700;
    font-size: 0.95rem;
}

.cnf-rating-widget .cnf-vote-count {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.cnf-rating-widget .cnf-user-vote {
    color: var(--success);
    font-size: 0.8rem;
    font-style: italic;
    width: 100%;
    margin-top: 4px;
}

/* ========== Novel Meta Table (Detay Sayfası) ========== */
.novel-meta-table {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 16px;
    margin: 12px 0;
}

.novel-meta-table .meta-label {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
}

.novel-meta-table .meta-value {
    color: var(--text-light);
    font-size: 0.9rem;
}

.novel-meta-table .vote-count {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-left: 4px;
}

/* ========== Responsive Rating Widget ========== */
@media (max-width: 768px) {
    .cnf-rating-widget {
        flex-direction: column;
        align-items: flex-start;
    }

    .cnf-rating-widget .cnf-star {
        font-size: 1.3rem;
    }

    .novel-meta-table {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .novel-meta-table .meta-label {
        margin-top: 8px;
    }
}

/* ========== Kitaplık - Okuma Durumu ve Devam Et Butonu ========== */
.card-reading-status {
    font-size: 0.8rem;
    color: var(--text-light);
    margin: 4px 0 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-last-read {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 2px 0;
}

.btn-continue-reading {
    display: block;
    text-align: center;
    padding: 8px 12px;
    background: linear-gradient(135deg, var(--secondary), var(--accent));
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 0 0 var(--radius) var(--radius);
    text-decoration: none;
    transition: var(--transition);
}

.btn-continue-reading:hover {
    opacity: 0.9;
    color: #fff;
}

.card-cover-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card-hover);
    min-height: 200px;
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent);
}

/* ========== Mobil: Son Eklenen Bölümler overflow fix ========== */
@media (max-width: 768px) {
    .chapters-list {
        overflow: hidden;
        max-width: 100%;
    }

    .chapter-item {
        padding: 0.7rem 0.85rem;
        gap: 0.5rem;
        max-width: 100%;
        overflow: hidden;
    }

    .chapter-item a {
        font-size: 0.88rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: calc(100% - 80px);
    }

    .chapter-item .chapter-date {
        font-size: 0.75rem;
        flex-shrink: 0;
        max-width: 75px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* ========== Yatay Scroll Engeli ========== */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}

* {
    box-sizing: border-box;
}

.site-wrapper,
.site-content,
.chapters-list,
.chapter-item,
.novel-grid,
.hero-section,
.stats-bar {
    max-width: 100%;
    overflow-x: hidden;
}

