@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600&display=swap');

:root {
    --bg-color: #121212;
    --text-color: #ffffff;
    --settings-header-color: #ffa726;
    --settings-accent-bg: #ffa726;
    --settings-accent-text: #ffa726;
    --settings-btn-hover: #ff8f00;
    --settings-btn-color: #121212;
    --text-muted: #d6d6d6;
    --text-soft: #b8bcc7;
    --accent-color: #ff4081;
    --card-bg: #1e1e1e;
    --hover-color: #2c2c2c;
    --item-bg: #1f1f1f;
    --surface-2: #252525;
    --surface-3: #2d2d2d;
    --border-color: #333333;
    --border-strong: #444444;
    --input-bg: #2a2a2a;
    --input-border: #444444;
    --input-focus: #4a90e2;
    --input-focus-hover: #266eb5;
    --input-focus-ring: rgba(74, 144, 226, 0.25);
    --link-color: #8ec8ff;
    --link-hover-color: #b8ddff;
    --button-primary-bg: #ff4081;
    --button-primary-hover: #cf3468;
    --button-success-bg: #4caf50;
    --button-success-hover: #43a047;
    --button-danger-bg: #ff5555;
    --button-danger-hover: #e64545;
    --overlay-bg: rgba(0, 0, 0, 0.7);
    --shadow-soft: 0 4px 10px rgba(0, 0, 0, 0.2);
    --shadow-elevated: 0 10px 22px rgba(0, 0, 0, 0.28);
    --fav-btn: #ff4081;
    --unfollow-btn: #555555;
    --drop-down: #2a2a2a;
    --hero-gradient-1: #5a189a;
    --hero-gradient-2: #14001f;
    --hero-header: #d4a5ff;
    --hero-text: var(--text-color);
    --hero-button-gradient-1: #9d4edd;
    --hero-button-gradient-2: #c77dff;
    --hero-button-glow: rgba(199,125,255,.6);
    --manga-list-bg: #141414;
    --manga-list-active-bg: #3a3a3a;
    --manga-list-hover-bg: #4a4a4a;
}

body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Мінімальна висота сторінки */
}

.main-content {
    flex: 1; /* Займає весь доступний простір */
}

.width-100 {
    width: 100%;
    margin-top: 10px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 20px 15px 20px;
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--hover-color);
}

.logo {
    font-size: 1rem;
    font-weight: bold;
    color: var(--accent-color);
    text-decoration: none;
}

.header .logo img {
    max-width: 75px;
}

.navigation ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    font-family: "Montserrat", sans-serif;
    font-weight: 600;
}

.navigation li {
    margin: 0 15px;
}

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

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

.search-bar {
    display: flex;
}

.search-bar input {
    padding: 8px;
    border: none;
    border-radius: 4px 0 0 4px;
    background-color: var(--hover-color);
    color: var(--text-color);
}

.search-bar button {
    padding: 8px;
    border: none;
    border-radius: 0 4px 4px 0;
    background-color: var(--accent-color);
    color: var(--text-color);
    cursor: pointer;
}

.main-content {
    padding: 20px;
}

.main-content iframe {
    width: 100% !important;
    margin-top: 20px;
    height: auto !important;
}

.banner {
    text-align: center;
    margin-bottom: 40px;
}

.banner h1 {
    font-size: 2.5rem;
    color: var(--accent-color);
}

.banner p {
    font-size: 1.2rem;
}

.cta-button {
    padding: 10px 20px;
    background-color: var(--accent-color);
    color: var(--text-color);
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
}

.manga-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 0.2fr));
    gap: 20px;
}

