/* style.css - полная версия */

/* ========== RESET & BASE ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #0a0a0a;
    color: #ffffff;
    padding: 16px;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 40px;
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* ========== HEADER ========== */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 2px solid rgba(102, 126, 234, 0.2);
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.header-left h1 {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.header-left h1 .gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-left h1 .white {
    color: #ffffff;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.user-info {
    color: #aaa;
    font-size: 14px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 6px;
}

.admin-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 18px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    cursor: pointer;
}

.admin-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
}

/* ========== ALERTS ========== */
.alert {
    padding: 14px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: 500;
    font-size: 14px;
    animation: slideDown 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert .icon-md {
    flex-shrink: 0;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: rgba(46, 204, 113, 0.15);
    border: 1px solid rgba(46, 204, 113, 0.3);
    color: #2ecc71;
}

.alert-error {
    background: rgba(231, 76, 60, 0.15);
    border: 1px solid rgba(231, 76, 60, 0.3);
    color: #e74c3c;
}

.alert-info {
    background: rgba(52, 152, 219, 0.15);
    border: 1px solid rgba(52, 152, 219, 0.3);
    color: #3498db;
}

/* ========== SORT ========== */
.sort-wrapper {
    margin-bottom: 12px;
}

.sort-section {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.95) 0%, rgba(20, 20, 20, 0.95) 100%);
    padding: 10px 18px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    width: 100%;
    transition: all 0.3s ease;
}

.sort-section:hover {
    border-color: rgba(102, 126, 234, 0.3);
}

.sort-section label {
    color: #888;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ========== КАСТОМНЫЙ SELECT ========== */
.custom-select-wrapper {
    flex: 1;
    min-width: 150px;
    position: relative;
}

.filter-group .custom-select-wrapper {
    width: 100%;
    min-width: unset;
}

.custom-select {
    position: relative;
    cursor: pointer;
    user-select: none;
    width: 100%;
}

.custom-select-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: rgba(44, 44, 44, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.filter-group .custom-select-trigger {
    padding: 10px 14px;
    background: rgba(44, 44, 44, 0.8);
    border-radius: 8px;
    font-size: 14px;
}

.custom-select-trigger:hover {
    border-color: rgba(102, 126, 234, 0.5);
    background-color: rgba(44, 44, 44, 1);
}

.custom-select-trigger .custom-select-arrow {
    color: #667eea;
    font-size: 12px;
    transition: transform 0.3s ease;
    margin-left: 12px;
    display: flex;
    align-items: center;
}

.custom-select.active .custom-select-trigger {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.custom-select.active .custom-select-arrow {
    transform: rotate(180deg);
}

/* Выпадающие опции */
.custom-select-options {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 100;
    max-height: 250px;
    overflow-y: auto;
}

.filter-group .custom-select-options {
    top: calc(100% + 4px);
    border-radius: 8px;
    padding: 4px;
    max-height: 200px;
}

.custom-select.active .custom-select-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.custom-select-option {
    padding: 10px 14px;
    border-radius: 8px;
    color: #aaa;
    font-size: 14px;
    transition: all 0.2s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group .custom-select-option {
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    gap: 6px;
}

.custom-select-option:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
    color: #fff;
}

.custom-select-option.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-weight: 600;
}

.custom-select-option .icon-sm {
    color: #667eea;
    flex-shrink: 0;
}

.custom-select-option.active .icon-sm {
    color: #fff;
}

/* Скроллбар */
.custom-select-options::-webkit-scrollbar {
    width: 4px;
}

.custom-select-options::-webkit-scrollbar-track {
    background: transparent;
}

.custom-select-options::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
}

/* ========== SEARCH ========== */
.search-wrapper {
    position: relative;
    margin-bottom: 12px;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    width: 20px;
    height: 20px;
}

.search-input {
    width: 100%;
    padding: 14px 18px 14px 48px;
    background: rgba(44, 44, 44, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    color: white;
    font-size: 16px;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
    background: rgba(44, 44, 44, 1);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

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

/* ========== FILTERS TOGGLE ========== */
.filters-toggle {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.95) 0%, rgba(20, 20, 20, 0.95) 100%);
    padding: 12px 20px;
    border-radius: 12px;
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    user-select: none;
}

.filters-toggle:hover {
    border-color: rgba(102, 126, 234, 0.3);
    background: linear-gradient(135deg, rgba(30, 30, 30, 0.95) 0%, rgba(24, 24, 24, 0.95) 100%);
}

.filters-toggle span {
    font-size: 15px;
    font-weight: 600;
    color: #aaa;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filters-toggle .toggle-icon {
    font-size: 18px;
    transition: transform 0.3s ease;
    color: #667eea;
    display: flex;
    align-items: center;
}

/* ========== FILTERS SECTION ========== */
.filters-section {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.95) 0%, rgba(20, 20, 20, 0.95) 100%);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    animation: slideDown 0.3s ease;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.filter-group label {
    color: #888;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-group label .icon-sm {
    color: #667eea;
}

