* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    background-attachment: fixed;
    min-height: 100vh;
    color: #f8eeee;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

/* Logo Animation Styles */
.logo {
  font-family: 'Montserrat', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: #901616;
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.8);
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
  animation: pulse 2s ease-in-out infinite;
}

.logo span {
  font-weight: 400;
  font-size: 1.5rem;
}

.logo::before {
  content: '↓';
  font-size: 1.8rem;
  color: #00D4FF;
  animation: bounce 1.5s ease-in-out infinite;
}

.logo::after {
  content: '';
  position: absolute;
  top: 10px;
  left: -100px;
  width: 20px;
  height: 2px;
  background: linear-gradient(to right, transparent, #00D4FF);
  animation: shootingStar 3s infinite;
}

/* Logo Keyframes */
@keyframes pulse {
  0%, 100% {
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.8);
  }
  50% {
    text-shadow: 0 0 20px rgba(0, 212, 255, 1);
  }
}

@keyframes shootingStar {
  0% {
    transform: translateX(0);
    opacity: 1;
  }
  50% {
    transform: translateX(200px);
    opacity: 0.5;
  }
  100% {
    transform: translateX(300px);
    opacity: 0;
  }
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(5px);
  }
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 3rem;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(0, 212, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.header h1 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.header p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.status-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.4);
    color: white;
    border: 1px solid rgba(0, 212, 255, 0.3);
}

.status-badge.online {
    background: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.status-badge.offline {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

/* Sections - Darker Theme */
.url-section, .settings-section, .download-section, .preview-section, .progress-section, .downloads-section {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(0, 212, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Input Group */
.input-group {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.url-input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: 2px solid rgba(0, 212, 255, 0.3);
    border-radius: 15px;
    background: rgba(0, 0, 0, 0.3);
    color: white;
    font-size: 1rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.url-input:focus {
    outline: none;
    border-color: rgba(0, 212, 255, 0.6);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.url-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

/* Buttons - Updated for darker theme */
.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 15px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 212, 255, 0.3);
}

.btn-primary {
    background: linear-gradient(135deg, #00D4FF 0%, #0099CC 100%);
    color: white;
}

.btn-secondary {
    background: rgba(0, 0, 0, 0.4);
    color: white;
    border-color: rgba(0, 212, 255, 0.4);
}

.btn-large {
    padding: 1.5rem 3rem;
    font-size: 1.2rem;
    width: 100%;
}

.btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Settings */
.settings-section h3 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.setting-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.setting-group label {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

/* Checkbox */
.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.9) !important;
    flex-direction: row !important;
    gap: 0.8rem !important;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    border-color: #3b82f6;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 12px;
    font-weight: bold;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Select - Updated colors */
.select-input {
    padding: 0.8rem;
    border: 2px solid rgba(0, 212, 255, 0.3);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.3);
    color: white;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.select-input:focus {
    outline: none;
    border-color: rgba(0, 212, 255, 0.6);
}

.select-input option {
    background: #0f3460;
    color: white;
}

/* Preview Card - Updated */
.preview-card {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 15px;
    padding: 1.5rem;
    border: 1px solid rgba(0, 213, 255, 0.614);
}

.preview-info {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 1.5rem;
    align-items: start;
}

.preview-thumbnail {
    width: 120px;
    height: 120px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid rgb(253, 253, 253);
}

.preview-details h4 {
    color: white;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.preview-details p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.preview-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    line-height: 1.4;
    margin-top: 1rem;
}

/* Progress */
.progress-card h4 {
    color: white;
    margin-bottom: 1rem;
}

.progress-bar {
    position: relative;
    background: rgba(177, 11, 11, 0.1);
    height: 20px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 10px;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: 600;
    font-size: 0.8rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.download-info {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

/* Downloads List - Enhanced */
.downloads-section h3 {
    color: white;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.download-counter {
    background: rgba(0, 212, 255, 0.2);
    color: #00D4FF;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.download-item {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 1rem;
    border: 1px solid rgba(0, 212, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.download-item:hover {
    border-color: rgba(0, 212, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.download-timestamp {
    color: rgba(255, 255, 255, 0.963);
    font-size: 0.7rem;
    font-style: italic;
}

/* Footer */
.footer {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 2rem;
    margin-top: 3rem;
    border: 1px solid rgba(0, 212, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.footer-content p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.footer-content p:first-child {
    font-size: 1.1rem;
    color: #00D4FF;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.footer-content strong {
    color: #00D4FF;
    font-weight: 700;
    text-shadow: 0 0 5px rgba(0, 212, 255, 0.3);
}

.footer-content p:last-child {
    font-size: 0.8rem;
    opacity: 0.6;
    margin-bottom: 0;
}

/* Utility */
.hidden {
    display: none !important;
}

.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
    }
    
    .preview-info {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .download-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.preview-section, .progress-section {
    animation: fadeIn 0.3s ease;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Additional styles for Master Downloader - to be added to style.css */

/* Table styling for downloads */
table {
    width: 100%;
    border-collapse: collapse;
    color: rgba(255, 255, 255, 0.9);
}

table thead {
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 2px solid rgba(0, 212, 255, 0.3);
}

table thead th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: white;
    font-size: 0.9rem;
}

table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

table tbody tr:hover {
    background: rgba(0, 212, 255, 0.05);
}

table tbody td {
    padding: 0.8rem;
    vertical-align: middle;
}

/* Radio buttons styling (for audio/video selection) */
input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    margin-right: 0.5rem;
}

input[type="radio"]:checked {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    border-color: #3b82f6;
}

input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Active downloads section */
.download-item {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(0, 212, 255, 0.2);
    transition: all 0.3s ease;
}

.download-item:hover {
    border-color: rgba(0, 212, 255, 0.4);
}

/* Collapsible section indicator */
h3 span[id*="Toggle"] {
    display: inline-block;
    margin-right: 0.5rem;
    transition: transform 0.3s ease;
    font-size: 0.8rem;
}

/* Text utilities */
.text-center {
    text-align: center !important;
}

.text-muted {
    opacity: 0.6 !important;
}

/* Responsive table */
@media (max-width: 768px) {
    table {
        font-size: 0.85rem;
    }
    
    table thead th,
    table tbody td {
        padding: 0.5rem;
    }
    
    table thead th:nth-child(2),
    table tbody td:nth-child(2) {
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* Preview image styling */
.preview-thumbnail {
    width: 120px;
    height: 120px;
    border-radius: 10px;
    object-fit: cover;
    border: 2px solid rgba(0, 212, 255, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.preview-details h4 {
    color: white;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.preview-details p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.preview-description {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    line-height: 1.6;
    max-height: 200px;
    overflow-y: auto;
}

.preview-description strong {
    color: rgba(255, 255, 255, 0.9);
    display: block;
    margin-bottom: 0.5rem;
}

/* Smooth transitions */
.preview-section,
.progress-section,
#activeDownloadsSection {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Sites list scrollbar */
#sitesList::-webkit-scrollbar {
    width: 8px;
}

#sitesList::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

#sitesList::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 255, 0.3);
    border-radius: 10px;
}

#sitesList::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 212, 255, 0.5);
}