.manga-grid a {
    color: var(--text-color);
    text-decoration: none;
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 10px;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.manga-grid a:hover {
    transform: scale(1.05);
    background-color: var(--hover-color);
}

.manga-card .manga-author {
    color: var(--text-muted);
}

.manga-card img {
    max-width: 100%;
    border-radius: 8px;
}

.footer {
    text-align: center;
    padding: 20px;
    background-color: var(--card-bg);
    border-top: 1px solid var(--hover-color);
}

.footer nav a {
    text-decoration: none;
    color: var(--text-color);
    margin: 0 10px;
    transition: color 0.3s ease;
}

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

.footer-ads {
    text-align: center;
    margin-top: 10px;
}

.pagination {
    width: 100%;
    text-align: center;
    margin-top: 30px;
    margin-bottom: 10px;
}

.pagination a {
    text-decoration: none;
}

.pagination .library-btn {
    text-decoration: none;
    width: 100%;
    padding: 15px 25px;
    font-size: 16px;
    color: #f2f2f2;
    background-color: var(--fav-btn);
    cursor: pointer;
    transition: background-color 0.3s ease;
    align-self: flex-start;
    margin-top: 15px;
    border-radius: 2em;
    font-weight: 700;
}

.pagination .library-btn:hover {
    background-color: #cf3468;
}

.pagination button,
.navigation-panel button {
    background-color: var(--surface-3);
    color: var(--text-color);
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.pagination button:hover,
.navigation-panel button:hover {
    background-color: var(--hover-color);
}

/* Нижнє меню */
.bottom-menu {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--item-bg);
    justify-content: space-around;
    align-items: center;
    padding: 10px 0;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.bottom-menu a {
    color: var(--text-color);
    text-decoration: none;
}

.menu-item {
    color: var(--text-color);
    text-align: center;
    cursor: pointer;
    flex: 1;
    padding: 5px;
    position: relative;
}

.menu-item p {
    margin: 5px 0 0;
    font-size: 12px;
}

.menu-item span {
    font-size: 20px;
}

.menu-item.expandable .submenu {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--input-bg);
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    align-items: center;
    width: 80%;
}

.menu-item.expandable:hover .submenu {
    display: flex;
}

.submenu-link {
    color: var(--text-color);
    text-decoration: none;
    padding: 5px 0;
    width: 100%;
    text-align: center;
}

.submenu-link:hover {
    background: var(--border-color);
}

/* Бургер-меню */
#burger-menu {
    position: fixed;
    top: 0;
    right: -300px; /* Початково сховане */
    width: 300px;
    height: 100%;
    background: #16141a;
    z-index: 1100;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.burger-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
}

.close-btn {
    align-self: flex-end;
    background: none;
    border: none;
    color: #aaa;
    font-size: 20px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close-btn:hover {
    color: #fff;
}

.burger-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 10px;
}

.burger-link {
    text-decoration: none;
    margin: 5px 0;
    background: #1d1b23;
    border: none;
    border-radius: 8px;
    padding: 10px 12px;
    color: #cfcfcf;
    font-size: 15px;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.burger-link:hover {
    background: #2a2830;
    color: #fff;
}

.burger-link.exit {
    color: #c98b8b;
}

.burger-link.exit:hover {
    background: #2a1f25;
    color: #f1b6b6;
}

.divider {
    width: 100%;
    height: 1px;
    background: #2d2a33;
    margin: 12px 0;
}

.burger-link img {
    max-width: 22px;
    position: absolute;
    margin-left: 10px;
}

/* Відкрите бургер-меню */
#burger-menu.open {
    right: 0;
}

.filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1200px;
    margin: 20px auto;
    padding: 10px;
    box-sizing: border-box;
    background-color: var(--card-bg);
    border: 1px solid #333;
    border-radius: 5px;
}
.filter-container select, .dropdown-button {
    flex: 1;
    min-width: 200px;
    padding: 10px;
    border: 1px solid #444;
    border-radius: 5px;
    background-color: var(--drop-down);
    color: #e0e0e0;
    text-align: left;
    cursor: pointer;
}
.filter-container button {
    padding: 10px 20px;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    background-color: var(--drop-down);
}
.filter-container button:hover {
    background-color: #474747;
}

/* Стилі для випадаючого меню жанрів */
.dropdown {
    position: relative;
    flex: 1;
    min-width: 200px;
}
.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--drop-down);
    min-width: 100%;
    border: 1px solid #444;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1;
}
.dropdown-content label {
    display: block;
    padding: 5px;
    cursor: pointer;
    color: #e0e0e0;
}
.dropdown-content label:hover {
    background-color: #383838;
}
.dropdown-content input {
    margin-right: 5px;
}
.dropdown:hover .dropdown-content {
    display: block;
    max-height: 150px;
    overflow: auto;
}

.dropdown .dropdown-button {
    width: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="%23e0e0e0"><path d="M5.23 7.21a.75.75 0 011.06.02L10 10.847l3.71-3.617a.75.75 0 111.06 1.06l-4.25 4.14a.75.75 0 01-1.06 0l-4.25-4.14a.75.75 0 01.02-1.06z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 1em;
    border: 1px solid #444;
}

.promo-block {
    /*background: linear-gradient(135deg, #2c003e, #1a0026);*/
    margin: 20px auto;
    max-width: 800px;
    position: relative;
}

.promo-block h1 {
    font-size: 48px;
    font-weight: 700;
    color: var(--hero-header);
    margin-bottom: 20px;
}

.promo-block p {
    font-size: 18px;
    line-height: 1.6;
    color: #e0e0e0;
    margin-bottom: 30px;
}

.random-button {
    background-color: #833ab4;
    color: #ffffff;
    font-size: 18px;
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.random-button:hover {
    background-color: #6d2f99;
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(131, 58, 180, 0.6);
}

.manga-list-block .block {
  display: flex;
  padding: 10px 0px; /* Відступи всередині */
}

.manga-list-block .image {
  flex-shrink: 0; /* Забороняє зменшення зображення */
  width: 25%; /* Фіксована ширина зображення */
  overflow: hidden; /* Обрізає зображення, якщо воно виходить за межі */
  border-radius: 8px; /* Закруглення країв зображення */
}

.manga-list-block .image img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Масштабування зображення без спотворень */
}

