/* ===== Reset & Base ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #0a0a14;
    --bg-2: #11111e;
    --surface: rgba(255,255,255,0.04);
    --surface-hover: rgba(255,255,255,0.07);
    --surface-solid: #16162a;
    --primary: #ff2d55;
    --primary-2: #ff6b9d;
    --primary-glow: rgba(255,45,85,0.35);
    --accent: #00f2fe;
    --accent-2: #4facfe;
    --text: #f5f5fa;
    --text-muted: #8a8aa0;
    --border: rgba(255,255,255,0.06);
    --border-hover: rgba(255,255,85,0.2);
    --success: #00d68f;
    --error: #ff4757;
    --radius: 20px;
    --radius-sm: 12px;
    --radius-xs: 8px;
    --shadow-lg: 0 20px 60px rgba(0,0,0,0.5);
    --shadow-glow: 0 0 40px rgba(255,45,85,0.15);
    --gradient-primary: linear-gradient(135deg, #ff2d55, #ff6b9d);
    --gradient-accent: linear-gradient(135deg, #00f2fe, #4facfe);
    --gradient-mesh: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(255,45,85,0.15), transparent), radial-gradient(ellipse 60% 50% at 80% 50%, rgba(0,242,254,0.08), transparent), radial-gradient(ellipse 60% 50% at 20% 80%, rgba(255,107,157,0.08), transparent);
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 840px;
    margin: 0 auto;
    padding: 0 24px;
}

.container-wide {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Animated background mesh */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--gradient-mesh);
    z-index: -1;
    animation: meshFloat 20s ease-in-out infinite alternate;
}

@keyframes meshFloat {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-20px, 20px) scale(1.05); }
}

/* ===== Header ===== */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10,10,20,0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    font-weight: 800;
    font-size: 1.4rem;
    letter-spacing: -0.02em;
}

.logo-icon {
    font-size: 1.5rem;
    filter: drop-shadow(0 0 8px var(--primary-glow));
}

.logo-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s;
}

.nav a:hover { color: var(--text); }
.nav a:hover::after { width: 100%; }

/* ===== Hero ===== */
.hero {
    padding: 80px 0 100px;
    text-align: center;
    position: relative;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
}

.hero-badge .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.hero-title {
    font-size: clamp(2.2rem, 7vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: 20px;
    line-height: 1.1;
    background: linear-gradient(135deg, #fff 0%, #ff6b9d 60%, #ff2d55 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 540px;
    margin: 0 auto 48px;
    line-height: 1.6;
}

/* ===== Downloader Card ===== */
.downloader-card {
    background: rgba(20,20,35,0.6);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

.downloader-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0.5;
}

.download-form {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.url-input {
    flex: 1;
    min-width: 200px;
    padding: 18px 24px;
    font-size: 1rem;
    font-family: inherit;
    color: var(--text);
    background: rgba(255,255,255,0.03);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    outline: none;
    transition: all 0.3s;
}

.url-input::placeholder { color: var(--text-muted); }

.url-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(255,45,85,0.12);
    background: rgba(255,255,255,0.05);
}

.btn-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 18px 40px;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    color: #fff;
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s;
    min-width: 150px;
    position: relative;
    overflow: hidden;
}

.btn-download::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-download:hover::after { left: 100%; }

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px var(--primary-glow);
}

.btn-download:active { transform: translateY(0); }
.btn-download:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* Spinner */
.btn-spinner { display: inline-flex; }
.spinner { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Error message */
.error-msg {
    margin-top: 18px;
    padding: 14px 18px;
    background: rgba(255,71,87,0.08);
    border: 1px solid rgba(255,71,87,0.25);
    border-radius: var(--radius-sm);
    color: #ff6b6b;
    font-size: 0.9rem;
    text-align: left;
}

/* ===== Result Card ===== */
.result-card {
    margin-top: 40px;
    background: rgba(20,20,35,0.6);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    text-align: left;
    animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.result-video-wrap {
    width: 100%;
    max-height: 520px;
    background: #000;
    display: flex;
    justify-content: center;
    position: relative;
}

.result-video-wrap video {
    max-width: 100%;
    max-height: 520px;
}

.result-info { padding: 28px; }

.result-info h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 14px;
    line-height: 1.4;
}

.result-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
    font-size: 0.85rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.result-author {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--primary-2);
    font-weight: 500;
}

.result-author::before { content: "@"; }
.result-duration::before { content: "⏱ "; }

.result-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    background: var(--gradient-primary);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--primary-glow);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.15);
    transform: translateY(-2px);
}

/* ===== How It Works ===== */
.how-it-works {
    padding: 100px 0;
    border-top: 1px solid var(--border);
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 56px;
    letter-spacing: -0.03em;
}

