* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #0f1419 0%, #1a2b2a 50%, #0f1419 100%);
    background-attachment: fixed;
    color: #e8f0e8;
    line-height: 1.6;
    font-weight: 400;
    min-height: 100vh;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(34, 139, 34, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(0, 100, 0, 0.08) 0%, transparent 50%),
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 2px,
            rgba(34, 197, 94, 0.02) 2px,
            rgba(34, 197, 94, 0.02) 4px
        );
    pointer-events: none;
    z-index: -1;
    animation: subtleMove 20s ease-in-out infinite;
}

@keyframes subtleMove {
    0%, 100% { transform: translateX(0px) translateY(0px); }
    25% { transform: translateX(2px) translateY(-1px); }
    50% { transform: translateX(-1px) translateY(2px); }
    75% { transform: translateX(1px) translateY(1px); }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(15, 20, 25, 0.5);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #16a34a, #22c55e);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #15803d, #16a34a);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: #e8f0e8;
    font-weight: 600;
    letter-spacing: -0.3px;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
}

h2 {
    font-size: 2rem;
    color: #a7f3d0;
    margin-bottom: 1.5rem;
}

h3 {
    font-size: 1.5rem;
}

/* Links */
a {
    color: #22c55e;
    transition: all 0.3s ease;
}

a:hover {
    color: #4ade80;
}

/* Navigation */
.navbar {
    background: linear-gradient(135deg, #1a2d29 0%, #0f1f1c 100%);
    color: #e8f0e8;
    padding: 1rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border-bottom: 2px solid #2d5a2d;
    backdrop-filter: blur(10px);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 50%, #16a34a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(34, 197, 94, 0.3);
    letter-spacing: -0.5px;
    position: relative;
    transition: all 0.3s ease;
}

.nav-brand:hover {
    text-shadow: 0 0 40px rgba(34, 197, 94, 0.5);
    transform: scale(1.05);
}

.nav-brand a {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 50%, #16a34a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 15px;
    align-items: center;
}

.nav-user {
    margin-right: 20px;
    color: #a7f3d0;
    font-weight: 500;
    font-size: 0.95rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn:active {
    transform: translateY(1px);
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.3);
}

.btn-small {
    padding: 10px 18px;
    font-size: 13px;
    border-radius: 6px;
}

.btn-primary {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: white;
    border: 1px solid #22c55e;
    box-shadow: 0 4px 15px rgba(22, 163, 74, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #15803d 0%, #166534 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(22, 163, 74, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
    color: #e5e7eb;
    border: 1px solid #4b5563;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    border: 1px solid #ef4444;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4);
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #a7f3d0;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="file"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #2d5a2d;
    border-radius: 8px;
    background: rgba(15, 20, 25, 0.8);
    color: #e8f0e8;
    font-size: 15px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
    background: rgba(15, 20, 25, 0.95);
}

.form-group input::placeholder {
    color: #6b7280;
}

.form-group small {
    display: block;
    margin-top: 6px;
    color: #9ca3af;
    font-size: 0.85rem;
}

.form-group input[type="file"] {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #2d5a2d;
    border-radius: 8px;
    background: rgba(15, 20, 25, 0.8);
    color: #e8f0e8;
    cursor: pointer;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

.form-inline {
    display: flex;
    gap: 10px;
}

.form-inline input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

/* Auth Box */
.auth-box {
    max-width: 450px;
    margin: 80px auto;
    padding: 40px;
    background: linear-gradient(145deg, rgba(15, 20, 25, 0.95) 0%, rgba(26, 43, 42, 0.98) 100%);
    border-radius: 20px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 8px 16px rgba(34, 197, 94, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(45, 90, 45, 0.3);
    backdrop-filter: blur(15px);
}

.auth-box h1 {
    margin-bottom: 30px;
    text-align: center;
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 50%, #16a34a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.auth-link {
    text-align: center;
    margin-top: 25px;
    color: #9ca3af;
}

.auth-link a {
    color: #22c55e;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.auth-link a:hover {
    color: #4ade80;
    text-shadow: 0 0 10px rgba(34, 197, 94, 0.3);
}

/* Alerts */
.alert {
    padding: 16px 20px;
    margin-bottom: 20px;
    border-radius: 12px;
    font-weight: 500;
    border: 1px solid;
    backdrop-filter: blur(10px);
}

.alert-error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.1) 100%);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.3);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.1);
}

