/*
Theme Name: PiManga
Description: Özel PiManga Teması
Author: Antigravity
Version: 1.3.2
*/

/* ==========================================================================
   PiManga - Koyu Tema (Dark Theme) Temel Ayarları
   ========================================================================== */

:root {
    --bg-color-main: #121212;
    --bg-color-secondary: #1e1e1e;
    --bg-color-tertiary: #2a2a2a;
    
    --text-color-main: #e0e0e0;
    --text-color-muted: #a0a0a0;
    
    --accent-color: #bb86fc; /* Koyu temaya uygun modern bir mor accent */
    --accent-color-hover: #9965f4;
    
    --border-color: #333333;
}

body {
    background-color: var(--bg-color-main);
    color: var(--text-color-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-color-main);
    margin-top: 0;
}

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

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

.site-main {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    flex: 1 0 auto;
    box-sizing: border-box;
}

/* Header Styles */
.site-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-identity .custom-logo {
    max-height: 50px;
    width: auto;
}

.site-title {
    font-size: 24px;
    margin: 0;
}

.header-search {
    flex: 1;
    max-width: 400px;
    margin: 0 20px;
    position: relative;
}

.mobile-search-wrapper {
    display: none; /* Gizli varsayılan olarak (Masaüstü) */
    padding: 10px 20px;
    background-color: var(--bg-color-secondary);
    border-bottom: 1px solid var(--border-color);
}

.mobile-search-wrapper .header-search {
    max-width: 100%;
    margin: 0;
}

.ajax-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 4px;
    margin-top: 5px;
    z-index: 1000;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    max-height: 400px;
    overflow-y: auto;
}

.ajax-search-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #333;
    color: #fff;
    text-decoration: none;
    transition: background-color 0.2s;
}

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

.ajax-search-item:hover {
    background-color: #2a2a2a;
}

.ajax-search-thumb {
    width: 40px;
    height: 55px;
    object-fit: cover;
    margin-right: 15px;
    border-radius: 4px;
}

.ajax-search-info {
    display: flex;
    flex-direction: column;
}

.ajax-search-title {
    font-weight: bold;
    font-size: 14px;
}

.ajax-search-meta {
    font-size: 11px;
    color: #aaa;
}

.series-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.series-card {
    background: var(--bg-color-secondary);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    transition: box-shadow 0.3s;
}
.series-card:hover {
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

.series-card-thumb img {
    width: 100%;
    height: auto;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    display: block;
}

.series-card-info {
    padding: 15px;
}

.series-card-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 5px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


.search-form {
    display: flex;
    position: relative;
    width: 100%;
}

.search-field {
    width: 100%;
    padding: 12px 20px;
    padding-right: 80px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-color-tertiary);
    color: var(--text-color-main);
    border-radius: 24px;
    outline: none;
    transition: all 0.3s ease;
}

.search-field:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(187, 134, 252, 0.2);
}

.search-submit {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    padding: 8px 18px;
    background-color: var(--accent-color);
    border: none;
    color: #fff;
    cursor: pointer;
    border-radius: 18px;
    font-weight: bold;
    transition: background-color 0.2s;
}

.search-submit:hover {
    background-color: var(--accent-color-hover);
}

.header-user-profile {
    position: relative;
}

.user-profile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 8px;
    color: var(--text-color-main);
    transition: color 0.2s ease;
}

.user-profile-toggle:hover {
    color: var(--accent-color);
}

.user-profile-toggle .avatar {
    border-radius: 50%;
}

.user-dropdown-menu {
    position: absolute;
    top: 10px;
    right: 0;
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    width: 280px;
    z-index: 1000;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    margin-top: 0;
    color: #fff;
    padding: 0;
}

.dropdown-header {
    position: relative;
    padding: 20px;
    border-bottom: 1px solid #333;
}

.close-dropdown {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}

.close-dropdown:hover {
    color: var(--accent-color);
}

.dropdown-profile-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
}

.dropdown-profile-info .avatar,
.dropdown-profile-info .guest-avatar.large {
    border-radius: 50%;
    background-color: #333;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dropdown-user-details {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.dropdown-name {
    font-weight: bold;
    font-size: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-email {
    font-size: 12px;
    color: #aaa;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-links {
    padding: 10px 0;
}

.dropdown-stats-section {
    display: flex;
    padding: 15px 20px;
    border-bottom: 1px solid #333;
}

.stat-box {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 12px;
    color: #888;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 20px;
    font-weight: bold;
    color: #fff;
}

.dropdown-links a {
    display: block;
    padding: 15px 20px;
    color: #ccc;
    font-size: 15px;
    border-bottom: none;
    transition: color 0.2s;
}

.dropdown-links a:hover {
    background-color: transparent;
    color: #fff;
}

/* Front Page Series Section */
.front-section-header {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
}

.front-section-header h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
}

.calendar-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ccc;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 15px;
    cursor: pointer;
    transition: all 0.2s;
}

.calendar-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* Updated Series Card to Match Screenshot */
.series-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.series-card {
    background: transparent;
    border: none;
    border-radius: 0;
    overflow: visible;
    display: flex;
    flex-direction: column;
}

.series-card-thumb {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 10px;
}

.series-card-thumb img {
    width: 100%;
    height: auto;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    display: block;
}

.series-badges {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    z-index: 2;
}

.badge {
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    color: #fff;
    letter-spacing: 0.5px;
}

.badge-red { background-color: #e74c3c; }
.badge-green { background-color: #2ecc71; }
.badge-purple { background-color: #9b59b6; }
.badge-dark { background-color: #34495e; }

.series-card-info {
    padding: 0;
}

.series-card-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.series-chapters {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.chapter-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    transition: background-color 0.2s;
}

.chapter-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.chapter-name {
    font-weight: 600;
    color: #fff;
}

.chapter-time {
    color: #888;
    font-size: 11px;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .header-container {
        flex-wrap: wrap;
    }
    
    .site-identity, .header-user-profile {
        margin-bottom: 0;
    }

    .desktop-search {
        display: none;
    }

    .mobile-search-wrapper {
        display: block;
    }
    
    .series-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    /* Fullscreen Dropdown on Mobile */
    .user-dropdown-menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        max-width: 100%;
        border-radius: 0;
        margin-top: 0;
        border: none;
        box-shadow: none;
        overflow-y: auto;
    }
    
    .close-dropdown {
        top: 20px;
        right: 20px;
        font-size: 30px;
    }
}

/* Footer Styles */
.site-footer {
    flex-shrink: 0;
    text-align: left;
    padding: 40px 20px 20px 20px;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-color-secondary);
    margin-top: 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto 30px auto;
}

.footer-title {
    font-size: 18px;
    color: #fff;
    margin-bottom: 15px;
}

.footer-desc {
    color: var(--text-color-muted);
    font-size: 14px;
    line-height: 1.6;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--text-color-muted);
    transition: color 0.2s;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--text-color-muted);
    font-size: 13px;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}
