/* User System Styles */

/* Common Styles */
.login-page-wrapper,
.register-page-wrapper,
.dashboard-wrapper {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.login-container,
.register-container {
    max-width: 450px;
    margin: 0 auto;
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.login-container h1,
.register-container h1,
.dashboard-wrapper h1,
.dashboard-wrapper h2 {
    margin-bottom: 20px;
    color: #333;
}

/* Forms */
.user-form .form-group,
.video-form .form-group {
    margin-bottom: 20px;
}

.user-form label,
.video-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.user-form input[type="text"],
.user-form input[type="email"],
.user-form input[type="password"],
.user-form input[type="url"],
.video-form input[type="text"],
.video-form input[type="url"],
.video-form input[type="file"],
.video-form textarea,
.video-form select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.user-form input:focus,
.video-form input:focus,
.video-form textarea:focus,
.video-form select:focus {
    outline: none;
    border-color: #0073aa;
}

.video-form textarea {
    resize: vertical;
    font-family: inherit;
}

.checkbox-group label,
.radio-group label {
    font-weight: normal;
    display: flex;
    align-items: center;
    gap: 8px;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-group input[type="radio"] {
    width: auto;
}

.categories-checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    max-height: 250px;
    overflow-y: auto;
}

.checkbox-item {
    display: flex !important;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: normal !important;
}

.checkbox-item:hover {
    background: #f0f7ff;
    border-color: #0073aa;
}

.checkbox-item input[type="checkbox"] {
    width: auto !important;
    margin: 0 !important;
    cursor: pointer;
}

.checkbox-item span {
    flex: 1;
    user-select: none;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-primary {
    background: #0073aa;
    color: #fff;
    width: 100%;
}

.btn-primary:hover {
    background: #005a87;
}

.btn-secondary {
    background: #666;
    color: #fff;
}

.btn-secondary:hover {
    background: #555;
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-danger {
    background: #dc3232;
    color: #fff;
}

.btn-danger:hover {
    background: #c92c2c;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Messages */
.message {
    margin: 15px 0;
    padding: 12px;
    border-radius: 4px;
}

.message p {
    margin: 0;
}

.message .success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message .error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message .info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Form Footer */
.form-footer {
    text-align: center;
    margin-top: 20px;
    color: #666;
}

.form-footer a {
    color: #0073aa;
    text-decoration: none;
    font-weight: 600;
}

.form-footer a:hover {
    text-decoration: underline;
}

/* Dashboard */
.dashboard-container {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
    margin-bottom: 40px;
}

.upload-section,
.videos-section {
    margin-bottom: 40px;
}

.upload-section {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
}

/* Videos Grid */
.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.video-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s;
}

.video-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: #000;
    overflow: hidden;
}

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

.video-thumbnail .no-thumb {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    color: #999;
    font-size: 14px;
}

.video-info {
    padding: 15px;
}

.video-info h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #333;
}

.video-model {
    color: #e91e63;
    font-size: 13px;
    margin: 5px 0;
    font-weight: 600;
}

.video-categories {
    color: #9c27b0;
    font-size: 13px;
    margin: 5px 0;
    font-weight: 600;
}

.video-tags {
    color: #0073aa;
    font-size: 13px;
    margin: 5px 0;
}

.video-date {
    color: #999;
    font-size: 14px;
    margin: 5px 0;
}

.video-stats {
    color: #666;
    font-size: 13px;
    margin: 5px 0;
    font-weight: 600;
}

.video-actions {
    display: flex;
    gap: 10px;
}

.video-actions .btn {
    flex: 1;
    text-align: center;
}

.no-videos,
.loading {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 16px;
}

/* File Input Styling */
input[type="file"] {
    padding: 8px !important;
}

small {
    display: block;
    color: #999;
    font-size: 12px;
    margin-top: 5px;
}

/* Responsive */
@media (max-width: 768px) {
    .login-container,
    .register-container {
        padding: 30px 20px;
    }
    
    .dashboard-container {
        padding: 20px;
    }
    
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .videos-grid {
        grid-template-columns: 1fr;
    }
    
    .upload-section {
        padding: 20px;
    }
}