/* Global Reset & Variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #E1306C;
    --primary-dark: #C13584;
    --secondary: #5B51D8;
    --accent: #FD1D1D;
    --dark: #1a1a2e;
    --dark-light: #16213e;
    --text: #ffffff;
    --text-muted: #b0b0b0;
    --bg: #0f0f23;
    --bg-card: #1a1a2e;
    --success: #00d084;
    --error: #ff4757;
    --shadow: rgba(0, 0, 0, 0.3);
    --gradient: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: var(--dark-light);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px var(--shadow);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-size: 28px;
    font-weight: bold;
    color: var(--text);
    text-decoration: none;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo span {
    color: var(--primary);
    -webkit-text-fill-color: var(--primary);
}

.nav {
    display: flex;
    gap: 30px;
}

.nav a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav a:hover {
    color: var(--primary);
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient);
    transition: width 0.3s;
}

.nav a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text);
    border-radius: 3px;
    transition: 0.3s;
}

.mobile-menu {
    display: none;
    background: var(--dark-light);
    padding: 20px;
    position: fixed;
    top: 70px;
    right: -100%;
    width: 250px;
    height: calc(100vh - 70px);
    transition: right 0.3s;
    z-index: 999;
    box-shadow: -5px 0 20px var(--shadow);
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu a {
    display: block;
    color: var(--text);
    text-decoration: none;
    padding: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    transition: background 0.3s;
}

.mobile-menu a:hover {
    background: rgba(225, 48, 108, 0.1);
    color: var(--primary);
}

/* Hero Section */
.hero {
    padding: 80px 0 60px;
    text-align: center;
    background: radial-gradient(circle at top, rgba(225, 48, 108, 0.15), transparent 70%);
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 15px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.8s ease;
}

.hero .subtitle {
    font-size: 20px;
    color: var(--text-muted);
    margin-bottom: 40px;
    animation: fadeInUp 0.8s ease 0.2s both;
}

/* Download Tool */
.download-tool {
    max-width: 700px;
    margin: 0 auto 40px;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.input-wrapper {
    display: flex;
    gap: 10px;
    background: var(--bg-card);
    padding: 10px;
    border-radius: 50px;
    box-shadow: 0 10px 40px var(--shadow);
    border: 2px solid transparent;
    transition: border 0.3s;
}

.input-wrapper:focus-within {
    border-color: var(--primary);
}

#videoUrl {
    flex: 1;
    padding: 18px 25px;
    border: none;
    background: transparent;
    color: var(--text);
    font-size: 16px;
    outline: none;
}

#videoUrl::placeholder {
    color: var(--text-muted);
}

.btn-primary {
    padding: 18px 40px;
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    white-space: nowrap;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(225, 48, 108, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.hint {
    margin-top: 15px;
    font-size: 14px;
    color: var(--text-muted);
}

/* Loader */
.loader {
    display: none;
    flex-direction: column;
    align-items: center;
    margin: 30px 0;
}

.loader.active {
    display: flex;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(225, 48, 108, 0.2);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loader p {
    margin-top: 15px;
    color: var(--text-muted);
}

/* Error Message */
.error-message {
    display: none;
    max-width: 700px;
    margin: 20px auto;
    padding: 20px;
    background: rgba(255, 71, 87, 0.1);
    border: 2px solid var(--error);
    border-radius: 15px;
    color: var(--error);
    text-align: center;
}

.error-message.active {
    display: block;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Download Results */
.download-results {
    display: none;
    max-width: 700px;
    margin: 30px auto;
    animation: fadeInUp 0.5s;
}

.download-results.active {
    display: block;
}

.video-preview {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 10px 40px var(--shadow);
}

.video-preview video {
    width: 100%;
    border-radius: 15px;
    margin-bottom: 20px;
}

.quality-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quality-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    background: rgba(225, 48, 108, 0.1);
    border: 2px solid var(--primary);
    border-radius: 12px;
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.quality-btn:hover {
    background: var(--gradient);
    transform: translateX(5px);
}

.quality-label {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Features Section */
.features {
    padding: 80px 0;
    background: linear-gradient(180deg, transparent, rgba(91, 81, 216, 0.05), transparent);
}

.features h2 {
    text-align: center;
    font-size: 42px;
    margin-bottom: 50px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background: var(--bg-card);
    padding: 35px;
    border-radius: 20px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(255,255,255,0.05);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px var(--shadow);
}

.feature-card .icon {
    font-size: 50px;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: var(--primary);
}

.feature-card p {
    color: var(--text-muted);
    line-height: 1.7;
}

/* How to Use Section */
.how-to-use {
    padding: 80px 0;
}

.how-to-use h2 {
    text-align: center;
    font-size: 42px;
    margin-bottom: 15px;
    color: var(--text);
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 50px;
    font-size: 18px;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
}

.step {
    text-align: center;
    position: relative;
}

.step-number {
    width: 70px;
    height: 70px;
    margin: 0 auto 25px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: bold;
    box-shadow: 0 10px 30px rgba(225, 48, 108, 0.3);
}

.step h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: var(--primary);
}

.step p {
    color: var(--text-muted);
    line-height: 1.7;
}

/* FAQ Section */
.faq {
    padding: 80px 0;
    background: rgba(26, 26, 46, 0.5);
}

.faq h2 {
    text-align: center;
    font-size: 42px;
    margin-bottom: 50px;
    color: var(--text);
}

.faq-list {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-card);
    margin-bottom: 20px;
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.05);
}

.faq-question {
    padding: 25px 30px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s;
}

.faq-question:hover {
    background: rgba(225, 48, 108, 0.05);
}

.faq-question h3 {
    font-size: 18px;
    color: var(--text);
    margin: 0;
}

.faq-toggle {
    font-size: 28px;
    color: var(--primary);
    font-weight: bold;
    transition: transform 0.3s;
}

.faq-item.active .faq-toggle {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 0 30px 25px;
}

.faq-answer p {
    color: var(--text-muted);
    line-height: 1.8;
}

/* Footer */
.footer {
    background: var(--dark-light);
    padding: 60px 0 20px;
    margin-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: var(--primary);
    margin-bottom: 20px;
    font-size: 20px;
}

.footer-col p {
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 10px;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-col ul li a:hover {
    color: var(--primary);
}

.footer-col a {
    color: var(--primary);
    text-decoration: none;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: var(--text-muted);
    font-size: 14px;
}

/* Content Pages */
.content-page {
    padding: 80px 0;
    min-height: calc(100vh - 400px);
}

.content-page h1 {
    font-size: 42px;
    margin-bottom: 20px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.content-page h2 {
    font-size: 32px;
    margin: 40px 0 20px;
    color: var(--primary);
}

.content-page p {
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 20px;
    font-size: 17px;
}

.content-page ul {
    margin: 20px 0;
    padding-left: 30px;
}

.content-page ul li {
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 10px;
}

.content-page a {
    color: var(--primary);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s;
}

.content-page a:hover {
    border-bottom-color: var(--primary);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .nav {
        display: none;
    }
    
    .hamburger {
        display: flex;
    }
    
    .mobile-menu {
        display: block;
    }
    
    .hero h1 {
        font-size: 36px;
    }
    
    .hero .subtitle {
        font-size: 16px;
    }
    
    .input-wrapper {
        flex-direction: column;
        border-radius: 20px;
    }
    
    .btn-primary {
        width: 100%;
    }
    
    .features h2, .how-to-use h2, .faq h2 {
        font-size: 32px;
    }
    
    .features-grid, .steps-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 28px;
    }
    
    .logo a {
        font-size: 22px;
    }
    
    .container {
        padding: 0 15px;
    }
}
