/* ===== СБРОС СТИЛЕЙ И БАЗОВЫЕ НАСТРОЙКИ ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(145deg, #0d0720 0%, #06030e 50%, #000000 100%);
    color: #e0e0e0;
    font-family: 'Segoe UI', 'Roboto', system-ui, sans-serif;
    min-height: 100vh;
    line-height: 1.5;
    background-attachment: fixed;
    box-shadow: inset 0 0 200px rgba(100, 0, 200, 0.1);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== ССЫЛКИ ===== */
a {
    text-decoration: none;
    color: inherit;
}

/* ===== ШАПКА ===== */
.header {
    padding: 30px 0 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 30px;
}

.logo {
    font-size: 2.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.logo-icon {
    font-size: 2rem;
}

.logo-badge {
    background: #9147ff;
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 30px;
    margin-left: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.header-subtitle {
    color: #a0a0b0;
    margin-top: 10px;
    font-size: 1rem;
}

/* ===== АВАТАР В ШАПКЕ ===== */
.logo-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid #9147ff;
    margin-right: 10px;
    object-fit: cover;
}

/* ===== СЕТКА СОЦСЕТЕЙ ===== */
.social-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 40px;
}

.social-card {
    background: rgba(20, 20, 35, 0.7);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 18px 15px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: all 0.2s ease;
}

.social-card:hover {
    transform: translateY(-3px);
    background: rgba(30, 30, 50, 0.8);
}

.social-icon {
    font-size: 28px;
    margin-bottom: 12px;
}

.social-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.social-desc {
    font-size: 0.8rem;
    color: #8888aa;
}

