/* ============================================
   PantsuVoice — Общие стили (styles.css)
   ============================================ */

:root {
    --bg-dark: #0f111a;
    --bg-card: #1a1d2d;
    --accent-pink: #FF99CC;
    --accent-blue: #33CCFF;
    --text-main: #ffffff;
    --text-gray: #a0a0b0;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
}

a { text-decoration: none; color: inherit; transition: 0.3s; }

/* === ШАПКА (общая для всех страниц) === */
header {
    position: fixed; top: 0; width: 100%; padding: 15px 0;
    background: rgba(15, 17, 26, 0.9); backdrop-filter: blur(15px);
    z-index: 1000; border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex; justify-content: center;
}

.header-content {
    width: 100%; max-width: 1200px; display: flex;
    justify-content: space-between; align-items: center; padding: 0 20px;
}

.logo {
    font-size: 1.5rem; font-weight: 900; text-transform: uppercase;
    background: linear-gradient(90deg, var(--accent-pink), var(--accent-blue));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

nav a {
    color: var(--text-main); margin-left: 20px; font-weight: 700;
    font-size: 0.9rem; text-transform: uppercase;
}

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

/* === ФУТЕР (общий) === */
footer {
    background-color: #05060a; color: var(--text-gray);
    text-align: center; padding: 40px 20px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-logo {
    font-size: 1.8rem; font-weight: 900; color: white;
    margin-bottom: 15px; display: inline-block;
}

.disclaimer {
    font-size: 0.8rem; max-width: 600px; margin: 15px auto 0;
    opacity: 0.5; line-height: 1.5;
}

.copyright {
    margin-top: 15px; font-size: 0.9rem; color: white; opacity: 0.8;
}

/* === ОБЩИЕ КОМПОНЕНТЫ === */
.btn {
    display: inline-block; background: linear-gradient(90deg, #ff7eb3, #8e44ad);
    color: white !important; padding: 18px 45px; border-radius: 50px;
    font-weight: 800; text-transform: uppercase; letter-spacing: 1px;
    box-shadow: 0 10px 30px rgba(255, 126, 179, 0.4);
    transition: transform 0.3s, box-shadow 0.3s; border: none;
}

.btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(142, 68, 173, 0.6);
}

/* Donation block (используется на деталках) */
.donation-wrapper {
    text-align: center; margin: 40px auto; padding: 30px;
    background: rgba(255, 255, 255, 0.03); border-radius: 20px;
    max-width: 600px; border: 1px solid rgba(255,255,255,0.05);
}

.donation-title {
    font-size: 1.8rem; font-weight: 900; margin-bottom: 10px; color: #ffffff;
}

.donation-subtitle {
    font-size: 1rem; color: #d1d1d1; margin-bottom: 25px;
}

.donation-arrow {
    font-size: 24px; margin-bottom: 20px; color: var(--accent-pink);
    animation: bounce 2s infinite;
}

.donate-btn {
    display: inline-block;
    background: linear-gradient(90deg, #aa00ff, #ea00ff);
    color: white !important; text-decoration: none;
    padding: 18px 60px; border-radius: 50px;
    font-size: 1.1rem; font-weight: bold;
    box-shadow: 0 4px 20px rgba(170, 0, 255, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}

.donate-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 30px rgba(170, 0, 255, 0.7);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* Team block */
.team-block {
    background: rgba(255,255,255,0.03); padding: 20px;
    border-radius: 10px; border-left: 3px solid var(--accent-pink);
    margin-bottom: 30px;
}

.team-row { margin-bottom: 8px; }

.team-role { color: var(--text-gray); font-size: 0.9rem; margin-right: 10px; }

.team-name { font-weight: bold; color: white; }

/* Контейнер для детальных страниц */
.container {
    max-width: 1100px; margin: 100px auto 50px; padding: 0 20px;
}

/* === КАТАЛОГ — ПОИСК И ФИЛЬТРЫ (новые стили) === */
.catalog-controls {
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.search-row {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 220px;
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.08);
    color: white;
    padding: 12px 18px;
    border-radius: 999px;
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

.search-input:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 4px rgba(51, 204, 255, 0.1);
}

.search-input::placeholder { color: #777; }

.sort-select {
    background: var(--bg-card);
    color: white;
    border: 1px solid rgba(255,255,255,0.08);
    padding: 10px 16px;
    border-radius: 999px;
    font-family: inherit;
    font-size: 0.95rem;
    cursor: pointer;
    min-width: 170px;
}

.sort-select:focus { border-color: var(--accent-blue); outline: none; }

.genre-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.genre-chip {
    background: rgba(255,255,255,0.06);
    color: var(--text-gray);
    border: 1px solid rgba(255,255,255,0.06);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
    transition: all .15s ease;
    white-space: nowrap;
}

.genre-chip:hover {
    background: rgba(255,255,255,0.12);
    color: white;
    border-color: rgba(255,255,255,0.15);
}

.genre-chip.active {
    background: linear-gradient(90deg, var(--accent-pink), var(--accent-blue));
    color: #111;
    border-color: transparent;
    font-weight: 800;
}

.results-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-gray);
    padding: 4px 2px;
}

.results-count { font-weight: 700; color: var(--text-main); }

.clear-btn {
    background: none;
    border: none;
    color: var(--accent-blue);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
}

.clear-btn:hover { text-decoration: underline; }

/* Улучшенные карточки */
.card-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 8px;
}

.mini-tag {
    font-size: 0.68rem;
    font-weight: 700;
    background: rgba(255,255,255,0.07);
    color: var(--text-gray);
    padding: 2px 8px;
    border-radius: 6px;
    line-height: 1.3;
    border: 1px solid rgba(255,255,255,0.04);
}

.mini-tag:hover {
    background: rgba(51,204,255,0.15);
    color: var(--accent-blue);
}

.card-fav {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0,0,0,0.55);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    z-index: 11;
    color: #fff;
    transition: transform .15s, background .15s;
}

.card-fav:hover { transform: scale(1.1); }

.card-fav.faved {
    color: #ff4d8d;
    background: rgba(255,77,141,0.2);
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-gray);
    background: rgba(255,255,255,0.02);
    border-radius: 16px;
}

