/* ===========================================
   KamiMangaYume Özel Stiller
   Versiyon: 1.0.0
   =========================================== */

/* ===========================================
   TEMEL STILLER
   =========================================== */

/* Gradient Text */
.gradient-text {
    background: linear-gradient(to right, #9333ea, #db2777);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Gradient Background */
.gradient-bg {
    background: linear-gradient(to right, #9333ea, #db2777);
    transition: all 0.3s ease;
}

.gradient-bg:hover {
    background: linear-gradient(to right, #7e22ce, #be185d);
}

/* Glass Effect */
.glass {
    background: rgba(17, 24, 39, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Hero Gradient */
.hero-gradient {
    background: linear-gradient(to top, 
        rgba(17,24,39,1) 0%, 
        rgba(17,24,39,0.8) 30%, 
        rgba(17,24,39,0.4) 60%, 
        transparent 100%);
}

/* Card Hover Effect */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-4px);
}

/* Hide Scrollbar */
.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ===========================================
   BADGE STILLERI
   =========================================== */

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    padding: 0.125rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    line-height: 1.25;
}

.badge-purple {
    background: rgba(147, 51, 234, 0.2);
    color: #9333ea;
}

.badge-yellow {
    background: #eab308;
    color: white;
}

.badge-green {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.badge-blue {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.badge-red {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.badge-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: inherit;
}

.badge-outline {
    background: transparent;
    border: 1px solid currentColor;
}

/* ===========================================
   KATEGORI FILTRE BUTONLARI
   =========================================== */

.category-filter {
    transition: all 0.3s ease;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.category-filter.active {
    background: linear-gradient(to right, #9333ea, #db2777);
    color: white;
    border-color: transparent;
}

.category-filter:not(.active) {
    border: 1px solid #374151;
    background: rgba(17, 24, 39, 0.5);
    color: #d1d5db;
}

.category-filter:not(.active):hover {
    background: #374151;
    color: white;
}

/* ===========================================
   LOADING SPINNER
   =========================================== */

/* Ana sayfa yükleniyor */
#loading-spinner {
    text-align: center;
    padding: 2rem 0;
}

.loading-spinner {
    display: none;
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    border: 3px solid rgba(147, 51, 234, 0.3);
    border-radius: 50%;
    border-top: 3px solid #9333ea;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

/* Inline spinner */
.spinner {
    display: inline-block;
    border: 2px solid rgba(147, 51, 234, 0.3);
    border-radius: 50%;
    border-top: 2px solid #9333ea;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===========================================
   OKUMA AYARLARI (Chapter Page)
   =========================================== */

/* Font Sizes */
.reading-container[data-font-size="small"] {
    font-size: 14px;
}

.reading-container[data-font-size="medium"] {
    font-size: 16px;
}

.reading-container[data-font-size="large"] {
    font-size: 18px;
}

.reading-container[data-font-size="xlarge"] {
    font-size: 20px;
}

/* Themes */
.reading-container[data-theme="light"] {
    background-color: #ffffff;
    color: #1a1a1a;
}

.reading-container[data-theme="light"] .chapter-content p,
.reading-container[data-theme="light"] .chapter-content div,
.reading-container[data-theme="light"] .chapter-content h1,
.reading-container[data-theme="light"] .chapter-content h2,
.reading-container[data-theme="light"] .chapter-content h3 {
    color: #1a1a1a;
}

.reading-container[data-theme="sepia"] {
    background-color: #fbf0d9;
    color: #5b4636;
}

.reading-container[data-theme="sepia"] .chapter-content p,
.reading-container[data-theme="sepia"] .chapter-content div,
.reading-container[data-theme="sepia"] .chapter-content h1,
.reading-container[data-theme="sepia"] .chapter-content h2,
.reading-container[data-theme="sepia"] .chapter-content h3 {
    color: #5b4636;
}

.reading-container[data-theme="dark"] {
    background-color: #111827;
    color: #f3f4f6;
}

.reading-container[data-theme="dark"] .chapter-content p,
.reading-container[data-theme="dark"] .chapter-content div,
.reading-container[data-theme="dark"] .chapter-content h1,
.reading-container[data-theme="dark"] .chapter-content h2,
.reading-container[data-theme="dark"] .chapter-content h3 {
    color: #f3f4f6;
}

/* Reading Settings Panel */
.reading-settings {
    position: fixed;
    top: 5rem;
    right: 1rem;
    width: 16rem;
    border-radius: 0.75rem;
    border: 1px solid #374151;
    background-color: #111827;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    padding: 1rem;
    z-index: 50;
}

.reading-settings h4 {
    font-weight: 500;
    margin-bottom: 0.75rem;
    color: white;
}

.reading-settings label {
    display: block;
    font-size: 0.875rem;
    color: #9ca3af;
    margin-bottom: 0.5rem;
}

/* Chapter Content */
.chapter-content {
    max-width: 800px;
    margin: 0 auto;
}

.chapter-content img {
    max-width: 100%;
    height: auto;
    margin: 2rem auto;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.chapter-content p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.chapter-content h1,
.chapter-content h2,
.chapter-content h3 {
    margin: 2rem 0 1rem;
    font-weight: 600;
}

/* Double Page View */
.columns-2 {
    column-count: 2;
    column-gap: 2rem;
}

.columns-2 p {
    break-inside: avoid;
}

/* ===========================================
   SAYFALAMA (Pagination)
   =========================================== */

.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border-radius: 8px;
    background: rgba(31, 41, 55, 0.5);
    border: 1px solid #374151;
    color: #9ca3af;
    font-size: 14px;
    transition: all 0.2s;
    margin: 0 2px;
}

.page-numbers.current {
    background: linear-gradient(to right, #9333ea, #db2777);
    border-color: transparent;
    color: white;
}

.page-numbers:hover {
    background: #374151;
    color: white;
    text-decoration: none;
}

/* ===========================================
   YORUMLAR (Comments)
   =========================================== */

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.comment {
    padding: 1.5rem;
    border-bottom: 1px solid #374151;
}

.comment:last-child {
    border-bottom: none;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.comment-author img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-author b,
.comment-author strong {
    font-weight: 600;
    color: white;
}

.comment-metadata {
    font-size: 0.75rem;
    color: #6b7280;
    margin-left: auto;
}

.comment-content {
    margin-left: 3.5rem;
    color: #d1d5db;
    line-height: 1.6;
}

.reply {
    margin-top: 1rem;
    margin-left: 3.5rem;
}

.reply a {
    color: #9333ea;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
}

.reply a:hover {
    color: #a855f7;
    text-decoration: none;
}

/* Comment Form */
.comment-respond {
    margin-top: 2rem;
    padding: 1.5rem;
    border: 1px solid #374151;
    border-radius: 0.75rem;
    background: rgba(17, 24, 39, 0.5);
}

.comment-reply-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: white;
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #374151;
    border-radius: 0.5rem;
    background: #1f2937;
    color: white;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: #9333ea;
    box-shadow: 0 0 0 2px rgba(147, 51, 234, 0.2);
}

.comment-form textarea {
    min-height: 100px;
    resize: vertical;
}

.comment-form .form-submit {
    margin-top: 0.5rem;
}

.comment-form .submit {
    background: linear-gradient(to right, #9333ea, #db2777);
    color: white;
    font-weight: 500;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: opacity 0.2s;
}

.comment-form .submit:hover {
    opacity: 0.9;
}

/* ===========================================
   BILDIRIMLER (Notifications)
   =========================================== */

.notification {
    position: fixed;
    top: 5rem;
    right: 1rem;
    z-index: 100;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: white;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

.notification.success {
    background: #10b981;
}

.notification.error {
    background: #ef4444;
}

.notification.info {
    background: #3b82f6;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ===========================================
   BÖLÜM LISTESI
   =========================================== */

.chapter-list {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.chapter-list::-webkit-scrollbar {
    width: 6px;
}

.chapter-list::-webkit-scrollbar-track {
    background: #1f2937;
    border-radius: 10px;
}

.chapter-list::-webkit-scrollbar-thumb {
    background: #4b5563;
    border-radius: 10px;
}

.chapter-list::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

.chapter-item {
    transition: all 0.2s;
    border-bottom: 1px solid #374151;
}

.chapter-item:last-child {
    border-bottom: none;
}

.chapter-item:hover {
    background: rgba(31, 41, 55, 0.5);
}

/* ===========================================
   RESPONSIVE TASARIM
   =========================================== */

/* Tablet */
@media (max-width: 1024px) {
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    .columns-2 {
        column-count: 1;
    }
    
    .reading-settings {
        width: 14rem;
    }
}

/* Mobil */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    h1 {
        font-size: 1.875rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .category-filter {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
    }
    
    .comment-content {
        margin-left: 0;
    }
    
    .reading-settings {
        width: calc(100% - 2rem);
        top: auto;
        bottom: 1rem;
        right: 1rem;
    }
    
    .page-numbers {
        min-width: 32px;
        height: 32px;
        font-size: 12px;
    }
}

/* Küçük Mobil */
@media (max-width: 480px) {
    .badge {
        padding: 0.125rem 0.375rem;
        font-size: 0.625rem;
    }
    
    .chapter-content img {
        margin: 1rem auto;
    }
    
    .comment-author img {
        width: 32px;
        height: 32px;
    }
}

/* ===========================================
   ANIMASYONLAR
   =========================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease;
}

.animate-slide-up {
    animation: slideUp 0.3s ease;
}

/* ===========================================
   MASAÜSTÜ İYİLEŞTIRMELER
   =========================================== */

/* Hover efektleri */
.hover-lift {
    transition: transform 0.2s;
}

.hover-lift:hover {
    transform: translateY(-2px);
}

.hover-scale {
    transition: transform 0.2s;
}

.hover-scale:hover {
    transform: scale(1.02);
}

/* Grid geçiş efekti */
#manga-grid {
    transition: opacity 0.3s ease;
    min-height: 400px;
}

/* Image lazy loading */
img[data-src] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[data-src].loaded {
    opacity: 1;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(to right, #9333ea, #db2777);
    color: white;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    transition: all 0.2s;
    z-index: 40;
}

.back-to-top:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

/* Tooltip */
.tooltip {
    position: relative;
}

.tooltip:hover:after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.25rem 0.5rem;
    background: #1f2937;
    color: white;
    font-size: 0.75rem;
    border-radius: 0.25rem;
    white-space: nowrap;
    z-index: 50;
}