* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #667eea;
    --secondary: #764ba2;
    --accent: #f093fb;
    --danger: #f5576c;
    --success: #4caf50;
    --warning: #ff9800;
    --dark: #1a1a2e;
    --light: #f8f9ff;
    --border: #e0e0ff;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.2);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--dark);
    color: #333;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Animated Background */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, var(--dark) 0%, #2d2d4a 100%);
}

.gradient-1, .gradient-2, .gradient-3 {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
}

.gradient-1 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    top: -50px;
    left: -50px;
    animation: float 20s infinite ease-in-out;
}

.gradient-2 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--danger) 100%);
    bottom: -100px;
    right: -50px;
    animation: float 25s infinite ease-in-out reverse;
}

.gradient-3 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    top: 50%;
    right: 10%;
    animation: float 30s infinite ease-in-out;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) translateX(0px); }
    25% { transform: translateY(-30px) translateX(20px); }
    50% { transform: translateY(-60px) translateX(-20px); }
    75% { transform: translateY(-30px) translateX(30px); }
}

/* Particles */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(102, 126, 234, 0.5);
    border-radius: 50%;
    animation: particle-float 20s infinite;
}

@keyframes particle-float {
    0% {
        opacity: 0;
        transform: translateY(0) translateX(0);
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(-100px) translateX(100px);
    }
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 60px;
    animation: slideDown 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.logo-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.logo-icon {
    font-size: 3rem;
    animation: pulse-scale 2s ease-in-out infinite;
}

.main-title {
    font-size: 3.5rem;
    background: linear-gradient(135deg, #00d4ff, #0099ff, var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    letter-spacing: -1px;
}

.tagline {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 15px;
    font-weight: 300;
}

.platform-supports {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 10px;
}

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

@keyframes pulse-scale {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Search Section */
.search-section {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
    align-items: center;
    animation: slideUp 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s backwards;
}

.search-box-wrapper {
    flex: 1;
    position: relative;
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    z-index: 2;
}

.search-box {
    width: 100%;
    padding: 16px 20px 16px 50px;
    border: 2px solid var(--border);
    border-radius: 15px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.search-box:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3);
    background: rgba(255, 255, 255, 1);
}

.search-highlight {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 3px 3px 0 0;
    transition: width 0.4s ease;
}

.search-box:focus ~ .search-highlight {
    width: 100%;
}

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

/* Download Button */
.btn-download-main {
    padding: 16px 40px;
    border: none;
    border-radius: 15px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.btn-download-main:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.5);
}

.btn-download-main:active:not(:disabled) {
    transform: translateY(-1px);
}

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

.btn-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-icon {
    font-size: 1.2rem;
    animation: bounce 1s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.btn-loader {
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

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

/* Quick Tips */
.quick-tips {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 15px;
}

.tip {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: slideUp 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

.tip:nth-child(1) { animation-delay: 0.3s; }
.tip:nth-child(2) { animation-delay: 0.4s; }
.tip:nth-child(3) { animation-delay: 0.5s; }

/* Messages */
.messages-container {
    margin-bottom: 30px;
}

.message {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideDown 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    backdrop-filter: blur(10px);
}

.message.success {
    background: rgba(76, 175, 80, 0.1);
    color: #4caf50;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.message.error {
    background: rgba(245, 87, 108, 0.1);
    color: #f5576c;
    border: 1px solid rgba(245, 87, 108, 0.3);
}

.message.info {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary);
    border: 1px solid rgba(102, 126, 234, 0.3);
}

.message-icon {
    font-size: 1.3rem;
}

.message-text {
    flex: 1;
}

/* Preview Section */
.preview-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 40px;
    animation: slideDown 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: var(--shadow);
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.preview-header h2 {
    font-size: 1.5rem;
    color: var(--dark);
}

.close-preview {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    transition: all 0.3s ease;
}

.close-preview:hover {
    color: var(--danger);
    transform: rotate(90deg);
}

.preview-container {
    width: 100%;
    background: #000;
    border-radius: 15px;
    overflow: hidden;
}

.preview-video {
    width: 100%;
    height: auto;
    max-height: 500px;
    display: block;
}

/* Results Section */
.results-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    animation: slideUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: var(--shadow);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border);
}

.results-header h2 {
    font-size: 1.5rem;
    color: var(--dark);
}

.result-stats {
    display: flex;
    gap: 20px;
}

.stat {
    color: #666;
    font-size: 0.95rem;
}

.stat strong {
    color: var(--primary);
    font-size: 1.1rem;
}

/* Tabs */
.tabs-container {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--border);
    overflow-x: auto;
}

.tab-btn {
    padding: 12px 20px;
    border: none;
    background: transparent;
    color: #666;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--primary);
}

.tab-btn.active {
    color: var(--primary);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
}

/* Tab Content */
.tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Download Options */
.download-options, .stream-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.download-card, .stream-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 15px;
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    animation: scaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.download-card:hover, .stream-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--primary);
}

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

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
}

.card-badge {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.card-info {
    margin-bottom: 15px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.info-label {
    color: #666;
}

.info-value {
    color: var(--primary);
    font-weight: 600;
}

.card-url {
    background: rgba(0, 0, 0, 0.05);
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    word-break: break-all;
    color: #333;
    margin-bottom: 15px;
    max-height: 60px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
}

.card-buttons {
    display: flex;
    gap: 10px;
}

.btn-small {
    flex: 1;
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-download {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.btn-download:hover {
    transform: scale(1.05);
}

.btn-copy {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
}

.btn-copy:hover {
    background: rgba(0, 0, 0, 0.15);
}

.btn-copy.copied {
    background: var(--success);
    color: white;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.info-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 20px;
    border-radius: 15px;
    animation: scaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.info-card-label {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.info-card-value {
    color: var(--dark);
    font-size: 1.3rem;
    font-weight: 700;
    word-break: break-word;
}

/* Download All */
.download-all-wrapper {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border: 2px solid var(--border);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    margin-top: 30px;
}

.btn-download-all {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.btn-download-all:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}

.download-all-icon {
    font-size: 1.3rem;
    animation: bounce 1s ease-in-out infinite;
}

.download-note {
    color: #666;
    margin-top: 15px;
    font-size: 0.95rem;
}

/* History Section */
.history-section {
    margin-top: 40px;
}

.history-section h2 {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 25px;
}

.history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.history-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: slideUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.history-url {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    word-break: break-word;
    margin-bottom: 8px;
}

.history-time {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
}

/* Features Section */
.features-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 60px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    animation: slideUp 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3) { animation-delay: 0.3s; }
.feature-card:nth-child(4) { animation-delay: 0.4s; }

.feature-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.feature-icon-wrapper {
    font-size: 2.5rem;
    margin-bottom: 15px;
    animation: bounce 2s ease-in-out infinite;
}

.feature-card h3 {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.feature-card p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* Responsive */
@media (max-width: 768px) {
    .main-title {
        font-size: 2rem;
    }

    .search-section {
        flex-direction: column;
    }

    .btn-download-main {
        width: 100%;
        justify-content: center;
    }

    .download-options, .stream-options {
        grid-template-columns: 1fr;
    }

    .tabs-container {
        flex-direction: column;
    }

    .tab-btn {
        justify-content: center;
    }

    .tab-btn.active::after {
        display: none;
    }

    .tab-btn.active {
        background: rgba(102, 126, 234, 0.1);
    }
}
