/* General Body & Theme */
:root {
    --primary-color: #e50914; /* Netflix Red */
    --background-color: #141414; /* Dark Background */
    --surface-color: #222;    /* Slightly lighter for cards */
    --text-color: #f5f5f5;
    --text-muted: #aaa;
    --container-width: 1200px;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    margin: 0;
    line-height: 1.6;
}

/* --- Layout & Header --- */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.main-header {
    background-color: rgba(20, 20, 20, 0.8);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

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



.logo {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    letter-spacing: -1px;
}

.main-header nav a {
    color: var(--text-color);
    text-decoration: none;
    margin-left: 20px;
    font-size: 1rem;
    transition: color 0.3s;
}

.main-header nav a:hover {
    color: var(--primary-color);
}

/* --- Search Bar Section --- */
.search-section {
    padding: 20px 0;
}

.search-form {
    display: flex;
    gap: 10px;
}

.search-input {
    flex-grow: 1;
    padding: 12px 15px;
    font-size: 1rem;
    background-color: #333;
    border: 1px solid #444;
    border-radius: 25px;
    color: var(--text-color);
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.3);
}

.search-button {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background-color: var(--primary-color);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

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

.search-button svg {
    width: 24px;
    height: 24px;
    fill: #fff;
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-muted);
    padding: 40px 0;
}

/* --- Category Filter (index.php) --- */
.category-filter {
    padding: 30px 0;
}

.category-filter nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-btn {
    background-color: var(--surface-color);
    color: var(--text-muted);
    padding: 8px 18px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: bold;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.category-btn:hover {
    color: var(--text-color);
    background-color: #333;
}

.category-btn.active {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}


.video-details .category-tag {
    background-color: var(--primary-color);
    display: inline-block;
    padding: 5px 15px;
    border-radius: 5px;
    font-weight: bold;
    margin-bottom: 20px;
}

.video-details h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #fff;
}

/* --- Video Card Redesign --- */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding-bottom: 40px;
}

.video-card a {
    text-decoration: none;
    color: var(--text-color);
}

.video-card a {
    text-decoration: none;
}

.thumbnail-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    border-radius: 12px;
    overflow: hidden;
    background-color: var(--surface-color);
    margin-bottom: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.thumbnail-container {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.7);
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-card:hover .thumbnail-overlay {
    opacity: 1;
}

.play-icon {
    width: 60px;
    height: 60px;
    background-color: rgba(229, 9, 20, 0.8);
    border-radius: 50%;
    position: relative;
    backdrop-filter: blur(5px);
}

.play-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 55%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 12px 0 12px 20px;
    border-color: transparent transparent transparent #ffffff;
}

.video-info {
    padding: 0 5px;
}

.video-title {
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.video-meta {
    display: flex;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
    align-items: center;
}

.meta-separator svg {
    width: 6px;
    height: 6px;
    fill: var(--text-muted);
    display: block;
}

/* --- Forms (Login & Upload) --- */
body.login-page, body.upload-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #121212;
}

body.login-page main,
body.upload-page main {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
}

.form-container {
    background-color: var(--surface-color);
    padding: 40px;
    border-radius: 8px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.form-container.modern-form {
    border-top: 4px solid var(--primary-color);
}

.form-container h2 {
    text-align: center;
    margin-bottom: 25px;
    font-size: 1.8rem;
    color: #fff;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    background-color: #333;
    border: 1px solid #444;
    border-radius: 5px;
    color: var(--text-color);
    font-size: 1rem;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #666;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn {
    width: 100%;
    padding: 15px;
    background-color: var(--primary-color);
    border: none;
    border-radius: 5px;
    color: #fff;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #f6121d;
}

/* --- Custom File Input (upload.php) --- */
.file-upload-wrapper {
    position: relative;
}

.file-upload-wrapper input[type="file"] {
    display: none;
}

.file-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    border: 2px dashed #444;
    border-radius: 8px;
    background-color: #1a1a1a;
    cursor: pointer;
    transition: background-color 0.3s, border-color 0.3s;
    text-align: center;
}

