
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Tahoma, Arial, sans-serif;
    background-color: #1a1a1a;
    color: #cccccc;
    line-height: 1.4;
    font-size: 14px;

    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

img {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

a {
    color: #4da6ff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.container {
    max-width: 1000px; 
    width: 100%;
    margin: 0 auto;
    padding: 0 15px;
}


.top-bar {
    background-color: #111111;
    border-bottom: 2px solid #cc0000;
    padding: 15px 0;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: #cc0000;
    text-shadow: 1px 1px 0px #000;
}

.search-box {
    display: flex;
}

.search-box input {
    width: 250px;
    padding: 6px;
    background-color: #333;
    border: 1px solid #555;
    color: #fff;
    border-radius: 0;
}

.search-box button {
    padding: 6px 15px;
    background-color: #444;
    border: 1px solid #555;
    border-left: none;
    color: #fff;
    cursor: pointer;
    border-radius: 0;
}

.search-box button:hover {
    background-color: #555;
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #2b2b2b;
    border: 1px solid #444;
    border-top: none;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    max-height: 300px;
    overflow-y: auto;
}

.suggestion-item {
    padding: 10px;
    border-bottom: 1px solid #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.suggestion-item:hover {
    background: #333;
}

.suggestion-title {
    color: #3498db;
    font-size: 14px;
}

.suggestion-meta {
    color: #888;
    font-size: 12px;
}

.side-ad {
    position: fixed; 
    top: 80px;
    width: 240px; 
    z-index: 50;     
}

.side-ad img {
    width: 100%;
    height: auto;
    border-radius: 8px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.5); 
}

.left-ad {
    left: 20px; 
}

.right-ad {
    right: 20px; 
}

.block {
    background-color: #2b2b2b;
    border: 1px solid #444;
    margin-bottom: 15px;
}

.block-title {
    background-color: #333333;
    padding: 10px;
    font-weight: bold;
    color: #ffffff;
    border-bottom: 1px solid #444;
    font-size: 16px;
}

.movie-card {
    background-color: #2b2b2b;
    border: 1px solid #444;
    padding: 15px;
    margin-bottom: 15px;
}

.movie-card h1 {
    font-size: 20px;
    color: #ffffff;
    margin: 0;
    padding: 0;
    border: none;
}

.film-title-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    
    border-bottom: 1px solid #444;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.movie-info-wrap {
    display: flex;
    margin-bottom: 15px;
}

.movie-poster {
    width: 250px;
    margin-right: 20px;
}

.movie-poster img {
    width: 100%;
    height: auto;
    border: 1px solid #555;
    display: block;
}

.details-list {
    list-style: none;
}

.details-list li {
    margin-bottom: 8px;
    color: #b3b3b3;
}

.details-list strong {
    color: #e0e0e0;
}

.movie-description {
    margin-top: 20px;
}

.movie-description p {
    padding: 15px;
    background-color: #222;
    border: 1px solid #444;
    margin-top: -1px;
}

.player-section {
    background-color: #2b2b2b;
    border: 1px solid #444;
    margin-bottom: 15px;
}

.player-window {
    position: relative;
    height: 550px;
    background-color: #000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid #444;
}

.player-interface-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.7); 
    padding: 10px 15px;
    box-sizing: border-box;
    z-index: 10; 

    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.player-controls-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    width: 100%;
    justify-content: flex-start !important;
    align-items: center;
}

.play-btn {
    font-size: 50px;
    color: #cc0000;
    cursor: pointer;
    margin-bottom: 10px;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
}

.play-btn:hover {
    color: #ff3333;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
}

.player-text {
    color: #666;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
}