.section-title .accent {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.step-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px 28px;
    text-align: center;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.step-card:hover {
    background: var(--surface-hover);
    border-color: rgba(255,45,85,0.2);
    transform: translateY(-4px);
}

.step-number {
    width: 56px;
    height: 56px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    background: var(--gradient-primary);
    border-radius: 50%;
    box-shadow: 0 8px 20px var(--primary-glow);
}

.step-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.step-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ===== Articles Section ===== */
.articles-section {
    padding: 100px 0;
    border-top: 1px solid var(--border);
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.article-card {
    display: block;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0;
    text-decoration: none;
    color: var(--text);
    transition: all 0.3s;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.article-card:hover {
    border-color: rgba(255,45,85,0.25);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.3);
}

/* Article card image — full width, proper height */
.article-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    border: none;
}

.article-card-body {
    padding: 24px;
}

.article-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.4;
}

.article-card p {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-bottom: 14px;
    line-height: 1.5;
}

.article-date {
    font-size: 0.78rem;
    color: var(--primary-2);
    font-weight: 600;
}

/* ===== Article Page ===== */
.article-page {
    padding: 0 0 100px;
}

/* Full-width hero image — edge to edge, no border radius */
.article-hero-wrap {
    width: 100%;
    height: 420px;
    overflow: hidden;
    margin-bottom: 0;
    position: relative;
}

.article-hero-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.article-hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(to bottom, transparent, var(--bg));
    pointer-events: none;
}

.article-page-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 24px;
}

.article-page .article-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.article-page h1 {
    font-size: clamp(1.8rem, 5vw, 2.4rem);
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.article-page h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 40px;
    margin-bottom: 14px;
    letter-spacing: -0.01em;
}

.article-page h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-top: 28px;
    margin-bottom: 10px;
    color: var(--primary-2);
}

.article-page p {
    color: var(--text);
    font-size: 1.05rem;
    margin-bottom: 20px;
    line-height: 1.8;
}

.article-page ul, .article-page ol {
    margin: 0 0 24px 20px;
    color: var(--text);
}

.article-page li {
    margin-bottom: 12px;
    line-height: 1.7;
    font-size: 1.02rem;
}

.article-page a {
    color: var(--primary-2);
    text-decoration: none;
    transition: color 0.2s;
}

.article-page a:hover { color: var(--primary); text-decoration: underline; }

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.2s;
    position: relative;
    z-index: 10;
}

.back-link:hover { color: var(--primary-2); }

.back-link-wrap {
    max-width: 800px;
    margin: 24px auto 0;
    padding: 0 24px;
}

/* ===== Legal Page ===== */
.legal-page {
    padding: 60px 0 100px;
}

.legal-page h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 32px;
    letter-spacing: -0.02em;
}

.legal-page h2 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-top: 36px;
    margin-bottom: 14px;
}

.legal-page p {
    color: var(--text);
    font-size: 0.97rem;
    margin-bottom: 14px;
    line-height: 1.7;
}

.legal-page ul {
    margin: 0 0 18px 20px;
}

.legal-page li {
    margin-bottom: 8px;
    font-size: 0.97rem;
    line-height: 1.6;
}

.legal-page a {
    color: var(--primary-2);
    text-decoration: none;
}

.legal-page a:hover { text-decoration: underline; }

/* ===== FAQ ===== */
.faq {
    padding: 100px 0;
    border-top: 1px solid var(--border);
}

.faq-list {
    max-width: 720px;
    margin: 0 auto;
}

.faq-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 14px;
    overflow: hidden;
    transition: border-color 0.3s;
    backdrop-filter: blur(10px);
}

.faq-item.open {
    border-color: rgba(255,45,85,0.2);
}

.faq-question {
    width: 100%;
    padding: 22px 26px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    color: var(--text);
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
}

.faq-icon {
    font-size: 1.4rem;
    color: var(--primary);
    transition: transform 0.3s;
    flex-shrink: 0;
}

.faq-item.open .faq-icon { transform: rotate(45deg); }

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 26px;
}

.faq-item.open .faq-answer {
    max-height: 200px;
    padding: 0 26px 22px;
}

.faq-answer p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ===== Footer ===== */
.footer {
    padding: 50px 24px;
    text-align: center;
    border-top: 1px solid var(--border);
    background: rgba(10,10,20,0.5);
    backdrop-filter: blur(10px);
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
    font-weight: 800;
    font-size: 1.2rem;
}

.footer-brand .logo-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-links {
    display: flex;
    gap: 28px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.footer-links a:hover { color: var(--text); }

.footer-copy {
    color: var(--text-muted);
    font-size: 0.82rem;
    opacity: 0.7;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface-solid); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .article-hero-wrap { height: 280px; }
    .article-page h1 { font-size: 1.6rem; }
}

@media (max-width: 640px) {
    .download-form { flex-direction: column; }
    .btn-download { width: 100%; }
    .nav { gap: 18px; }
    .nav a { font-size: 0.85rem; }
    .hero { padding: 50px 0 70px; }
    .result-actions { flex-direction: column; }
    .btn-primary, .btn-secondary { width: 100%; }
    .footer-links { gap: 16px; }
    .articles-grid { grid-template-columns: 1fr; }
    .container, .container-wide { padding: 0 16px; }
    .article-page-content { padding: 32px 16px; }
    .back-link-wrap { padding: 0 16px; }
    .article-hero-wrap { height: 220px; }
    .article-card img { height: 180px; }
}
