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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

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

h1 {
    color: #4cc9f0;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

nav {
    display: flex;
    gap: 20px;
}

nav a {
    color: #fff;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 5px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

nav a:hover, nav a.active {
    background: #4cc9f0;
    color: #16213e;
}

/* Search and Filter */
.search-bar {
    display: flex;
    gap: 10px;
    margin: 2rem 0;
}

#searchInput {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #4cc9f0;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
    outline: none;
}

#searchInput::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

#searchBtn {
    padding: 12px 25px;
    background: #4cc9f0;
    border: none;
    border-radius: 25px;
    color: #16213e;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

#searchBtn:hover {
    background: #3aa8d8;
    transform: scale(1.05);
}

.filter-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 20px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn.active, .filter-btn:hover {
    background: #4cc9f0;
    color: #16213e;
}

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 3rem;
}

.video-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.video-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-color: #4cc9f0;
}

.video-thumbnail {
    position: relative;
    width: 100%;
    height: 160px;
    overflow: hidden;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-card:hover .video-thumbnail img {
    transform: scale(1.1);
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.play-icon {
    width: 50px;
    height: 50px;
    background: #4cc9f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #16213e;
}

.video-info {
    padding: 15px;
}

.video-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.video-meta {
    display: flex;
    justify-content: space-between;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    font-size: 1.2rem;
    color: #4cc9f0;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 1000px;
    margin: 2% auto;
    background: #1a1a2e;
    border-radius: 15px;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    color: white;
    cursor: pointer;
    z-index: 1001;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: #4cc9f0;
}

#modalVideo {
    width: 100%;
    max-height: 70vh;
    background: #000;
}

.video-info {
    padding: 20px;
}

.video-info h2 {
    color: #4cc9f0;
    margin-bottom: 10px;
}

.video-meta {
    display: flex;
    gap: 20px;
    margin: 15px 0;
    color: rgba(255, 255, 255, 0.7);
}

.favorite-btn {
    padding: 10px 20px;
    background: #ff4757;
    border: none;
    border-radius: 5px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.favorite-btn:hover {
    background: #ff3742;
}

/* Upload Page */
.upload-container {
    max-width: 800px;
    margin: 2rem auto;
}

.upload-area {
    border: 3px dashed #4cc9f0;
    border-radius: 15px;
    padding: 3rem;
    text-align: center;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.upload-area.drag-over {
    background: rgba(76, 201, 240, 0.1);
    border-color: #3aa8d8;
}

.upload-area i {
    font-size: 4rem;
    color: #4cc9f0;
    margin-bottom: 1rem;
}

.upload-area h3 {
    margin-bottom: 1rem;
    color: #fff;
}

.browse-btn {
    display: inline-block;
    padding: 12px 30px;
    background: #4cc9f0;
    color: #16213e;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    margin: 1rem 0;
    transition: all 0.3s ease;
}

.browse-btn:hover {
    background: #3aa8d8;
    transform: scale(1.05);
}

.file-types {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* Upload Progress */
.upload-progress {
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
}

.progress-bar {
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4cc9f0, #3aa8d8);
    width: 0%;
    transition: width 0.3s ease;
}

/* Form Styles */
.upload-form {
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 15px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #4cc9f0;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #4cc9f0;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.upload-btn {
    width: 100%;
    padding: 15px;
    background: #4cc9f0;
    border: none;
    border-radius: 8px;
    color: #16213e;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.upload-btn:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    cursor: not-allowed;
}

.upload-btn:not(:disabled):hover {
    background: #3aa8d8;
    transform: translateY(-2px);
}

#uploadStatus {
    margin-top: 1rem;
    text-align: center;
    padding: 10px;
    border-radius: 5px;
}

#uploadStatus.success {
    background: rgba(46, 213, 115, 0.2);
    color: #2ed573;
}

#uploadStatus.error {
    background: rgba(255, 71, 87, 0.2);
    color: #ff4757;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 0;
    background: rgba(0, 0, 0, 0.8);
    margin-top: 3rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Responsive */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .upload-area {
        padding: 2rem 1rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 5% auto;
    }
}

/* File List */
.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 10px;
}

.file-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.file-size {
    color: rgba(255, 255, 255, 0.7);
    margin-left: 10px;
}

.remove-file {
    color: #ff4757;
    cursor: pointer;
    margin-left: 10px;
}