:root {
    --bg-color: #0d1117;
    --bg-gradient: radial-gradient(circle at 50% 0%, #1f6feb22, transparent 60%), radial-gradient(circle at 100% 100%, #8957e511, transparent 50%);
    --box-bg: rgba(22, 27, 34, 0.4);
    --box-border: rgba(255, 255, 255, 0.08);
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --accent: #58a6ff;
    --accent-hover: #3182ce;
    --success: #238636;
    --success-hover: #2ea043;
    --error: #f85149;
    --glass-blur: blur(20px);
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    background-image: var(--bg-gradient);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 4rem;
}

.downloader-container {
    max-width: 900px;
    width: 90%;
    margin: 0 auto;
    padding-bottom: 5rem;
}

/* Header & Typography */
.app-header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.header-badge {
    display: inline-block;
    background: rgba(35, 134, 54, 0.15);
    color: #3fb950;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    border: 1px solid rgba(63, 185, 80, 0.3);
    margin-bottom: 1rem;
}

.app-header h1 {
    font-size: 3rem;
    font-weight: 800;
    margin: 0 0 1rem 0;
    background: linear-gradient(180deg, #ffffff, #8b949e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.app-header p {
    color: var(--text-secondary);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2rem;
    letter-spacing: -0.01em;
}

/* Main UI Box (The Input) */
.ui-box {
    background: var(--box-bg);
    border: 1px solid var(--box-border);
    border-radius: 20px;
    padding: 2.5rem;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    margin-bottom: 4rem;
    position: relative;
    overflow: hidden;
}

.ui-box::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(88, 166, 255, 0.3), transparent);
}

.input-group {
    display: flex;
    gap: 1rem;
    position: relative;
    background-color: #010409;
    border: 1px solid var(--box-border);
    border-radius: 12px;
    padding: 0.5rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.input-group:focus-within {
    border-color: rgba(88, 166, 255, 0.5);
    box-shadow: 0 0 0 4px rgba(88, 166, 255, 0.15);
}

.input-group .input-icon {
    width: 24px;
    height: 24px;
    color: var(--text-secondary);
    margin: auto 0 auto 1rem;
}

.input-group input {
    flex: 1;
    padding: 1rem 0.5rem;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.input-group input:focus {
    outline: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--success), var(--success-hover));
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0 2rem;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(46, 160, 67, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(46, 160, 67, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

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

.feature-card {
    background: rgba(22, 27, 34, 0.3);
    border: 1px solid var(--box-border);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: transform 0.3s, background 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    background: rgba(22, 27, 34, 0.6);
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem auto;
}

.feature-icon svg {
    color: #fff;
}

.bg-blue { background: linear-gradient(135deg, #1f6feb, #388bfd); box-shadow: 0 8px 16px rgba(31, 111, 235, 0.3); }
.bg-green { background: linear-gradient(135deg, #238636, #2ea043); box-shadow: 0 8px 16px rgba(35, 134, 54, 0.3); }
.bg-purple { background: linear-gradient(135deg, #8957e5, #a371f7); box-shadow: 0 8px 16px rgba(137, 87, 229, 0.3); }
.bg-yellow { background: linear-gradient(135deg, #d29922, #e3b341); box-shadow: 0 8px 16px rgba(210, 153, 34, 0.3); }

.feature-card h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.15rem;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

/* Steps Grid */
.seo-content {
    margin-bottom: 4rem;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 5rem;
    position: relative;
}

.step-card {
    background: rgba(22, 27, 34, 0.3);
    border: 1px solid var(--box-border);
    border-radius: 16px;
    padding: 2rem;
    text-align: left;
    position: relative;
}

.step-num {
    background: rgba(88, 166, 255, 0.1);
    color: var(--accent);
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(88, 166, 255, 0.2);
}

.step-card h3 {
    margin: 0 0 1rem 0;
    font-size: 1.25rem;
}

.step-card p {
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* FAQ Section */
.faq-section details {
    background: rgba(22, 27, 34, 0.3);
    border: 1px solid var(--box-border);
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: background 0.3s;
}

.faq-section details:hover {
    background: rgba(22, 27, 34, 0.6);
}

.faq-section summary {
    font-weight: 600;
    font-size: 1.15rem;
    padding: 1.5rem;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-section summary::-webkit-details-marker {
    display: none;
}

.faq-section summary .chevron {
    color: var(--text-secondary);
    transition: transform 0.3s ease;
}

.faq-section details[open] summary .chevron {
    transform: rotate(180deg);
}

.faq-section details[open] summary {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.faq-section p {
    padding: 0 1.5rem 1.5rem 1.5rem;
    color: var(--text-secondary);
    margin: 1rem 0 0 0;
    line-height: 1.6;
}

/* Loaders and Utility */
.hidden { display: none !important; }

.btn-loader {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top: 3px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
}

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

.result-box {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--box-border);
    text-align: center;
}

.result-message {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    background-color: rgba(35, 134, 54, 0.1);
    border: 1px solid var(--success);
    color: #3fb950;
}

.result-message.error {
    background-color: rgba(248, 81, 73, 0.1);
    color: var(--error);
    border: 1px solid rgba(248, 81, 73, 0.3);
}

.video-wrapper {
    margin: 1.5rem 0;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    padding-top: 56.25%;
    border: 1px solid var(--box-border);
}

.video-wrapper video {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: #000;
}

.dl-btn {
    display: inline-block;
    background-color: var(--accent);
    color: #161b22;
    text-decoration: none;
    padding: 1rem 2.5rem;
    border-radius: 8px;
    font-weight: 700;
    transition: background-color 0.2s, transform 0.2s;
}

.dl-btn:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 768px) {
    .steps-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .input-group {
        flex-direction: column;
        background: transparent;
        border: none;
        padding: 0;
    }
    
    .input-group input {
        background-color: #010409;
        border: 1px solid var(--box-border);
        border-radius: 12px;
        padding: 1rem 1rem 1rem 3rem;
    }
    
    .input-group .input-icon {
        position: absolute;
        left: 1rem;
        top: 1.1rem;
        margin: 0;
    }
    
    .btn-primary {
        padding: 1rem;
        border-radius: 12px;
    }
    
    .app-header h1 {
        font-size: 2.2rem;
    }
}