.filter-select,
.filter-input {
    padding: 10px 14px;
    background: rgba(44, 44, 44, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    color: white;
    font-size: 14px;
    transition: all 0.3s ease;
    width: 100%;
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: #667eea;
    background: rgba(44, 44, 44, 1);
}

.filter-select option {
    background: #2c2c2c;
    color: white;
}

.filters-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #aaa;
    cursor: pointer;
    font-size: 14px;
    user-select: none;
    position: relative;
}

.filter-checkbox input[type="checkbox"] {
    display: none;
}

.filter-checkbox .checkmark {
    width: 20px;
    height: 20px;
    background: rgba(44, 44, 44, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.filter-checkbox input:checked + .checkmark {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    border-color: #2ecc71;
}

.filter-checkbox input:checked + .checkmark .icon-xs {
    display: block;
    color: white;
}

.filter-checkbox .checkmark .icon-xs {
    display: none;
}

/* ========== MOVIES GRID ========== */
.movies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
}

/* ========== MOVIE CARD ========== */
.movie-card {
    background: linear-gradient(145deg, #1a1a1a, #141414);
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
}

.movie-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.2);
}

.movie-card:active {
    transform: scale(0.97);
}

.poster-container {
    width: 100%;
    padding-top: 150%;
    position: relative;
    background: #111;
    overflow: hidden;
}

.movie-poster {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.movie-card:hover .movie-poster {
    transform: scale(1.05);
}

/* ========== POSTER RATINGS OVERLAY ========== */
.poster-ratings {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 8px 10px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7) 40%, rgba(0, 0, 0, 0.85));
    pointer-events: none;
}

.poster-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    font-weight: 700;
    font-size: 16px;
    animation: ratingAppear 0.3s ease;
}

@keyframes ratingAppear {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.poster-rating-label {
    font-size: 14px;
    display: flex;
    align-items: center;
}

.poster-rating-value {
    font-size: 18px;
    font-weight: 800;
    min-width: 24px;
    text-align: center;
}

.poster-rating-count {
    font-size: 11px;
    color: #888;
    margin-left: 2px;
}

.user-rating-poster {
    color: #3498db;
}

.user-rating-poster .poster-rating-value {
    color: #3498db;
}

.admin-rating-poster .poster-rating-value {
    font-weight: 800;
}

/* ========== MOVIE INFO ========== */
.movie-info {
    padding: 14px 16px 16px;
}

.movie-title-wrapper {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 8px;
    margin-bottom: 2px;
}

.movie-title {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
    margin: 0;
}

.movie-year-inline {
    font-size: 14px;
    color: #888;
    font-weight: 400;
}

.movie-original-title {
    color: #666;
    font-size: 13px;
    font-style: italic;
    margin-top: 2px;
    display: block;
}

/* ========== EMPTY STATE ========== */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 14px;
    border: 2px dashed rgba(255, 255, 255, 0.05);
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    display: flex;
    justify-content: center;
}

.empty-state h3 {
    font-size: 24px;
    color: #fff;
    margin-bottom: 8px;
}