.manga-list-block .content {
  margin-left: 15px; /* Відступ між зображенням і текстом */
}

.manga-list-block .content h4 {
  font-size: 18px; /* Розмір заголовка */
  margin: 0 0 5px; /* Відступи зверху і знизу */
}

.manga-list-block .content span {
  color: #d6d6d6;
  font-size: 15px;
}

.manga-list-block {
    flex: 1 1;
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 5px 20px 20px 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5);
}

.manga-list-block h2 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #ff9800;
}

.manga-list-block ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.manga-list-block ul li {
    margin: 10px 0;
}

.swiper {
    width: 100%;
    height: 100%;
    display: none;
}

.swiper-slide {
    height: auto;
    font-size: 18px;
    display: flex;
}

.swiper-slide {
    width: 80%;
}

.manga-list-block a {
    color: #fff;
    text-decoration: none;
}

.swiper-pagination-bullet {
    background: #717171 !important;
}

.swiper-pagination-bullet-active {
    background: #8020a8 !important;
}

.popular-Swiper {
    padding: 15px 0px 35px 0px;
}

/* Стилі для випадаючого меню */
.dropdown-pc {
    position: relative;
}

.header .navigation .dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    border-radius: 5px;
    z-index: 11;
}

.header .navigation .dropdown-content li {
    width: 100%;
}

.header .navigation .dropdown-content li a {
    padding: 5px;
    display: block;
}

/* Показуємо меню при наведенні */
.header .navigation .dropdown-pc:hover .dropdown-content {
    display: block;
}

.manga-new-sticker {
    position: relative;
    overflow: hidden;
}

/* Стрічка */
.ribbon {
    position: absolute;
    top: 20px;
    right: -40px;
    transform: rotate(45deg);
    background-color: #ed8d00;
    color: white;
    font-weight: bold;
    padding: 5px 40px;
    font-size: 12px;
    z-index: 10;
    text-align: center;
    font-family: 'Arial', sans-serif;
}

/* NEW YEAR */
.promo-hat {
    position: absolute;
    top: -40px;
    left: -20px;
    transform: rotate(-45deg);
    z-index: 10;
}

.promo-hat img {
    width: 65px;
}

/* NOTIFICATION */
.notif-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #1a1a1a;
    border: 1px solid #333;
    padding: 14px 18px;
    border-radius: 12px;
    cursor: pointer;
    transition: 0.2s;
    font-size: 15px;
}
.notif-btn:hover {
    background: #222;
}

/* Слайд-вікно */
.notif-panel {
    z-index: 10;
    position: fixed;
    left: 0;
    bottom: -100%;
    width: 100%;
    padding-bottom: 75px;
    height: 75vh;
    background: #1f1f1f;
    border-top: 1px solid #222;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -8px 40px rgba(0,0,0,0.6);
    transition: bottom 0.3s ease;
    display: flex;
    flex-direction: column;
}

.notif-panel.open {
    bottom: 0;
}

/* Верхня панель */
.notif-header {
    display: flex;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid #222;
    font-size: 18px;
    font-weight: bold;
}

.close-btn {
    cursor: pointer;
    font-size: 20px;
    padding: 0 8px;
}

/* Список */
.notif-list {
    overflow-y: auto;
    padding: 12px 16px;
    flex: 1;
}

.notif-item {
    background: #161616;
    padding: 14px;
    margin-bottom: 12px;
    border-radius: 12px;
    border: 1px solid #242424;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.notif-type {
    font-size: 12px;
    color: #c94141;
    margin-bottom: 4px;
    font-weight: bold;
}

.notif-title {
    font-size: 15px;
    font-weight: bold;
    margin-bottom: 4px;
}

.notif-author {
    font-size: 13px;
    color: #888;
}

.notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ff7a00;
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 12px;
    box-shadow: 0 0 6px rgba(255,120,0,0.6);
}

#notifications-link {
    color: var(--text-color);
    text-decoration: none;
}

@media only screen and (max-width: 768px) {
    .swiper {
        margin-top: 20px;
        display: block;
    }
    .popular-manga-grid {
        display: none;
    }
    .bottom-menu {
        display: flex;
    }
    .manga-grid {
      grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    .header .navigation {
        display: none;
    }
    .footer {
        margin-top: 25px;
    }
    .banner img {
        width: 100%;
    }
    .footer {
        padding: 20px 20px 100px 20px;
    }
    .main-content iframe img {
        width: 100% !important;
        height: auto !important;
    }
    .promo-block h1 {
        font-size: 34px;
    }
    .promo-block p {
        font-size: 15px;
        line-height: 1.5;
    }
    .search-bar input {
        width: 150px;
    }
    @media only screen and (max-width: 520px) {
        .promo-block h1 {
            font-size: 28px;
        }
    }
}