.alert-success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(22, 163, 74, 0.1) 100%);
    color: #86efac;
    border-color: rgba(34, 197, 94, 0.3);
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.1);
}

.alert-info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(37, 99, 235, 0.1) 100%);
    color: #93c5fd;
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-top: 25px;
}

.video-card {
    background: linear-gradient(145deg, rgba(15, 20, 25, 0.9) 0%, rgba(26, 43, 42, 0.95) 100%);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 2px 8px rgba(34, 197, 94, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(45, 90, 45, 0.3);
    backdrop-filter: blur(10px);
    position: relative;
}

.video-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #16a34a, #22c55e, #4ade80);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 8px 16px rgba(34, 197, 94, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.video-card:hover::before {
    opacity: 1;
}

.video-card-header {
    padding: 20px;
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.2) 0%, rgba(15, 118, 110, 0.2) 100%);
    border-bottom: 1px solid rgba(45, 90, 45, 0.3);
}

.video-card-header h3 {
    font-size: 1.2rem;
    margin: 0;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.video-card-header a {
    color: #a7f3d0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.video-card-header a:hover {
    color: #6ee7b7;
    text-shadow: 0 0 10px rgba(110, 231, 183, 0.3);
}

.video-card-body {
    padding: 20px;
}

.video-meta {
    font-size: 0.9rem;
    color: #9ca3af;
    margin-bottom: 12px;
    font-weight: 500;
}

.video-card-footer {
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(45, 90, 45, 0.2);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 6px 12px;
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: white;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    border: 1px solid rgba(34, 197, 94, 0.3);
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.2);
}

