/* Glassmorphism Cards */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1rem;
    transition: all 0.3s ease;
}

.dark .glass-card {
    background: rgba(30, 41, 59, 0.7);
    border-color: rgba(255, 255, 255, 0.05);
}

.glass-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.dark .glass-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Channel Cards */
.channel-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
    display: block;
}

.dark .channel-card {
    background: #1e293b;
    border-color: #334155;
}

.channel-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(59, 130, 246, 0.15);
    border-color: #3b82f6;
}

/* Video Cards */
.video-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
    display: block;
}

.dark .video-card {
    background: #1e293b;
    border-color: #334155;
}

.video-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
    border-color: #3b82f6;
}

/* Nav Links */
.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    transition: all 0.2s ease;
}

.nav-link:hover {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.nav-link.active {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.dark .nav-link {
    color: #94a3b8;
}

.dark .nav-link:hover,
.dark .nav-link.active {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Line Clamp */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease forwards;
}

/* Loading Spinner */
.spinner {
    border: 3px solid rgba(59, 130, 246, 0.1);
    border-top-color: #3b82f6;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Notification Dropdown */
.notification-item {
    transition: all 0.2s ease;
}

.notification-item:hover {
    background: rgba(59, 130, 246, 0.05);
}

/* Form Elements */
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
select,
textarea {
    transition: all 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Table Styles */
table {
    border-collapse: collapse;
}

/* Mobile Optimizations */
@media (max-width: 640px) {
    .glass-card {
        border-radius: 0.75rem;
    }
    
    .channel-card,
    .video-card {
        border-radius: 0.75rem;
    }
}

/* YouTube Player Responsive */
#player {
    width: 100%;
    height: 100%;
    min-height: 300px;
}

@media (min-width: 768px) {
    #player {
        min-height: 400px;
    }
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #e5e7eb 25%, #f3f4f6 50%, #e5e7eb 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.dark .skeleton {
    background: linear-gradient(90deg, #334155 25%, #475569 50%, #334155 75%);
    background-size: 200% 100%;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Smooth Transitions */
* {
    scroll-behavior: smooth;
}

/* Focus Styles */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Floating Video Player */
#floatingPlayerContainer {
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
#floatingPlayerContainer.active {
    animation: floatIn 0.3s ease-out;
}
#floatingPlayerContainer.minimized {
    width: 200px !important;
    height: 120px !important;
}
#floatingPlayerContainer.minimized .float-header {
    display: none;
}
#floatingPlayerContainer.minimized .float-minimized {
    display: flex !important;
}
@keyframes floatIn {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
#floatYoutubePlayer {
    width: 100%;
    height: 100%;
    pointer-events: auto;
}
#floatYoutubePlayer iframe {
    width: 100% !important;
    height: 100% !important;
}
.float-header {
    user-select: none;
    -webkit-user-select: none;
}

/* Progress Bar */
#progressBar {
    transition: width 0.1s linear;
}
#playerControls {
    transition: opacity 0.3s ease;
}

/* Theater Mode */
#playerContainer.theater-mode {
    position: fixed;
    inset: 0;
    z-index: 50;
    border-radius: 0;
}
#playerContainer.theater-mode + * {
    margin-top: 56.25vh;
}

/* Search Suggestions Dropdown */
#suggestionsDropdown {
    max-height: 400px;
    overflow-y: auto;
}
#suggestionsDropdown a:last-child {
    border-bottom: none;
}

/* Video Card Grid for Infinite Scroll */
#videosGrid {
    position: relative;
}
#loadMoreSpinner {
    transition: all 0.3s ease;
}

/* Language Switcher */
.lang-switch {
    transition: all 0.2s ease;
}
.lang-switch.active {
    color: #3b82f6;
    font-weight: 600;
}