/* === Медиа-запросы общие === */
@media (max-width: 768px) {
    .header-content { flex-direction: column; gap: 10px; }
    .logo { font-size: 1.4rem; }
    nav {
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
    }
    nav a {
        margin: 0 4px;
        display: inline-block;
        font-size: 0.8rem;
        background: rgba(255,255,255,0.08);
        padding: 6px 12px;
        border-radius: 16px;
    }
    nav::-webkit-scrollbar {
        height: 3px;
    }
}

/* Кнопка избранного на детальных страницах аниме */
.fav-detail-btn {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    color: white;
    padding: 10px 20px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.92rem;
    cursor: pointer;
    transition: all .2s;
    margin-bottom: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.fav-detail-btn:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
}
.fav-detail-btn.faved {
    color: #ff4d8d;
    border-color: #ff4d8d;
    background: rgba(255, 77, 141, 0.08);
}

/* === Общие стили страниц аниме (anime-header layout) === */
.anime-header { display: flex; gap: 40px; margin-bottom: 50px; }
.anime-poster { flex-shrink: 0; width: 300px; }
.poster-img { width: 100%; border-radius: 15px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.1); }
.anime-info { flex-grow: 1; }

.anime-title { font-size: 2.5rem; font-weight: 900; margin: 0 0 10px; line-height: 1.2; }
.anime-meta { display: flex; gap: 15px; margin-bottom: 20px; font-size: 0.9rem; color: var(--accent-blue); font-weight: bold; flex-wrap: wrap; }
.anime-meta a { color: var(--accent-blue); }
.anime-desc { line-height: 1.6; color: var(--text-gray); margin-bottom: 30px; font-size: 1rem; }

.team-block {
    background: rgba(255,255,255,0.03); padding: 20px;
    border-radius: 10px; border-left: 3px solid var(--accent-pink);
    margin-bottom: 30px;
}
.team-row { margin-bottom: 8px; }
.team-role { color: var(--text-gray); font-size: 0.9rem; margin-right: 10px; }
.team-name { font-weight: bold; color: white; }

@media (max-width: 768px) {
    .anime-header { flex-direction: column; align-items: center; text-align: center; }
    .anime-poster { width: 220px; margin: 0 auto; }
    .anime-meta { justify-content: center; flex-wrap: wrap; }
}

/* View toggle (сетка / список) */
.view-toggle {
    display: flex;
    background: rgba(255,255,255,0.05);
    border-radius: 999px;
    padding: 3px;
    border: 1px solid rgba(255,255,255,0.08);
}
.view-btn {
    background: transparent;
    border: none;
    color: var(--text-gray);
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .15s;
}
.view-btn.active {
    background: var(--accent-blue);
    color: #111;
    font-weight: 800;
}

/* List view for catalog */
.grid.list-view {
    grid-template-columns: 1fr;
    gap: 10px;
}
.grid.list-view .card {
    flex-direction: row;
    min-height: 110px;
    padding-right: 15px;
}
.grid.list-view .img-wrapper {
    width: 78px;
    flex-shrink: 0;
    border-radius: 0;
}
.grid.list-view .card-img {
    border-radius: 12px 0 0 12px;
}
.grid.list-view .card-content {
    padding: 12px 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.grid.list-view .card-title {
    font-size: 1rem;
    margin-bottom: 4px;
}
.grid.list-view .card-genres {
    margin-top: 4px;
}
.grid.list-view .badge {
    top: 8px;
    right: 8px;
    font-size: 0.65rem;
    padding: 3px 8px;
}

/* Share buttons on anime pages */
.share-section {
    margin: 15px 0 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.share-label {
    font-size: 0.85rem;
    color: var(--text-gray);
    font-weight: 700;
}
.share-buttons {
    display: flex;
    gap: 8px;
}
.share-btn {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all .15s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.share-btn:hover {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: #111;
}
.share-btn.copy {
    background: rgba(255,255,255,0.04);
}
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #1a1d2d;
    color: white;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 0.85rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    z-index: 9999;
    opacity: 0;
    transition: opacity .3s;
}
.toast.show { opacity: 1; }