/* Fan Film Empire - Main Styles */

.ffe-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    background: #0a0a0a;
    color: #ffffff;
}

.ffe-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.ffe-main-title {
    font-size: 2.5em;
    margin: 0;
    color: #FFE81F;
    text-shadow: 0 0 10px rgba(255, 232, 31, 0.5);
    font-family: 'Arial Black', sans-serif;
    letter-spacing: 2px;
}

.ffe-sort-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ffe-sort-controls label {
    color: #cccccc;
    font-size: 0.95em;
}

#ffe-sort-select {
    padding: 8px 15px;
    background: #1a1a1a;
    border: 1px solid #333;
    color: #ffffff;
    border-radius: 5px;
    font-size: 0.95em;
    cursor: pointer;
    transition: all 0.3s ease;
}

#ffe-sort-select:hover {
    border-color: #FFE81F;
    background: #222;
}

/* Grid Layout */
.ffe-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-top: 20px;
}

/* Film Card */
.ffe-film-card {
    background: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    position: relative;
}

.ffe-film-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 232, 31, 0.3);
}

.ffe-thumbnail {
    width: 100%;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    background-size: cover;
    background-position: center;
    position: relative;
    background-color: #0a0a0a;
}

.ffe-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ffe-film-card:hover .ffe-play-overlay {
    opacity: 1;
}

.ffe-play-icon {
    width: 60px;
    height: 60px;
    color: #FFE81F;
    filter: drop-shadow(0 0 10px rgba(255, 232, 31, 0.7));
}

.ffe-card-content {
    padding: 15px;
}

.ffe-film-title {
    font-size: 1.1em;
    margin: 0 0 10px 0;
    color: #ffffff;
    line-height: 1.3;
    height: 2.6em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Rating Display */
.ffe-stats-row {
    margin-bottom: 10px;
}

.ffe-rating-display {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ffe-stars {
    display: inline-flex;
    gap: 2px;
}

.ffe-star {
    color: #444;
    font-size: 1.2em;
    transition: color 0.2s ease;
}

.ffe-star.filled {
    color: #FFE81F;
    text-shadow: 0 0 5px rgba(255, 232, 31, 0.5);
}

.ffe-rating-number {
    font-size: 1.1em;
    font-weight: bold;
    color: #FFE81F;
}

.ffe-vote-count {
    font-size: 0.85em;
    color: #999;
}

/* YouTube Stats */
.ffe-youtube-stats {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    font-size: 0.85em;
    color: #aaa;
}

.ffe-stat {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Rating Input */
.ffe-rating-input {
    border-top: 1px solid #333;
    padding-top: 12px;
    margin-top: 12px;
}

.ffe-rate-label {
    font-size: 0.9em;
    color: #ccc;
    margin: 0 0 8px 0;
}

.ffe-star-rating {
    display: flex;
    gap: 5px;
    justify-content: center;
}

.ffe-star-input {
    font-size: 1.5em;
    color: #444;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ffe-star-input:hover,
.ffe-star-input.hover {
    color: #FFE81F;
    text-shadow: 0 0 10px rgba(255, 232, 31, 0.7);
    transform: scale(1.2);
}

.ffe-already-voted .ffe-voted-message {
    text-align: center;
    color: #4CAF50;
    font-size: 0.9em;
    margin: 0;
}

/* Modal Styles */
.ffe-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    overflow-y: auto;
}

.ffe-modal.active {
    display: block;
}

.ffe-modal-content {
    background-color: #1a1a1a;
    margin: 5% auto;
    padding: 0;
    border: 1px solid #333;
    width: 80%;
    max-width: 900px;
    border-radius: 10px;
    position: relative;
}

.ffe-modal-close {
    color: #aaa;
    position: absolute;
    right: 20px;
    top: 10px;
    font-size: 35px;
    font-weight: bold;
    z-index: 10;
    cursor: pointer;
    transition: color 0.3s;
}

.ffe-modal-close:hover {
    color: #FFE81F;
}

.ffe-video-wrapper {
    width: 100%;
    padding-top: 56.25%;
    position: relative;
    background: #000;
    border-radius: 10px 10px 0 0;
    overflow: hidden;
}

#ffe-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#ffe-video-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.ffe-modal-info {
    padding: 30px;
}

#ffe-modal-title {
    color: #FFE81F;
    font-size: 1.8em;
    margin: 0 0 15px 0;
    text-shadow: 0 0 10px rgba(255, 232, 31, 0.3);
}

.ffe-description {
    color: #ccc;
    line-height: 1.6;
    margin-bottom: 20px;
    white-space: pre-wrap;
    max-height: 200px;
    overflow-y: auto;
    padding: 15px;
    background: #0a0a0a;
    border-radius: 5px;
    border: 1px solid #333;
}

.ffe-modal-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.ffe-button {
    padding: 12px 25px;
    background: #FFE81F;
    color: #000;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
}

.ffe-button:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 232, 31, 0.4);
}

/* Comments Section */
.ffe-comments-section {
    border-top: 2px solid #333;
    padding-top: 30px;
    margin-top: 30px;
}

.ffe-comments-section h3 {
    color: #FFE81F;
    font-size: 1.5em;
    margin-bottom: 20px;
}

#ffe-comments-container {
    background: #0a0a0a;
    padding: 20px;
    border-radius: 5px;
    border: 1px solid #333;
}

.ffe-no-films {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 1.2em;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .ffe-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (max-width: 900px) {
    .ffe-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .ffe-main-title {
        font-size: 2em;
    }
    
    .ffe-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 600px) {
    .ffe-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .ffe-container {
        padding: 15px;
    }
    
    .ffe-main-title {
        font-size: 1.6em;
    }
    
    .ffe-modal-content {
        width: 95%;
        margin: 5% auto;
    }
    
    .ffe-modal-info {
        padding: 20px;
    }
    
    #ffe-modal-title {
        font-size: 1.4em;
    }
    
    .ffe-modal-actions {
        flex-direction: column;
    }
    
    .ffe-button {
        width: 100%;
        text-align: center;
    }
}

/* Scrollbar Styling */
.ffe-description::-webkit-scrollbar,
#ffe-comments-container::-webkit-scrollbar {
    width: 8px;
}

.ffe-description::-webkit-scrollbar-track,
#ffe-comments-container::-webkit-scrollbar-track {
    background: #0a0a0a;
}

.ffe-description::-webkit-scrollbar-thumb,
#ffe-comments-container::-webkit-scrollbar-thumb {
    background: #FFE81F;
    border-radius: 4px;
}

.ffe-description::-webkit-scrollbar-thumb:hover,
#ffe-comments-container::-webkit-scrollbar-thumb:hover {
    background: #fff;
}

/* Loading Animation */
.ffe-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 232, 31, 0.3);
    border-radius: 50%;
    border-top-color: #FFE81F;
    animation: ffe-spin 1s linear infinite;
}

@keyframes ffe-spin {
    to { transform: rotate(360deg); }
}

/* Fullscreen Video Mode */
.ffe-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10000;
    background: #000;
}

.ffe-fullscreen .ffe-video-wrapper {
    padding-top: 0;
    height: 100vh;
}

/* Hide the action buttons */
.ffe-modal-actions {
    display: none;
}

/* Fullscreen close button */
.ffe-fullscreen-close {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10001;
    background: rgba(0, 0, 0, 0.8);
    color: #FFE81F;
    border: 2px solid #FFE81F;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 30px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.ffe-fullscreen-close:hover {
    background: #FFE81F;
    color: #000;
    transform: scale(1.1);
}

.ffe-fullscreen .ffe-fullscreen-close {
    display: flex;
}