.file-upload-label:hover {
    border-color: var(--primary-color);
    background-color: #222;
}

.file-upload-label.dragging {
    border-color: var(--primary-color);
    border-style: solid;
    background-color: #252525;
    box-shadow: 0 0 15px rgba(229, 9, 20, 0.5);
}

.upload-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.upload-text {
    color: var(--text-muted);
    font-size: 1rem;
}

.upload-text strong {
    color: var(--text-color);
}

.file-name {
    margin-top: 15px;
    text-align: center;
    color: #ccc;
    font-style: italic;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- Messages (Success/Error) --- */
.error-msg {
    background-color: #440c0c;
    color: #f5c6cb;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #f5c6cb;
    text-align: center;
    margin-bottom: 15px;
}
.success-msg {
    background-color: #0c440c;
    color: #c6f5c6;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #c6f5c6;
    text-align: center;
    margin-bottom: 15px;
}

/* Styling for the SVG Upload Icon */
.upload-icon svg {
    width: 40px;  /* Adjust size as needed */
    height: 40px; /* Adjust size as needed */
    fill: var(--text-muted); /* Sets the icon color */
    transition: fill 0.3s;
}

.file-upload-label:hover .upload-icon svg {
    fill: var(--primary-color); /* Changes color on hover */
}

/* --- Upload Progress Bar --- */
.progress-bar-container {
    display: none; /* Hidden by default */
    width: 100%;
    background-color: #333;
    border-radius: 5px;
    margin-bottom: 20px;
    position: relative;
    height: 30px;
    text-align: center;
    overflow: hidden;
}

.progress-bar {
    width: 0%; /* Starts at 0 */
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 5px;
    transition: width 0.4s ease;
}

.progress-bar-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
    width: 100%;
}

/* --- Watch Page --- */
body.watch-page {
    background-color: #121212;
}

/* --- Custom Video Player --- */
.video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
}

.video-player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain; /* Fits video within container, adding black bars if needed */
}

.custom-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.video-container:hover .custom-controls,
.custom-controls.visible {
    opacity: 1;
}

.progress-container {
    height: 5px;
    background-color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    margin-bottom: 10px;
    border-radius: 2.5px;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background-color: var(--primary-color);
    border-radius: 2.5px;
}

.controls-main {
    display: flex;
    align-items: center;
    gap: 15px;
}

.control-button {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-button svg {
    width: 24px;
    height: 24px;
    fill: #fff;
    transition: transform 0.2s;
}

.control-button:hover svg {
    transform: scale(1.1);
}

.control-button .hidden {
    display: none;
}

.volume-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

#volumeSlider {
    -webkit-appearance: none;
    appearance: none;
    width: 80px;
    height: 5px;
    background: rgba(255, 255, 255, 0.4);
    outline: none;
    border-radius: 2.5px;
    cursor: pointer;
}

#volumeSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 15px;
    height: 15px;
    background: #fff;
    border-radius: 50%;
}

#volumeSlider::-moz-range-thumb {
    width: 15px;
    height: 15px;
    background: #fff;
    border-radius: 50%;
}

.time-display {
    color: #fff;
    font-size: 0.9rem;
}

.spacer {
    flex-grow: 1;
}

/* --- Definitive Fullscreen Mode Styling --- */
.video-container:-webkit-full-screen,
.video-container:-moz-full-screen,
.video-container:fullscreen {
    padding-top: 0 !important;
    border-radius: 0;
    width: 100%;
    height: 100%;
}

.video-container:fullscreen .video-player {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.video-container:fullscreen .custom-controls {
    z-index: 2147483647;
    opacity: 1;
}

/* --- Video Action Buttons --- */
.video-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
    margin-top: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--surface-color);
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: var(--surface-color);
    color: var(--text-color);
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.action-btn:hover {
    background-color: #333;
    transform: translateY(-2px);
}

