/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: radial-gradient(ellipse at top left, 
        #e8f5e9 0%, 
        #f3e5f5 25%, 
        #e3f2fd 50%, 
        #fce4ec 75%, 
        #e8f5e9 100%
    );
    background-size: 200% 200%;
    animation: pastelSpin 30s linear infinite;
    min-height: 100vh;
}

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

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #c4302b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Header Styles */
header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #333;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-right: auto;
}

nav {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.nav-link {
    color: rgba(0, 0, 0, 0.7);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 500;
    border: 2px solid transparent;
    white-space: nowrap;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.nav-link.active {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: rgba(100, 100, 100, 0.6);
    color: #333;
    font-weight: 600;
}

/* User Status */
.user-status {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(0, 0, 0, 0.7);
    font-size: 14px;
    font-weight: 500;
}

.user-status a {
    color: #4CAF50;
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 4px;
    background: rgba(76, 175, 80, 0.1);
    transition: all 0.3s ease;
}

.user-status a:hover {
    background: rgba(76, 175, 80, 0.2);
    transform: translateY(-1px);
}

.user-status.logged-in #login-status {
    color: #4CAF50;
    font-weight: 600;
}

.user-status.logged-in #login-link {
    color: #f44336;
    background: rgba(244, 67, 54, 0.1);
}

.user-status.logged-in #login-link:hover {
    background: rgba(244, 67, 54, 0.2);
}