.glow-red { color: #ff3333 !important; text-shadow: 0 0 5px #ff0000; }
.glow-blue { color: #3498db !important; text-shadow: 0 0 5px #2980b9; }
.glow-gold { color: #f1c40f !important; text-shadow: 0 0 5px #f39c12; }
.glow-green { color: #2ecc71 !important; text-shadow: 0 0 5px #27ae60; }
.glow-purple { color: #9b59b6 !important; text-shadow: 0 0 5px #8e44ad; }

.banned-user { color: #777 !important; text-decoration: line-through; text-shadow: none !important; }

seasons-box, .episodes-box {
    padding: 5px 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    background-color: transparent !important;
    border-bottom: none !important;
}

.seasons-title, .episodes-title {
    font-weight: bold;
    color: #fff;
    margin-right: 15px;
    width: 60px;
    font-size: 13px;
}

.player-controls-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    width: 100%;
    justify-content: center; 
    align-items: center;
}

.select-wrapper {
    display: flex;
    align-items: center;
    margin: 0 !important;
}

.select-label {
    color: #ccc;
    font-size: 13px;
    font-weight: bold;
    margin-right: 8px;
}

.player-select {
    background-color: rgba(30, 30, 30, 0.9);
    color: #fff;
    border: 1px solid #555;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
}

.player-select:hover {
    border-color: #888;
}

.player-select option {
    background-color: #222;
    color: #fff;
}

.comments-section {
    background-color: #2b2b2b;
    border: 1px solid #444;
    margin-bottom: 30px;
}

.comment-form {
    padding: 15px;
    background-color: #222;
    border-bottom: 1px solid #444;
}

.comment-form textarea {
    width: 100%;
    height: 80px;
    background-color: #333;
    border: 1px solid #555;
    color: #fff;
    padding: 10px;
    resize: vertical;
    border-radius: 0;
}

.comment-form button {
    margin-top: 10px;
    padding: 8px 20px;
    background-color: #444;
    border: 1px solid #555;
    color: #fff;
    cursor: pointer;
    border-radius: 0;
}

.comment-form button:hover {
    background-color: #555;
}

.comment-item {
    padding: 15px;
    border-bottom: 1px solid #333;
}

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

.comment-header {
    margin-bottom: 5px;
}

.comment-header strong {
    color: #cc0000;
}

.comment-header span {
    color: #777;
    font-size: 12px;
    margin-left: 10px;
}

.comment-text {
    color: #ccc;
}

.footer {
    background-color: #111111;
    border-top: 1px solid #333;
    padding: 20px 0;
    text-align: center;
    color: #777;
    font-size: 12px;
    margin-top: auto;
}

.footer p {
    margin-bottom: 5px;
}

.auth-box {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
}

.auth-box button {
    padding: 6px 15px;
    background-color: #cc0000;
    border: none;
    color: #fff;
    cursor: pointer;
    font-weight: bold;
}

.auth-box button:hover {
    background-color: #ff3333;
}

.user-profile-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.user-profile-btn img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #555;
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
}

.modal {
    display: none;
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: #2b2b2b;
    border: 1px solid #444;
    width: 300px;
    z-index: 1001;
    padding: 20px;
}

.modal-header {
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
}

.close-modal {
    cursor: pointer;
    color: #cc0000;
}

.modal-input {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    background: #111;
    border: 1px solid #444;
    color: #fff;
}

.modal-btn {
    width: 100%;
    padding: 8px;
    background: #cc0000;
    border: none;
    color: #fff;
    cursor: pointer;
    font-weight: bold;
}

.modal-btn:hover {
    background: #ff3333;
}

.movie-rating-box {
    padding: 15px;
    background-color: #222;
    border: 1px solid #444;
    border-top: none;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.rating-info {
    margin-bottom: 5px;
    color: #ccc;
}

.rating-info strong {
    color: #ffd700;
    font-size: 18px;
}

.stars-container {
    display: flex;
    gap: 5px;
}

.star {
    font-size: 24px;
    cursor: pointer;
    --fill: 0%;
    background: linear-gradient(90deg, #ffd700 var(--fill), #555 var(--fill));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.star.hovered {
    --fill: 100% !important;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
    border: 1px solid #555;
}

.comment-wrapper {
    display: flex;
}

.comment-content {
    flex-grow: 1;
}

.admin-glow {
    color: #ff3333 !important;
    text-shadow: 0 0 5px #ff0000;
}

.banned-user {
    color: #000 !important;
    text-decoration: line-through;
    text-shadow: none;
}

.comment-actions {
    margin-top: 10px;
    display: flex;
    gap: 15px;
    font-size: 12px;
}

.action-btn {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

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

.replies-box {
    margin-top: 15px;
    margin-left: 55px;
    padding-left: 15px;
    border-left: 2px solid #444;
}

.reply-item {
    margin-bottom: 10px;
}

.reply-item:last-child {
    margin-bottom: 0;
}

.clickable-user {
    cursor: pointer;
    transition: opacity 0.2s;
}
.clickable-user:hover {
    opacity: 0.8;
}

.deleted-comment {
    color: #666;
    font-style: italic;
    background: rgba(255, 255, 255, 0.05);
    padding: 5px 10px;
    border-radius: 4px;
    display: inline-block;
}

.title-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    color: #fff;
}

.title-blue { background-color: #3498db; }
.title-gold { background-color: #f1c40f; color: #000; }
.title-green { background-color: #2ecc71; color: #000; }
.title-purple { background-color: #9b59b6; }
.title-red { background-color: #e74c3c; }

.comment-header strong, .comment-author {
    color: #ccc;
}
.comment-author {
    font-weight: bold;
}
.icon-svg {
    vertical-align: middle;
    margin-right: 4px;
    margin-bottom: 2px;
}

.films-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.film-card {
    background: #2b2b2b;
    border: 1px solid #444;
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
}

.film-card:hover {
    transform: translateY(-5px);
    border-color: #cc0000;
}

.film-card img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    border-bottom: 1px solid #444;
}

.film-card-info {
    padding: 10px;
}

.film-card-title {
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.film-card-meta {
    font-size: 12px;
    color: #888;
}

.admin-tabs .modal-btn {
    background: #333;
    border: 1px solid #555;
    color: #ccc;
}
.admin-tabs .modal-btn.active {
    background: #cc0000;
    color: #fff;
    border-color: #cc0000;
}

@media (max-width: 768px) {
    .top-bar .container {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 15px !important;
    }

    .top-bar .container > div:first-child {
        flex-direction: column !important;
        width: 100%;
        gap: 10px !important;
    }

    .search-box {
        flex-direction: column !important;
        width: 100%;
        gap: 10px !important;
    }

    #catalog-search, #category-filter {
        width: 100% !important;
        box-sizing: border-box;
        margin: 0 !important;
    }

    .auth-box {
        flex-wrap: wrap !important;
        justify-content: center !important;
        width: 100%;
        gap: 10px;
    }

    .movie-info-wrap {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .movie-poster {
        margin-right: 0;
        margin-bottom: 20px;
    }

    .films-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
    }

    .player-window {
        height: 250px;
    }

    .modal {
        width: 90%;
    }
}

@media (max-width: 1550px) {
    .side-ad {
        display: none !important;
    }
}

#pp-favorites-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

#pp-favorites-grid .film-card-title {
    font-size: 14px; 
}

#pp-favorites-grid .film-card-meta {
    font-size: 11px; 
}

.film-poster-wrapper {
    position: relative;
    width: 100%;
}

.film-badge-type {
    position: absolute;
    top: 8px;
    left: 8px;
    color: #fff;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: bold;
    border-radius: 4px;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0,0,0,0.6);
    z-index: 2;
}

.film-badge-rating {
    position: absolute;
    top: 8px;
    right: 8px;
    background-color: rgba(0, 0, 0, 0.8);
    border: 1px solid #444;
    color: #fff;
    padding: 3px 6px;
    font-size: 12px;
    font-weight: bold;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 2;
}

.film-badge-rating span {
    color: #f1c40f; 
    font-size: 14px;
}