
:root { --primary: #ff4757; --bg: #0a0a0a; --card: #141414; --text: #e0e0e0; --btn-read: #ff4757; --nav-bg: #111; --new: #f1c40f; --ongoing: #2ecc71; --completed: #0984e3; --telegram: #0088cc; }
html, body { overflow-x: hidden; width: 100%; margin: 0; padding: 0; }
body { background-color: var(--bg); color: var(--text); font-family: 'Segoe UI', sans-serif; display: flex; flex-direction: column; min-height: 100vh;}
a { text-decoration: none; color: inherit; transition: 0.2s; }

.telegram-banner { background: var(--telegram); color: white; font-weight: bold; font-size: 14px; height: 35px; display: flex; align-items: center; overflow: hidden; position: relative; z-index: 2000; text-transform: uppercase; letter-spacing: 1px; }
.telegram-banner a { width: 100%; height: 100%; display: flex; align-items: center; text-decoration: none; color: white; }
.marquee-content { display: flex; animation: marquee 15s linear infinite; white-space: nowrap; }
.marquee-item { padding: 0 40px; display: flex; align-items: center; gap: 10px; }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

header { background: #111; padding: 15px 20px; position: sticky; top: 0; z-index: 1000; border-bottom: 1px solid #222; }
.nav-container { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.logo a { font-size: 26px; font-weight: 900; color: #fff; text-transform: uppercase; letter-spacing: 1px; display: flex; align-items: center; }
.banana-icon { display: inline-block; transform: rotate(10deg) translateY(-2px); margin: 0 2px; font-size: 28px; }

.search-box { position: relative; width: 100%; max-width: 500px; flex-grow: 1; }
.search-input { width: 100%; padding: 10px 15px; border-radius: 6px; border: 1px solid #444; background: #222; color: white; outline: none; transition: 0.3s; box-sizing: border-box; font-size: 14px; }
.search-input:focus { border-color: var(--primary); background: #2a2a2a; }
.search-results { position: absolute; top: 45px; left: 0; right: 0; background: #1a1a1a; border: 1px solid #333; border-radius: 6px; max-height: 400px; overflow-y: auto; display: none; z-index: 2000; box-shadow: 0 5px 15px rgba(0,0,0,0.5); }
.search-item { display: flex; align-items: center; padding: 10px; border-bottom: 1px solid #222; }
.search-item:hover { background: #333; }
.search-item img { width: 40px; height: 60px; object-fit: cover; margin-right: 10px; border-radius: 4px; }

.filter-bar { background: #141414; padding: 10px 20px; border-bottom: 1px solid #333; box-shadow: 0 2px 5px rgba(0,0,0,0.5); display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; position: relative; z-index: 999; }
.dropdown { position: relative; display: inline-block; }
.dropbtn { background-color: #222; color: #ccc; padding: 10px 20px; font-size: 13px; font-weight: bold; border: 1px solid #444; border-radius: 4px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 15px; text-transform: uppercase; transition: 0.2s; min-width: 150px; }
.dropbtn:hover { background-color: var(--primary); color: #fff; border-color: var(--primary); }
.dropdown-content { display: none; position: absolute; background-color: #1a1a1a; min-width: 100%; box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.8); border: 1px solid #333; max-height: 350px; overflow-y: auto; border-radius: 4px; z-index: 2000; top: 100%; left: 0; margin-top: 5px; }
.dropdown-content.multi-col { grid-template-columns: repeat(2, 1fr); width: max-content; min-width: 350px; }
.dropdown:hover .dropdown-content { display: block; }
.dropdown:hover .dropdown-content.multi-col { display: grid; }
.dropdown-content a { color: #bbb; padding: 12px 15px; text-decoration: none; display: block; font-size: 13px; border-bottom: 1px solid #222; transition: 0.2s; }
.dropdown-content.multi-col a { border-right: 1px solid #222; }
.dropdown-content a:hover { background-color: var(--primary); color: white; font-weight: bold; padding-left: 20px; }

.container { max-width: 1200px; margin: 0 auto; padding: 20px; width: 100%; box-sizing: border-box; }
.manga-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 15px; }
.manga-card { background: var(--card); border-radius: 6px; overflow: hidden; position: relative; transition: transform 0.2s; }
.manga-card:hover { transform: translateY(-5px); z-index: 2; box-shadow: 0 5px 15px rgba(0,0,0,0.5); }
.card-cover { height: 230px; background: #222; overflow: hidden; position: relative; }
.card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-info { padding: 10px; }
.card-title { font-weight: bold; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; }
.card-sub { font-size: 11px; color: #777; margin-top: 4px; }

.badge { position: absolute; padding: 3px 8px; font-size: 11px; border-radius: 4px; z-index: 10; font-weight: 800; box-shadow: 0 2px 5px rgba(0,0,0,0.6); }
.badge-new { top: 5px; left: 5px; background: var(--new); color: #000; animation: pulse 2s infinite; }
.badge-status { bottom: 5px; right: 5px; color: #fff; text-transform: uppercase; font-size: 9px; }
.badge-18 { top: 5px; right: 5px; background: #e84118; color: #fff; border: 1px solid rgba(255,255,255,0.3); font-size: 10px; }
.status-on { background: var(--ongoing); }
.status-end { background: var(--completed); }

.delete-history-btn { position: absolute; top: 5px; left: 5px; background: rgba(0,0,0,0.8); color: #fff; border: 1px solid #555; border-radius: 50%; width: 22px; height: 22px; font-size: 14px; font-weight: bold; display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 20; transition: 0.2s; line-height: 1; }
.delete-history-btn:hover { background: #ff4757; border-color: #ff4757; transform: scale(1.15); }
.history-badge { position: absolute; top: 5px; right: 5px; background: linear-gradient(45deg, #ff4757, #ff6b81); color: white; padding: 4px 8px; font-size: 11px; border-radius: 6px; z-index: 10; font-weight: bold; box-shadow: 0 2px 8px rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.2); }
@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.1); } 100% { transform: scale(1); } }

.pagination { display: flex; justify-content: center; gap: 5px; margin-top: 40px; flex-wrap: wrap; margin-bottom: 20px;}
.page-link { background: #222; color: #fff; padding: 8px 12px; border-radius: 4px; font-size: 14px; border: 1px solid #333; }
.page-link.active { background: var(--primary); border-color: var(--primary); font-weight: bold; }
.page-link:hover:not(.active) { background: #333; }

.serie-header { background: #111; padding: 30px 15px; text-align: center; border-bottom: 1px solid #333; }
.serie-cover { width: 200px; height: 300px; object-fit: cover; border-radius: 6px; border: 3px solid #333; box-shadow: 0 5px 15px rgba(0,0,0,0.5); margin: 0 auto; display: block; }
.serie-title { font-size: 26px; font-weight: bold; margin: 15px 0 10px 0; color: #fff; }
.serie-desc { max-width: 800px; margin: 15px auto; color: #ccc; font-size: 14px; text-align: justify; line-height: 1.6; }

.serie-details-box { background: #141414; padding: 20px; border-radius: 8px; border: 1px solid #333; margin: 20px auto; max-width: 800px; text-align: left; font-size: 14px; color: #ccc; display: flex; flex-direction: column; gap: 12px; box-shadow: inset 0 0 10px rgba(0,0,0,0.5); }
.serie-details-row { display: flex; align-items: flex-start; border-bottom: 1px dashed #222; padding-bottom: 8px; }
.serie-details-row:last-child { border-bottom: none; padding-bottom: 0; }
.serie-details-label { width: 100px; color: #888; font-weight: bold; flex-shrink: 0; }
.serie-details-value { flex: 1; color: #eee; }
.serie-details-value a { color: var(--primary); transition: 0.2s; }
.serie-details-value a:hover { text-decoration: underline; color: #fff; }

.read-start-btn { display: inline-block; background: linear-gradient(45deg, #ff4757, #ff6b81); color: white; padding: 12px 35px; border-radius: 30px; font-weight: bold; font-size: 16px; margin-top: 15px; box-shadow: 0 4px 15px rgba(255, 71, 87, 0.4); border: none; }
.read-start-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(255, 71, 87, 0.6); }

.chapter-list-container { max-width: 800px; margin: 20px auto; max-height: 400px; overflow-y: auto; background: #141414; border: 1px solid #333; border-radius: 6px; padding: 10px; scrollbar-width: thin; scrollbar-color: var(--primary) #222; }
.chapter-row { display: flex; justify-content: space-between; align-items: center; background: #1a1a1a; margin-bottom: 5px; padding: 12px 15px; border-radius: 4px; border-bottom: 1px solid #222; transition: 0.2s; }
.chapter-row:hover { background: #252525; padding-left: 20px; border-left: 3px solid var(--primary); }
.chapter-name { font-weight: bold; font-size: 14px; color: #eee; }
.chapter-date { font-size: 12px; color: #777; font-style: italic; }

.horizontal-scroll { display: flex; overflow-x: auto; gap: 15px; padding-bottom: 15px; scrollbar-width: thin; scrollbar-color: var(--primary) #222; scroll-snap-type: x mandatory; }
.horizontal-scroll .manga-card { flex: 0 0 160px; scroll-snap-align: start; }

.carousel-section { margin: 10px 0; }
.carousel-title-header { font-size: 16px; font-weight: bold; margin-bottom: 10px; color: #aaa; text-transform: uppercase; letter-spacing: 1px; text-align:center; }
.carousel-container { overflow-x: auto; padding: 20px 0; background: #111; border-top: 1px solid #333; border-bottom: 1px solid #333; white-space: nowrap; position: relative; scroll-snap-type: x mandatory; scrollbar-width: none; }
.carousel-container::-webkit-scrollbar { display: none; }
.carousel-track { display: inline-flex; gap: 15px; padding: 0 10px; }
.carousel-item { width: 150px; flex-shrink: 0; position: relative; transition: 0.3s; scroll-snap-align: start; }
.carousel-item:hover { transform: scale(1.05); z-index: 5; }
.carousel-item img { width: 100%; height: 200px; object-fit: cover; border-radius: 6px; }
.carousel-title { font-size: 12px; font-weight: bold; text-align: center; margin-top: 5px; color: #ccc; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.reader-container { max-width: 800px; margin: 0 auto; line-height: 0; font-size: 0; min-height: 50vh;}
.reader-container img { width: 100%; display: block; margin: 0; padding: 0; }
@media (max-width: 1024px) { .reader-container { max-width: 100vw; width: 100%; } .container { padding: 10px; } }

.chapter-nav { background: var(--nav-bg); padding: 10px; border-radius: 8px; margin: 20px auto; max-width: 800px; display: flex; justify-content: space-between; gap: 10px; align-items: center; border: 1px solid #333; }
.nav-btn { background: var(--primary); color: #fff; padding: 8px 15px; border-radius: 4px; font-weight: bold; font-size: 13px; min-width: 70px; text-align: center; }
.nav-btn.disabled { background: #333; color: #555; pointer-events: none; }
.chapter-select { padding: 8px; border-radius: 4px; background: #000; color: white; border: 1px solid #444; flex-grow: 1; }

.ad-container { margin: 20px auto; text-align: center; max-width: 100%; overflow: hidden; min-height: 90px; display: flex; justify-content: center; align-items: center; }

footer { background: #0f0f0f; padding: 20px 10px; margin-top: auto; border-top: 1px solid #222; text-align: center; }
.social-links { display: flex; justify-content: center; gap: 10px; margin-bottom: 15px; }
.social-btn { width: 35px; height: 35px; background: #222; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: 0.3s; border: 1px solid #333; }
.social-btn svg { width: 16px; height: 16px; fill: #888; }
.footer-links { display: flex; justify-content: center; gap: 15px; font-size: 13px; }
.footer-links a { color: #666; }
.progress-wrap { position: fixed; right: 20px; bottom: 20px; height: 36px; width: 36px; cursor: pointer; display: block; border-radius: 50px; background: #222; border: 1px solid #333; z-index: 1000; opacity: 0; transition: 0.2s; }
.progress-wrap.active-progress { opacity: 1; }
.progress-wrap::after { content: '🡡'; position: absolute; left: 0; top: -3px; height: 36px; width: 36px; text-align: center; line-height: 36px; color: var(--primary); font-size: 20px; font-weight: 900; }