.action-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Specific style for the delete button */
.delete-btn {
    background-color: #5d1a1f; /* Dark red */
    color: #f5c6cb;
}

.delete-btn:hover {
    background-color: var(--primary-color); /* Bright red on hover */
    color: #fff;
}
/* --- Style for the "Copied!" checkmark icon --- */
.copy-success-icon {
    width: 18px;
    height: 18px;
    fill: #4CAF50; /* A pleasant green color */
    vertical-align: middle; /* Aligns the icon nicely with the text */
    margin-left: 5px;
}

.share-modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex; /* Using flex to center the content */
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.share-modal.visible {
    opacity: 1;
    pointer-events: auto;
}

.share-modal-content {
    background: var(--surface-color);
    padding: 30px 40px;
    border-radius: 12px;
    position: relative;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    text-align: center;
}

.close-modal-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 2rem;
    line-height: 1;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.3s, transform 0.2s;
}
.close-modal-btn:hover {
    color: #fff;
    transform: scale(1.1);
}

.share-modal-content h2 {
    margin-top: 0;
    margin-bottom: 25px;
    color: #fff;
}

.share-links {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.share-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    transition: transform 0.2s;
}
.share-link:hover {
    transform: translateY(-2px);
}
.share-link svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Platform specific colors */
.share-link.facebook { background-color: #1877F2; color: #fff; }
.share-link.twitter { background-color: #000; color: #fff; }
.share-link.whatsapp { background-color: #25D366; color: #fff; }

.share-link.copy-link {
    background-color: #444;
    color: #fff;
    border: none;
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
}

.share-link.copy-link:hover {
    background-color: #555;
}

.share-link.copy-link:disabled {
    cursor: default;
    opacity: 0.7;
}

.comments-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--surface-color);
}

.comments-section h3 {
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.comment-form {
    margin-bottom: 40px;
}

.comment-form .form-group {
    margin-bottom: 15px;
}

.comment-form input[type="text"],
.comment-form textarea {
    width: 100%;
    padding: 12px;
    background-color: #333;
    border: 1px solid #444;
    border-radius: 8px;
    color: var(--text-color);
    font-size: 1rem;
    box-sizing: border-box; /* Ensures padding doesn't affect width */
}

.comment-form input[type="text"]:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.3);
}

.comment-form textarea {
    resize: vertical;
}

.submit-comment-btn {
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.submit-comment-btn:hover {
    background-color: #f6121d;
}

.comments-list .comment {
    display: grid;
    grid-template-areas:
        "author date"
        "text   text";
    grid-template-columns: 1fr auto;
    gap: 5px 15px;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #333;
}

.comments-list .comment:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.comment-author {
    grid-area: author;
    font-weight: bold;
    color: #fff;
}

.comment-date {
    grid-area: date;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: right;
}

.comment-text {
    grid-area: text;
    margin: 0;
    line-height: 1.5;
    white-space: pre-wrap; /* Preserves line breaks from textarea */
    word-wrap: break-word; /* Prevents long words from overflowing */
}

/* --- Logo Image Styling --- */
.logo img {
    display: block; 
    height: 60px;   /* <-- INCREASE THIS VALUE */
    width: auto;    
}


/* --- Quality Settings Menu --- */
.settings-container {
    position: relative;
}

.settings-menu {
    display: none; /* Hidden by default */
    position: absolute;
    bottom: 120%; /* Position above the button */
    right: 0;
    background-color: rgba(40, 40, 40, 0.9);
    border-radius: 4px;
    padding: 5px 0;
    min-width: 80px;
    text-align: center;
    backdrop-filter: blur(5px);
}

.settings-menu.visible {
    display: block;
}

.settings-menu-item {
    padding: 8px 15px;
    font-size: 0.9rem;
    color: #fff;
    cursor: pointer;
}

.settings-menu-item:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.settings-menu-item.active {
    background-color: var(--primary-color);
    font-weight: bold;
}