.empty-state p {
    color: #888;
    font-size: 16px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .header {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .header-left h1 {
        font-size: 22px;
    }
    
    .header-right {
        justify-content: space-between;
        width: 100%;
    }
    
    .sort-section {
        padding: 8px 14px;
        flex-wrap: wrap;
    }
    
    .sort-section label {
        font-size: 13px;
    }
    
    .custom-select-wrapper {
        min-width: 120px;
    }
    
    .custom-select-trigger {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .filter-group .custom-select-trigger {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .custom-select-option {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .filter-group .custom-select-option {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .filters-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .filters-bottom {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 16px;
    }
    
    .movie-title {
        font-size: 14px;
    }
    
    .movie-year-inline {
        font-size: 12px;
    }
    
    .movie-original-title {
        font-size: 12px;
    }
    
    .poster-rating {
        padding: 3px 8px;
        font-size: 14px;
    }
    
    .poster-rating-value {
        font-size: 16px;
        min-width: 20px;
    }
    
    .poster-rating-label {
        font-size: 12px;
    }
    
    .poster-rating-count {
        font-size: 10px;
    }
    
    .filters-toggle {
        padding: 10px 16px;
    }
    
    .filters-toggle span {
        font-size: 14px;
    }
    
    .admin-btn {
        font-size: 12px;
        padding: 6px 14px;
    }
    
    .user-info {
        font-size: 12px;
        padding: 4px 12px;
    }
}

@media (max-width: 480px) {
    .sort-section {
        padding: 6px 12px;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }
    
    .sort-section label {
        font-size: 12px;
    }
    
    .custom-select-wrapper {
        min-width: 100%;
    }
    
    .custom-select-trigger {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .filter-group .custom-select-trigger {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .custom-select-option {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .filter-group .custom-select-option {
        padding: 5px 8px;
        font-size: 11px;
    }
    
    .filter-group .custom-select-options {
        max-height: 150px;
    }
    
    .filters-grid {
        grid-template-columns: 1fr;
    }
    
    .movies-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .movie-info {
        padding: 10px 12px 12px;
    }
    
    .movie-title {
        font-size: 13px;
    }
    
    .movie-year-inline {
        font-size: 11px;
    }
    
    .movie-original-title {
        font-size: 11px;
    }
    
    .poster-rating {
        padding: 2px 6px;
        font-size: 12px;
        border-radius: 14px;
    }
    
    .poster-rating-value {
        font-size: 14px;
        min-width: 18px;
    }
    
    .poster-rating-label {
        font-size: 11px;
    }
    
    .poster-rating-count {
        font-size: 9px;
    }
    
    .filters-toggle {
        padding: 10px 14px;
    }
    
    .filters-toggle span {
        font-size: 13px;
    }
    
    .empty-state h3 {
        font-size: 20px;
    }
}

/* ========== ANIMATIONS ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.movie-card {
    animation: fadeInUp 0.5s ease forwards;
}

/* ========== PRINT STYLES ========== */
@media print {
    .filters-section {
        display: none;
    }
    
    .filters-toggle {
        display: none;
    }
    
    .search-wrapper {
        display: none;
    }
    
    .sort-wrapper {
        display: none;
    }
    
    .movie-card {
        break-inside: avoid;
        border: 1px solid #333;
    }
    
    .admin-btn {
        display: none !important;
    }
}

/* ========== СТИЛИ ДЛЯ СТРАНИЦЫ ДЕТАЛЕЙ ========== */
.movie-detail {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    margin-top: 24px;
}

/* КНОПКА НАЗАД НА ПОСТЕРЕ (увеличена в 1.5 раза) */
.detail-poster {
    position: relative;
    width: 100%;
}

.detail-poster .back-btn {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 66px;
    height: 66px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.detail-poster .back-btn:hover {
    background: rgba(102, 126, 234, 0.3);
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.2);
}

.detail-poster .back-btn:active {
    transform: scale(0.95);
}

.detail-poster .back-btn i {
    width: 30px;
    height: 30px;
    color: #fff;
    transition: color 0.3s ease;
}

.detail-poster .back-btn:hover i {
    color: #667eea;
}

.detail-poster img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    display: block;
}

.detail-info h1 {
    font-size: 32px;
    margin-bottom: 4px;
}

.detail-original-title {
    color: #666;
    font-size: 18px;
    margin-bottom: 16px;
    font-style: italic;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    color: #aaa;
    font-size: 14px;
    margin-bottom: 24px;
    padding: 12px 0;
    border-top: 1px solid rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.detail-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.detail-meta span i {
    flex-shrink: 0;
}

.detail-ratings {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 0;
}

.rating-section {
    background: #1a1a1a;
    padding: 20px;
    border-radius: 8px;
}

.rating-section h3 {
    margin-bottom: 16px;
    color: #667eea;
}

/* ========== НОВЫЕ СТИЛИ ДЛЯ ЗВЕЗД В ОЦЕНКЕ ПЛАТФОРМЫ ========== */

/* Полная золотая звезда */
.star-full {
    color: #f1c40f;
    font-size: 18px;
    letter-spacing: 2px;
    display: inline-block;
}

/* Пустая звезда (серая) */
.star-empty {
    color: #444;
    font-size: 18px;
    letter-spacing: 2px;
    display: inline-block;
}

/* Контейнер для половины звезды */
.star-half-container {
    position: relative;
    display: inline-block;
    font-size: 18px;
    letter-spacing: 2px;
    width: 0.85em;
    height: 1em;
    overflow: hidden;
    vertical-align: middle;
    line-height: 1;
}

/* Фоновая (серая) половина звезды */
.star-half-bg {
    position: absolute;
    left: 0;
    top: 0;
    color: #444;
    display: block;
    width: 100%;
}

/* Передняя (золотая) половина звезды - ровно 50% */
.star-half-fg {
    position: absolute;
    left: 0;
    top: 0;
    color: #f1c40f;
    display: block;
    width: 50%;
    overflow: hidden;
}

/* Блок со звездами в критериях */
.criteria-item .stars {
    display: flex;
    align-items: center;
    gap: 0px;
    justify-content: flex-end;
    flex: 1;
}

.criteria-item .stars span {
    font-size: 20px;
    line-height: 1;
}

.criteria-item .stars .star-half-container {
    font-size: 20px;
    width: 0.85em;
}

.criteria-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    gap: 12px;
}

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

.criteria-item > span {
    flex-shrink: 0;
    min-width: 120px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.criteria-item .stars {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    gap: 0px;
}

.criteria-item .score {
    font-weight: 700;
    color: #667eea;
    min-width: 30px;
    text-align: right;
    flex-shrink: 0;
}

/* ========== ЗВЁЗДНЫЙ РЕЙТИНГ ДЛЯ ОЦЕНКИ ПОЛЬЗОВАТЕЛЯ ========== */
.star-rating {
    background: rgba(44, 44, 44, 0.3);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stars-container {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 12px;
}

.star {
    font-size: 36px;
    color: #444;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    user-select: none;
    line-height: 1;
    width: 42px;
    text-align: center;
    background: none;
    border: none;
    outline: none;
}

.star:hover {
    transform: scale(1.3);
    color: #f1c40f !important;
}

.star.active {
    color: #f1c40f;
}

.star:active {
    transform: scale(0.9);
}

.rating-display {
    text-align: center;
    font-size: 18px;
    color: #aaa;
}

.rating-display #ratingDisplay {
    font-size: 32px;
    font-weight: 800;
    color: #f1c40f;
}

.rating-display .rating-max {
    color: #666;
    font-size: 18px;
}

/* ========== ФОРМА ОЦЕНКИ ПОЛЬЗОВАТЕЛЯ ========== */
.user-rating-form {
    background: #1a1a1a;
    padding: 24px;
    border-radius: 12px;
    margin-top: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(52, 152, 219, 0.2);
}

.user-rating-form h3 {
    color: #3498db;
    margin-bottom: 16px;
    font-size: 22px;
}

/* ========== ПОЛЬЗОВАТЕЛЬ УЖЕ ОЦЕНИЛ ========== */
.user-already-rated {
    background: rgba(46, 204, 113, 0.1);
    border: 1px solid rgba(46, 204, 113, 0.2);
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
    margin-bottom: 20px;
    color: #2ecc71;
    text-align: center;
}

.user-already-rated strong {
    font-size: 18px;
    display: block;
    margin-bottom: 8px;
}

.user-already-rated .your-rating {
    font-size: 56px;
    font-weight: 800;
    color: #2ecc71;
    margin: 8px 0;
}

.user-already-rated .your-rating-stars {
    font-size: 36px;
    color: #f1c40f;
    letter-spacing: 4px;
}

.user-already-rated p {
    color: #888;
    font-size: 14px;
    margin-top: 10px;
}

/* ========== КНОПКА ОЦЕНКИ ========== */
.btn-rate {
    padding: 12px 36px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-rate:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(52, 152, 219, 0.4);
}

.btn-rate:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
}

/* ========== ССЫЛКА НА ОБСУЖДЕНИЕ ========== */
.discussion-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.12) 0%, rgba(255, 165, 0, 0.12) 100%);
    border: 1px solid rgba(255, 215, 0, 0.25);
    border-radius: 12px;
    color: #f1c40f;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 300px;
    justify-content: center;
}

.discussion-link:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2) 0%, rgba(255, 165, 0, 0.2) 100%);
    border-color: rgba(255, 215, 0, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 25px rgba(255, 215, 0, 0.15);
}

.discussion-link:active {
    transform: scale(0.97);
}

/* ========== АДАПТИВ ДЛЯ СТРАНИЦЫ ДЕТАЛЕЙ ========== */
@media (max-width: 768px) {
    .movie-detail {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .detail-ratings {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .detail-info h1 {
        font-size: 26px;
    }
    
    .detail-original-title {
        font-size: 16px;
    }
    
    .detail-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .detail-poster .back-btn {
        top: 12px;
        left: 12px;
        width: 56px;
        height: 56px;
    }
    
    .detail-poster .back-btn i {
        width: 26px;
        height: 26px;
    }
    
    .criteria-item .stars span {
        font-size: 18px;
    }
    
    .criteria-item .stars .star-half-container {
        font-size: 18px;
        width: 0.85em;
    }
    
    .criteria-item > span {
        min-width: 100px;
        font-size: 14px;
    }
    
    .star {
        font-size: 30px;
        width: 36px;
    }
    
    .stars-container {
        gap: 6px;
    }
    
    .user-rating-form {
        padding: 16px;
    }
    
    .user-already-rated .your-rating {
        font-size: 44px;
    }
    
    .user-already-rated .your-rating-stars {
        font-size: 28px;
    }
    
    .discussion-link {
        padding: 10px 20px;
        font-size: 14px;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .detail-poster .back-btn {
        top: 10px;
        left: 10px;
        width: 48px;
        height: 48px;
    }
    
    .detail-poster .back-btn i {
        width: 22px;
        height: 22px;
    }
    
    .criteria-item .stars span {
        font-size: 16px;
    }
    
    .criteria-item .stars .star-half-container {
        font-size: 16px;
        width: 0.85em;
    }
    
    .criteria-item > span {
        min-width: 80px;
        font-size: 13px;
    }
    
    .criteria-item {
        gap: 6px;
    }
    
    .star {
        font-size: 24px;
        width: 30px;
    }
    
    .stars-container {
        gap: 4px;
    }
    
    .rating-display #ratingDisplay {
        font-size: 26px;
    }
    
    .user-already-rated .your-rating {
        font-size: 36px;
    }
    
    .user-already-rated .your-rating-stars {
        font-size: 22px;
        letter-spacing: 2px;
    }
    
    .user-rating-form h3 {
        font-size: 18px;
    }
    
    .btn-rate {
        padding: 10px 24px;
        font-size: 14px;
    }
    
    .discussion-link {
        padding: 8px 16px;
        font-size: 13px;
        gap: 8px;
    }
}

/* ========== ДОПОЛНИТЕЛЬНЫЕ СТИЛИ ДЛЯ ЗВЕЗД В ОЦЕНКЕ ЗРИТЕЛЕЙ ========== */
.user-detail .stars-container {
    display: flex;
    align-items: center;
    gap: 0px;
    justify-content: center;
}

.user-detail .stars-container span {
    font-size: 28px;
    line-height: 1;
}

@media (max-width: 768px) {
    .user-detail .stars-container span {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .user-detail .stars-container span {
        font-size: 20px;
    }
}

/* ========== ИКОНКИ LUCIDE ========== */
.icon-xs {
    width: 14px;
    height: 14px;
    display: inline-block;
    vertical-align: middle;
}

.icon-sm {
    width: 18px;
    height: 18px;
    display: inline-block;
    vertical-align: middle;
}

.icon-md {
    width: 24px;
    height: 24px;
    display: inline-block;
    vertical-align: middle;
}

.icon-lg {
    width: 32px;
    height: 32px;
    display: inline-block;
    vertical-align: middle;
}

/* ========== УБРАТЬ ВЫДЕЛЕНИЕ ПРИ КЛИКЕ ========== */

/* Для всех элементов */
* {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

/* Для кликабельных элементов */
a, button, .clickable, .movie-card, .custom-select, .filter-chip, .star {
    -webkit-tap-highlight-color: transparent;
    outline: none;
    user-select: none;
    -webkit-user-select: none;
}

/* Для инпутов и селектов (чтобы не убирать полностью выделение текста) */
input, select, textarea {
    -webkit-tap-highlight-color: transparent;
}

/* Для Firefox */
a:focus, button:focus, .clickable:focus {
    outline: none;
}

/* Для мобильных устройств (убирает синее выделение при тапе) */
.movie-card {
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
}

/* Убираем выделение у кастомных селектов */
.custom-select-trigger {
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

/* Для звезд */
.star {
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

/* ========== КНОПКА BOOSTY ========== */
.boosty-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    border: none;
    border-radius: 12px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 300px;
    justify-content: center;
}

.boosty-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 25px rgba(249, 115, 22, 0.4);
}

.boosty-link:active {
    transform: scale(0.97);
}

.boosty-link i {
    flex-shrink: 0;
}

/* Адаптив */
@media (max-width: 768px) {
    .boosty-link {
        padding: 10px 20px;
        font-size: 14px;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .boosty-link {
        padding: 8px 16px;
        font-size: 13px;
        gap: 8px;
    }
}