/* Цвета ховера для соцсетей */
.social-card.twitch:hover { border-color: #9147ff; }
.social-card.telegram:hover { border-color: #26a5e4; }
.social-card.donate:hover { border-color: #ff8800; }
.social-card.youtube:hover { border-color: #ff0000; }
.social-card.boosty:hover { border-color: #f15f2e; }
.social-card.discord:hover { border-color: #5865f2; }
.social-card.steam:hover { border-color: #1b2838; }

/* Кнопка доната — фон как у всех */
.social-card.donate {
    /* Фон наследуется от .social-card */
}

/* Оранжевый ховер для доната */
.social-card.donate:hover {
    border-color: #ff8800 !important;
    background: rgba(30, 30, 50, 0.8) !important;
    transform: translateY(-3px);
}

.social-card.donate:hover .social-icon,
.social-card.donate:hover .social-name,
.social-card.donate:hover .social-desc {
    color: #ff8800 !important;
}

/* ===== ОБЩАЯ ШИРИНА ДЛЯ ОСНОВНЫХ БЛОКОВ ===== */
.search-section,
.calculator-block,
.watched-section-compact {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    background: rgba(15, 15, 22, 0.9);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(145, 71, 255, 0.15);
    border-radius: 24px;
}

/* ===== СЕКЦИЯ ПОИСКА ===== */
.search-section {
    padding: 30px;
    margin-bottom: 30px;
}

.section-title {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-subtitle {
    color: #9147ff;
    font-weight: 500;
    margin-bottom: 25px;
    font-size: 1rem;
    letter-spacing: 0.5px;
}

.search-box {
    display: flex;
    gap: 12px;
}

.search-input {
    flex: 1;
    background: rgba(10, 10, 20, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 16px 24px;
    font-size: 1rem;
    color: white;
    outline: none;
    transition: border-color 0.2s;
}

.search-input:focus {
    border-color: #9147ff;
}

.search-input::placeholder {
    color: #666688;
}

.search-btn {
    background: #9147ff;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 0 32px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-btn:hover {
    background: #772ce8;
}

.search-btn:active {
    transform: scale(0.97);
}

.search-hint {
    color: #666688;
    font-size: 0.8rem;
    margin-top: 12px;
    margin-left: 10px;
}

/* ===== КАРТОЧКА ФИЛЬМА ===== */
.movie-card {
    background: rgba(15, 15, 22, 0.9);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(145, 71, 255, 0.15);
    border-radius: 24px;
    padding: 30px;
    margin-bottom: 20px;
    display: flex;
    gap: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.movie-poster {
    flex-shrink: 0;
    width: 200px;
}

.movie-poster img {
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.movie-info {
    flex: 1;
}

.movie-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    color: #aaaacc;
    margin-bottom: 15px;
}

.meta-separator {
    margin: 0 8px;
    color: #555577;
}

.movie-ratings {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.rating-badge {
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.rating-badge:hover {
    background: rgba(255, 255, 255, 0.1);
}

.rating-badge.imdb { color: #f5c518; }
.rating-badge.kp { color: #f60; }
.rating-badge.wiki { color: #aaa; }

.movie-overview {
    color: #cccdde;
    line-height: 1.7;
}

/* ===== КАЛЬКУЛЯТОР ===== */
.calculator-block {
    padding: 30px;
    margin-bottom: 30px;
}

.calculator-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 25px;
    color: #9147ff;
}

.calc-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.calc-label {
    color: #aaaacc;
    font-size: 1rem;
}

.calc-value {
    font-weight: 600;
    font-size: 1.1rem;
}

.priority-row {
    border-bottom: none;
    padding: 20px 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #9147ff;
    cursor: pointer;
}

.checkbox-text {
    color: #ff9944;
    font-weight: 500;
}

.total-row {
    border-top: 2px solid #9147ff;
    border-bottom: none;
    margin-top: 10px;
    padding-top: 20px;
}

.total-row .calc-label {
    color: white;
    font-size: 1.3rem;
    font-weight: 600;
}

.total-row .calc-value {
    color: #9147ff;
    font-size: 2rem;
    font-weight: 700;
}

/* ===== КОПИРОВАНИЕ ДОНАТА ===== */
.donate-copy {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.donate-hint {
    color: #8888aa;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.copy-box {
    display: flex;
    gap: 10px;
}

.copy-input {
    flex: 1;
    background: rgba(10, 10, 20, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 14px 20px;
    font-size: 1rem;
    color: white;
    outline: none;
}

.copy-btn {
    background: #2a2a4a;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 0 24px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.copy-btn:hover {
    background: #3a3a6a;
}

/* ===== СООБЩЕНИЕ ОБ ОШИБКЕ ===== */
.error-message {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    background: rgba(255, 50, 50, 0.15);
    border: 1px solid rgba(255, 50, 50, 0.3);
    border-radius: 50px;
    padding: 16px 24px;
    text-align: center;
    color: #ff8888;
    margin-bottom: 30px;
}

/* ===== БЛОК ПРОСМОТРЕННЫХ ФИЛЬМОВ (КОМПАКТНЫЙ) ===== */
.watched-section-compact {
    padding: 25px 30px;
    margin-bottom: 30px;
}

.watched-header {
    margin-bottom: 20px;
}

.watched-header .section-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
}

.watched-header .section-subtitle {
    color: #9147ff;
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    margin: 0;
}

.watched-scroll {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
    scrollbar-color: #9147ff rgba(20, 20, 30, 0.5);
}

.watched-scroll::-webkit-scrollbar {
    height: 4px;
}

.watched-scroll::-webkit-scrollbar-track {
    background: rgba(20, 20, 30, 0.5);
    border-radius: 4px;
}

.watched-scroll::-webkit-scrollbar-thumb {
    background: #9147ff;
    border-radius: 4px;
}

.watched-card-compact {
    background: rgba(10, 10, 16, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 12px 16px 12px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    transition: all 0.2s ease;
    min-width: 200px;
    max-width: 240px;
}

.watched-card-compact:hover {
    background: rgba(20, 15, 30, 0.8);
    border-color: rgba(145, 71, 255, 0.25);
    transform: translateY(-2px);
}

.watched-poster-compact {
    width: 45px;
    height: 65px;
    border-radius: 6px;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.watched-info-compact {
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow: hidden;
}

.watched-title-compact {
    font-size: 0.95rem;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.watched-meta-compact {
    font-size: 0.75rem;
    color: #8888aa;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.watched-note-compact {
    text-align: right;
    color: #666688;
    font-size: 0.8rem;
    margin-top: 18px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-style: italic;
}

/* ===== ПОДВАЛ ===== */
.footer {
    padding: 30px 0;
    text-align: center;
    color: #666688;
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    margin-top: 20px;
}

/* ===== ВСПОМОГАТЕЛЬНЫЕ КЛАССЫ ===== */
.hidden {
    display: none !important;
}

/* ===== АДАПТИВ ДЛЯ МОБИЛЬНЫХ ===== */
@media (max-width: 768px) {
    .search-section,
    .calculator-block,
    .watched-section-compact,
    .movie-card {
        max-width: 100%;
        padding: 20px;
    }
    
    .movie-card {
        flex-direction: column;
    }
    
    .movie-poster {
        width: 100%;
        max-width: 200px;
        margin: 0 auto;
    }
    
    .movie-title {
        font-size: 1.5rem;
        text-align: center;
    }
    
    .movie-meta {
        justify-content: center;
    }
    
    .movie-ratings {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .search-btn {
        padding: 16px;
    }
    
    .copy-box {
        flex-direction: column;
    }
    
    .logo {
        font-size: 1.6rem;
        justify-content: center;
        text-align: center;