.badge-public {
    background: linear-gradient(135deg, #0f766e 0%, #0d9488 100%);
    border: 1px solid rgba(20, 184, 166, 0.3);
    box-shadow: 0 2px 8px rgba(15, 118, 110, 0.2);
}

/* Rating Display */
.rating-display {
    font-size: 1.1rem;
    color: #fbbf24;
    margin: 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rating-text {
    font-size: 0.9rem;
    color: #d1d5db;
    font-weight: 500;
}

.rating-text {
    font-size: 14px;
    color: #666;
    margin-left: 10px;
}

/* Video Page */
.video-page {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.video-title {
    margin-bottom: 20px;
    color: #2c3e50;
}

.video-info {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.video-player {
    margin-bottom: 30px;
}

.video-player video {
    max-width: 100%;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Rating Section */
.rating-section {
    margin: 30px 0;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 5px;
}

.rating-section h3 {
    margin-bottom: 15px;
}

.rating-form {
    margin-top: 20px;
}

.rating-form h4 {
    margin-bottom: 10px;
}

.rating-info {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.star-rating {
    display: flex;
    gap: 5px;
    margin: 15px 0;
}

.star-rating label {
    cursor: pointer;
}

.star-rating input[type="radio"] {
    display: none;
}

.star-rating .star {
    font-size: 30px;
    color: #ddd;
    transition: color 0.2s;
}

.star-rating input[type="radio"]:checked ~ .star,
.star-rating input[type="radio"]:checked + .star {
    color: #ffc107;
}

.star-rating label:hover .star {
    color: #ffc107;
}

.video-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

/* Upload Form */
.upload-form {
    max-width: 600px;
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Old styles removed - using new dark theme */

.assign-form {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .video-grid,
    .groups-list {
        grid-template-columns: 1fr;
    }
}

/* Video card footer improvements */
.video-card-footer {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.video-card-footer .btn {
    flex: 1;
    min-width: 80px;
}

.video-card-footer .btn:first-child {
    flex: 2;
}

/* Form improvements */
.form-container {
    max-width: 650px;
    margin: 0 auto;
    background: linear-gradient(145deg, rgba(15, 20, 25, 0.95) 0%, rgba(26, 43, 42, 0.98) 100%);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 8px 16px rgba(34, 197, 94, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(45, 90, 45, 0.3);
    backdrop-filter: blur(15px);
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.form-actions .btn {
    flex: 1;
}

/* Groups styling */
.groups-section {
    margin-bottom: 40px;
    background: none;
    padding: 0;
}

.groups-section h3 {
    color: #a7f3d0;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.groups-list {
    display: grid;
    gap: 20px;
    margin-top: 20px;
}

.group-card {
    background: linear-gradient(145deg, rgba(15, 20, 25, 0.9) 0%, rgba(26, 43, 42, 0.95) 100%);
    border-radius: 16px;
    padding: 25px;
    border: 1px solid rgba(45, 90, 45, 0.3);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 2px 8px rgba(34, 197, 94, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.group-card:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.4),
        0 4px 12px rgba(34, 197, 94, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.group-header h4 {
    color: #a7f3d0;
    margin-bottom: 10px;
    font-size: 1.3rem;
    font-weight: 600;
}

.group-description {
    color: #d1d5db;
    margin-bottom: 15px;
    font-style: italic;
}

.group-meta {
    color: #9ca3af;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.group-members {
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid rgba(45, 90, 45, 0.2);
}

.group-members strong {
    color: #22c55e;
    display: block;
    margin-bottom: 10px;
}

.no-members {
    color: #9ca3af;
    font-style: italic;
}

.members-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.members-list li {
    background: rgba(34, 197, 94, 0.1);
    color: #a7f3d0;
    padding: 8px 12px;
    margin-bottom: 5px;
    border-radius: 6px;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.assign-form {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(45, 90, 45, 0.3);
}

.form-inline {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.form-inline input {
    flex: 1;
}

/* Upload form specific styles */
.upload-form {
    background: linear-gradient(145deg, rgba(15, 20, 25, 0.95) 0%, rgba(26, 43, 42, 0.98) 100%);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 8px 16px rgba(34, 197, 94, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(45, 90, 45, 0.3);
    backdrop-filter: blur(15px);
    margin-top: 20px;
}

/* Groups styles */
.groups-section {
    margin-bottom: 40px;
}

.groups-list {
    display: grid;
    gap: 25px;
    margin-top: 25px;
}

.group-card {
    background: linear-gradient(145deg, rgba(15, 20, 25, 0.9) 0%, rgba(26, 43, 42, 0.95) 100%);
    border-radius: 16px;
    padding: 25px;
    border: 1px solid rgba(45, 90, 45, 0.3);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 2px 8px rgba(34, 197, 94, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.group-card:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.4),
        0 4px 12px rgba(34, 197, 94, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.group-header h4 {
    color: #a7f3d0;
    margin-bottom: 10px;
    font-size: 1.3rem;
    font-weight: 600;
}

.group-description {
    color: #d1d5db;
    margin-bottom: 15px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.group-meta {
    color: #9ca3af;
    font-size: 0.85rem;
    margin-bottom: 20px;
    font-weight: 500;
}

.group-members {
    margin: 20px 0;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    border: 1px solid rgba(45, 90, 45, 0.2);
}

.group-members strong {
    color: #a7f3d0;
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
}

.no-members {
    color: #6b7280;
    font-style: italic;
}

.members-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.members-list li {
    color: #d1d5db;
    padding: 5px 0;
    border-bottom: 1px solid rgba(45, 90, 45, 0.2);
    font-weight: 500;
}

.members-list li:last-child {
    border-bottom: none;
}

.assign-form {
    margin-top: 20px;
}

.form-inline {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.form-inline input[type="text"] {
    flex: 1;
    margin-bottom: 0;
}

/* Upload form specific styles */
.upload-form {
    margin-top: 0;
}

.upload-form .form-group:last-of-type {
    margin-bottom: 25px;
}