/* Language Toggle */
.lang-toggle {
    margin-left: auto;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(100, 100, 100, 0.5);
    border-radius: 20px;
    color: #333;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lang-toggle:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

/* Subscribe Button */
.subscribe-button {
    margin-top: 1rem;
    padding: 0.75rem 2rem;
    background: rgba(120, 120, 120, 0.7);
    color: #333;
    border: 1px solid rgba(150, 150, 150, 0.5);
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.subscribe-button:hover {
    background: rgba(100, 100, 100, 0.8);
    transform: translateY(-2px);
}

.subscribe-button.subscribed {
    background-color: transparent;
    color: #666;
    border: 2px solid #999;
}

.subscribe-button.subscribed:hover {
    background-color: rgba(150, 150, 150, 0.1);
}

/* Channel action buttons */
.subscribe-btn, .unsubscribe-btn {
    background: linear-gradient(135deg, #ff4757, #ff6b7a);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: bold;
    transition: all 0.3s ease;
    margin-left: 8px;
}

.subscribe-btn:hover, .unsubscribe-btn:hover {
    background: linear-gradient(135deg, #ff3742, #ff5722);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 71, 87, 0.3);
}

.unsubscribe-btn {
    background: linear-gradient(135deg, #6c757d, #8a8a8a);
}

.unsubscribe-btn:hover {
    background: linear-gradient(135deg, #5a6268, #6c757d);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.search-container {
    display: flex;
    gap: 0.5rem;
    min-width: 300px;
}

.search-container input {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    outline: none;
    transition: box-shadow 0.3s ease;
}

.search-container input:focus {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.search-container button {
    padding: 0.75rem 1rem;
    background-color: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-container button:hover {
    background-color: #388e3c;
    transform: translateY(-1px);
}

/* Main Content */
main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Views */
.view {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.view.active {
    display: block;
}

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

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

.view-header h2 {
    font-size: 2rem;
    color: #333;
}

.search-stats, .item-count {
    color: #666;
    font-size: 0.9rem;
}

/* Search Sections Layout */
.search-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
    align-items: start;
}

.search-section {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #eee;
}

.section-header h2 {
    font-size: 1.5rem;
    color: #333;
    margin: 0;
}

.section-search {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.section-search input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.section-search input:focus {
    border-color: #81c784;
}

.section-search button {
    padding: 0.75rem 1rem;
    background-color: #a5d6a7;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.section-search button:hover {
    background-color: rgba(150, 150, 150, 0.6);
}

/* Channel Grid */
.channel-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    flex: 1;
}

.channel-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.channel-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.channel-card-header {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    gap: 1rem;
}

.channel-card img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.channel-card-info {
    flex: 1;
}

.channel-card-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #333;
    line-height: 1.4;
}

.channel-card-info p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Channel Detail */
.channel-info {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.channel-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.channel-thumbnail {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
}

.channel-meta h3 {
    color: #666;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.channel-stats {
    display: flex;
    gap: 1.5rem;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.channel-meta p {
    color: #666;
    line-height: 1.6;
    max-height: 100px;
    overflow-y: auto;
}

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
    flex: 1;
}

.video-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.video-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

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

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

.video-card-info {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.video-card-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-card-info p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.video-card-actions {
    padding: 0 1rem 1rem;
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.video-card-actions button {
    background-color: rgba(150, 150, 150, 0.6);
    color: #333;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.video-card-actions button:hover {
    background-color: #66bb6a;
    color: white;
    transform: translateY(-1px);
}

/* Video Player */
.video-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.back-button {
    background: none;
    border: 2px solid #c8a8e9;
    color: #666;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.back-button:hover {
    background-color: #a5d6a7;
    color: white;
}

.video-player-container {
    width: 100%;
    background-color: #000;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.video-player-container iframe,
.video-player-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 12px;
    display: block;
}

.video-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    text-align: center;
}

.video-info {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.video-meta {
    margin-bottom: 1rem;
}

.video-meta h3 {
    color: #666;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.video-stats {
    display: flex;
    gap: 1rem;
    color: #666;
    font-size: 0.9rem;
}

.video-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.action-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background-color: #66bb6a;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.action-button:hover {
    background-color: #666;
    transform: translateY(-1px);
}

.button-icon {
    font-size: 1.2rem;
}

/* Video not available */
.video-not-available {
    text-align: center;
}

.video-not-available .video-placeholder {
    padding: 3rem;
}

.primary-button {
    background-color: #ff6b6b !important;
    font-size: 1.1rem;
    padding: 1rem 2rem;
}

.primary-button:hover {
    background-color: #e55656 !important;
}

/* Downloads View */
.downloads-sections {
    display: grid;
    gap: 2rem;
}

.downloads-section {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.downloads-section h3 {
    margin-bottom: 1rem;
    color: #333;
}

.downloads-stats {
    background: rgba(255, 107, 107, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    color: #666;
}

.contributor-panel {
    background: rgba(76, 175, 80, 0.1);
    padding: 1.5rem;
    border-radius: 12px;
    margin-top: 2rem;
    border: 2px solid #4CAF50;
}

.panel-content h3 {
    color: #4CAF50;
    margin-bottom: 1rem;
}

.download-queue {
    display: grid;
    gap: 1rem;
}

.download-request-card {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.download-request-card img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.download-request-info {
    flex: 1;
}

.download-request-actions {
    display: flex;
    gap: 0.5rem;
}

.download-button {
    background-color: #4CAF50 !important;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.delete-button {
    background-color: #ff6b6b !important;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.video-description {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.video-description h4 {
    margin-bottom: 1rem;
    color: #333;
}

#video-description-content {
    color: #666;
    line-height: 1.8;
    white-space: pre-wrap;
    max-height: 300px;
    overflow-y: auto;
}

/* Empty States */
.empty-message {
    text-align: center;
    padding: 3rem 1rem;
    color: #666;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.empty-message h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.empty-message p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.browse-button {
    background-color: #a5d6a7;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.browse-button:hover {
    background-color: rgba(150, 150, 150, 0.6);
    transform: translateY(-1px);
}

.welcome-message {
    text-align: center;
    padding: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.welcome-message h3 {
    color: #666;
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.welcome-message p {
    color: #666;
    font-size: 1.1rem;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-left: 4px solid #28a745;
    animation: slideIn 0.3s ease-out;
    min-width: 300px;
}

.toast.error {
    border-left-color: #666;
}

.toast.warning {
    border-left-color: #ffc107;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1000;
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: modalSlide 0.3s ease-out;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    color: #333;
    font-size: 1.3rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    color: #666;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
}

.button {
    background-color: #a5d6a7;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.button:hover {
    background-color: rgba(150, 150, 150, 0.6);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    nav {
        justify-content: center;
        gap: 0.25rem;
    }
    
    .nav-link {
        padding: 0.4rem 0.6rem;
        font-size: 0.9em;
    }
    
    .search-container {
        min-width: auto;
    }
    
    .search-sections {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .video-grid {
        grid-template-columns: 1fr;
    }
    
    .channel-grid {
        grid-template-columns: 1fr;
    }
    
    .video-actions {
        flex-direction: column;
    }
    
    .action-button {
        justify-content: center;
    }
    
    .video-stats {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .view-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .toast-container {
        left: 10px;
        right: 10px;
    }
    
    .toast {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    main {
        padding: 0 0.5rem;
    }
    
    .header-content {
        padding: 0 0.5rem;
    }
    
    .video-card-info {
        padding: 0.75rem;
    }
    
    .video-info {
        padding: 1rem;
    }
    
    .video-description {
        padding: 1rem;
    }
    
    .empty-message {
        padding: 2rem 1rem;
    }
    
    .welcome-message {
        padding: 2rem 1rem;
    }
}

/* Password Protection Screen */
.password-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.password-screen.hidden {
    display: none;
}

.password-container {
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    text-align: center;
    max-width: 400px;
    width: 90%;
}

.password-logo {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.password-container h2 {
    color: #333;
    margin-bottom: 2rem;
    font-size: 1.5rem;
}

.password-container input {
    width: 100%;
    padding: 1rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.password-container input:focus {
    border-color: #81c784;
}

.password-container button {
    width: 100%;
    padding: 1rem;
    background-color: #a5d6a7;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.password-container button:hover {
    background-color: rgba(150, 150, 150, 0.6);
}

.password-error {
    color: #666;
    margin-top: 1rem;
    font-size: 0.9rem;
    min-height: 20px;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus indicators */
button:focus,
input:focus,
.nav-link:focus {
    outline: 2px solid #c8a8e9;
    outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .video-card {
        border: 2px solid #333;
    }
    
    .nav-link {
        border: 1px solid rgba(255, 255, 255, 0.5);
    }
}

/* New Download Flow Styles */
.video-not-available {
    margin: 1rem 0;
}

.video-not-available .video-placeholder {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.video-not-available h3 {
    color: #666;
    margin-bottom: 0.5rem;
}

.video-not-available p {
    color: #888;
    margin-bottom: 1.5rem;
}

#request-download {
    background: linear-gradient(135deg, #81c784 0%, #a5d6a7 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

#request-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(129, 199, 132, 0.4);
}

#request-download:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.downloads-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.downloads-section h3 {
    color: #666;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.downloads-stats {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    color: #666;
}

.download-request-card,
.download-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: 1rem;
    align-items: center;
}

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

.download-request-card img,
.download-card img {
    width: 120px;
    height: 68px;
    object-fit: cover;
    border-radius: 8px;
}

.request-info,
.download-info {
    flex: 1;
}

.request-info h3,
.download-info h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.request-info p,
.download-info p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.request-date,
.download-meta {
    font-size: 0.8rem;
    color: #999;
}

.request-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
    min-width: 80px;
}

.request-status.pending {
    background: #fff3cd;
    color: #856404;
}

.request-status.completed {
    background: #d4edda;
    color: #155724;
}

.download-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.download-actions button {
    padding: 0.4rem 0.8rem;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
}

.play-button {
    background: linear-gradient(135deg, #81c784 0%, #a5d6a7 100%);
    color: white;
}

.play-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(129, 199, 132, 0.4);
}

.delete-button {
    background: linear-gradient(135deg, #e57373 0%, #ef9a9a 100%);
    color: white;
}

.delete-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(229, 115, 115, 0.4);
}

.contributor-panel {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 2rem;
    margin-top: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.contributor-panel h3 {
    color: #333;
    margin-bottom: 0.5rem;
}

.contributor-panel p {
    color: #666;
    margin-bottom: 1.5rem;
}

.download-queue {
    display: grid;
    gap: 1rem;
}

.queue-card {
    background: rgba(248, 249, 250, 0.9);
    border-radius: 8px;
    padding: 1rem;
    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: 1rem;
    align-items: center;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.queue-card img {
    width: 120px;
    height: 68px;
    object-fit: cover;
    border-radius: 6px;
}

.queue-info h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.queue-info p {
    font-size: 0.9rem;
    color: #666;
}

.queue-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.queue-actions button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.download-button {
    background: linear-gradient(135deg, #42a5f5 0%, #90caf9 100%);
    color: white;
}

.download-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(66, 165, 245, 0.4);
}

.download-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.claim-button {
    background: linear-gradient(135deg, #ff9800 0%, #ffb74d 100%);
    color: white;
}

.claim-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.4);
}

/* Responsive design for downloads */
@media (max-width: 768px) {
    .downloads-sections {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .download-request-card,
    .download-card,
    .queue-card {
        grid-template-columns: 80px 1fr;
        gap: 0.75rem;
    }
    
    .download-request-card img,
    .download-card img,
    .queue-card img {
        width: 80px;
        height: 45px;
    }
    
    .download-actions {
        grid-column: span 2;
        flex-direction: row;
        justify-content: flex-end;
        margin-top: 0.5rem;
    }
    
    .queue-actions {
        grid-column: span 2;
        flex-direction: row;
        justify-content: flex-end;
        margin-top: 0.5rem;
    }
}

/* Modal styles for authentication */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: modalFadeIn 0.3s ease;
}

.modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 24px;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Authentication UI styles */
.auth-instructions {
    color: #333;
}

.auth-instructions h3 {
    margin-top: 0;
    color: #0066cc;
}

.auth-instructions ol {
    padding-left: 20px;
    line-height: 1.6;
}

.auth-buttons {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.auth-buttons .primary-button,
.auth-buttons .secondary-button {
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.auth-buttons .primary-button {
    background: #0066cc;
    color: white;
}

.auth-buttons .primary-button:hover {
    background: #0052a3;
    transform: translateY(-1px);
}

.auth-buttons .secondary-button {
    background: rgba(108, 117, 125, 0.8);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.auth-buttons .secondary-button:hover {
    background: rgba(108, 117, 125, 1);
    transform: translateY(-1px);
}

.cookie-status,
.auth-success,
.auth-failure {
    color: #333;
}

.cookie-status h4,
.auth-success h4,
.auth-failure h4 {
    margin-top: 0;
    border-bottom: 2px solid #eee;
    padding-bottom: 8px;
}

.auth-success {
    border-left: 4px solid #28a745;
    padding-left: 16px;
}

.auth-failure {
    border-left: 4px solid #dc3545;
    padding-left: 16px;
}

.success-message {
    color: #28a745;
    font-weight: bold;
    font-size: 16px;
    margin-top: 16px;
}