:root {
  --primary-color: #ff9800;
  --background-color: #f4f4f4;
  --text-color: #333;
  --button-bg: #333;
  --button-hover-bg: #444;
  --button-text: #fff;
  --link-color: var(--primary-color);
  --link-hover-color: #e68a00;
  --text-muted: #555;
}

/* Base styling */
body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
}

a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.3s ease;
}
a:hover {
    color: var(--link-hover-color);
    text-decoration: none;
}

.main-container {
    width: 85%;
    margin: 20px auto;
    background-color: white;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.film-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

/* Poster style */
.film-poster {
    max-width: 300px;
    height: 400px;
    margin-right: 20px;
    margin-top: 20px;
    border-radius: 10px;
    object-fit: cover;
}

.film-details {
    flex: 1;
}

.film-meta p {
    margin: 5px 0;
}

/* Trailer Styling */
.film-trailer {
    width: 40%;
    margin-left: 20px;
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: flex-end;
}

.film-trailer h3 {
    text-align: center;
    font-size: 18px;
    margin-bottom: 10px;
}

.film-trailer iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

/* Movie Embed Styling - Enhanced Video Player Container */
.movie-video {
    margin-top: 30px;
    text-align: center;
    width: 100%;
}

.movie-video h3 {
    font-size: 24px;
    margin-bottom: 20px;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    width: 100%;
    background-color: #000;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 10px;
}

/* Button and Quality Label Styling */
.link-buttons {
    text-align: center;
    margin: 20px 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.server-button {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    margin: 5px;
}

.source-label {
    font-size: 0.8rem;
    color: #333;
    margin-bottom: 4px;
}

.server-button button {
    padding: 12px 24px;
    font-size: 16px;
    background-color: var(--button-bg);
    color: var(--button-text);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.server-button button:hover {
    background-color: var(--button-hover-bg);
    transform: scale(1.05);
}

.quality-label {
    margin-top: 4px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Typography and Spacing Improvements */
.film-description,
.movie-video,
.link-buttons,
.recommendations {
    margin: 20px 0;
}

/* Recommendations Section - Matching Home Page Design */
.recommendations {
    margin-top: 40px;
}

.recommendations h3 {
    font-size: 22px;
    margin-bottom: 20px;
    text-align: center;
    color: #333;
}

.movie-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

/* Movie card styling (universal) */
.movie-card {
    position: relative;
    width: 200px;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.movie-card:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.hover-info {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 10px;
    box-sizing: border-box;
    border-radius: 10px;
}

.movie-card:hover .hover-info {
    opacity: 1;
}

.movie-card img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px 10px 0 0;
}

.movie-title {
    font-family: 'Roboto', sans-serif;
    font-size: 18px;
    font-weight: bold;
    color: #333;
    text-align: center;
    margin-top: 10px;
    margin-bottom: 0;
    text-decoration: none;
}

.movie-title:hover {
    color: var(--primary-color);
}

.top-left, .top-right {
    position: absolute;
    font-size: 12px;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 5px 10px;
    border-radius: 5px;
    white-space: nowrap;
}

.top-left {
    top: 5px;
    left: 5px;
}

.top-right {
    top: 5px;
    right: 5px;
    background-color: rgba(255, 255, 255, 0.5);
    color: black;
}

.imdb-rating {
    background-color: #f5c518;
    color: black;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: bold;
    position: absolute;
    top: 30px;
    left: 5px;
}

.genre {
    font-size: 14px;
    color: #f0e68c;
    font-weight: bold;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 5px 10px;
    border-radius: 5px;
    position: absolute;
    bottom: 25px;
    left: 5px;
}

.year {
    font-size: 14px;
    color: #f0e68c;
    font-weight: bold;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 5px 10px;
    border-radius: 5px;
    position: absolute;
    bottom: 5px;
    right: 5px;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    padding: 20px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.play-button:hover {
    background-color: rgba(255, 255, 255, 1);
}
