:root {
    --bg-color: #ffffff;
    --surface-color: #ffffff;
    --bg-light: #f7f8fa;
    --text-primary: #161823;
    --text-secondary: rgba(22, 24, 35, 0.65);
    --primary-color: #fe2c55;
    --primary-hover: #e0244b;
    --accent-color: #25f4ee;
    --input-bg: rgba(22, 24, 35, 0.05);
    --border-color: rgba(22, 24, 35, 0.10);
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --radius: 12px;
    --shadow: 0 4px 24px rgba(0,0,0,0.06);
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

/* ===== NAVBAR ===== */
.navbar {
    padding: 1.1rem 0;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-color);
    position: sticky;
    top: 0;
    z-index: 100;
}
.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--text-primary);
    letter-spacing: -1px;
    text-shadow: 2px 0 var(--accent-color), -2px 0 var(--primary-color);
}
.nav-links { display: flex; gap: 1.5rem; }
.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}
.nav-links a:hover { color: var(--primary-color); }

/* ===== CONTAINER ===== */
.container {
    width: 100%;
    max-width: 860px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ===== HERO ===== */
.hero {
    background: linear-gradient(135deg, #fff0f3 0%, #fff8f0 100%);
    padding: 4rem 0 3rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}
.hero-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.15;
    letter-spacing: -1px;
    color: var(--text-primary);
}
.hero-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 550px;
    margin: 0 auto;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    padding: 2.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* ===== DOWNLOADER ===== */
.downloader-section {
    background: var(--surface-color);
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}
.download-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
input[type="url"] {
    width: 100%;
    padding: 1.1rem 1.25rem;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: var(--font-family);
    outline: none;
    transition: border-color 0.2s, background 0.2s;
}
input[type="url"]:focus {
    border-color: var(--primary-color);
    background: #fff;
}
input[type="url"]::placeholder { color: rgba(22, 24, 35, 0.4); }

.options-row {
    display: flex;
    gap: 0.75rem;
}
.select-input {
    flex: 1;
    padding: 0.85rem 1rem;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: var(--font-family);
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
}
.select-input:focus { border-color: var(--primary-color); }

.btn-primary {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 1.1rem;
    border: none;
    border-radius: 8px;
    font-size: 1.05rem;
    font-weight: 700;
    font-family: var(--font-family);
    cursor: pointer;
    background-color: var(--primary-color);
    color: #fff;
    transition: transform 0.1s, background-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 14px rgba(254, 44, 85, 0.35);
}
.btn-primary:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 6px 20px rgba(254, 44, 85, 0.45);
    transform: translateY(-1px);
}
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* ===== SPINNER ===== */
.spinner {
    border: 3px solid rgba(255,255,255,0.3);
    border-top: 3px solid #fff;
    border-radius: 50%;
    width: 22px; height: 22px;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}
@keyframes spin { 100% { transform: rotate(360deg); } }
.hidden { display: none !important; }

/* ===== ADS ===== */
.ad-container { width: 100%; margin: 0.5rem 0; min-height: 10px; }

/* ===== RESULT ===== */
.result-section { animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.result-card {
    background: var(--surface-color);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}
.result-thumbnail {
    width: 100%; height: 240px;
    object-fit: cover;
    background: #f1f1f2;
}
.result-info { padding: 1.5rem; }
.result-info h3 {
    font-size: 1.1rem; font-weight: 600;
    margin-bottom: 0.75rem;
    word-break: break-word; line-height: 1.4;
}
.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: rgba(22, 24, 35, 0.06);
    color: var(--text-secondary);
    border-radius: 4px;
    font-size: 0.75rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.5px;
}
.btn-success {
    display: flex; justify-content: center; align-items: center;
    width: 100%; padding: 1rem;
    border: none; border-radius: 8px;
    font-size: 1rem; font-weight: 700;
    font-family: var(--font-family);
    cursor: pointer;
    background-color: var(--text-primary);
    color: #fff;
    text-decoration: none;
    margin-top: 1.2rem;
    transition: background-color 0.2s;
}
.btn-success:hover { background-color: rgba(22, 24, 35, 0.8); }

/* ===== ERROR ===== */
.error-message {
    margin-top: 1rem; padding: 1rem;
    background: rgba(254, 44, 85, 0.08);
    border-left: 3px solid var(--primary-color);
    color: #c8103a;
    border-radius: 4px;
    font-size: 0.9rem; font-weight: 500;
}

/* ===== INFO SECTIONS ===== */
.section-info {
    padding: 4rem 0;
}
.bg-light { background: var(--bg-light); }

.section-title {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    font-weight: 800;
    text-align: center;
    margin-bottom: 0.75rem;
    letter-spacing: -0.5px;
}
.section-subtitle {
    color: var(--text-secondary);
    text-align: center;
    font-size: 1rem;
    max-width: 560px;
    margin: 0 auto 2.5rem;
}

/* Steps */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}
.step-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}
.step-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}
.step-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.step-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.5rem; }
.step-card p { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.6; }

/* Features */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
}
.feature-card {
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: #fff;
    transition: transform 0.2s, border-color 0.2s;
}
.feature-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
}
.feature-icon { font-size: 2rem; margin-bottom: 0.75rem; }
.feature-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.4rem; }
.feature-card p { color: var(--text-secondary); font-size: 0.875rem; line-height: 1.6; }

/* Platforms */
.platforms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}
.platform-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: var(--shadow);
}
.platform-logo { font-size: 3rem; display: block; margin-bottom: 0.75rem; }
.platform-card h3 { font-size: 1.2rem; font-weight: 800; margin-bottom: 0.5rem; }
.platform-card p { color: var(--text-secondary); font-size: 0.875rem; line-height: 1.6; }

/* FAQ */
.faq-list { display: flex; flex-direction: column; gap: 1rem; }
.faq-item {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    background: #fff;
    transition: border-color 0.2s;
}
.faq-item:hover { border-color: var(--primary-color); }
.faq-item h3 {
    font-size: 1rem; font-weight: 700;
    margin-bottom: 0.5rem; color: var(--text-primary);
}
.faq-item p { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.7; }
.faq-item strong { color: var(--text-primary); }

/* ===== LEGAL PAGES ===== */
.legal-content {
    max-width: 720px;
    padding: 3rem 1.5rem 4rem;
}
.legal-content h1 {
    font-size: 2rem; font-weight: 800;
    margin-bottom: 0.5rem; letter-spacing: -0.5px;
}
.legal-date {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 2rem;
    display: block;
}
.legal-content h2 {
    font-size: 1.2rem; font-weight: 700;
    margin: 2rem 0 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}
.legal-content p { color: var(--text-secondary); margin-bottom: 1rem; line-height: 1.7; }
.legal-content ul {
    margin: 0.5rem 0 1rem 1.5rem;
    color: var(--text-secondary);
    line-height: 1.8;
}
.legal-content a { color: var(--primary-color); text-decoration: underline; }

/* ===== FOOTER ===== */
.footer {
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    background: var(--bg-light);
    margin-top: auto;
}
.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    text-align: center;
}
.footer-brand {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.footer-links {
    display: flex;
    gap: 1.5rem;
}
.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}
.footer-links a:hover { color: var(--primary-color); }
.footer-disclaimer {
    font-size: 0.78rem;
    color: rgba(22, 24, 35, 0.4);
    max-width: 500px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
    .hero { padding: 3rem 0 2rem; }
    .options-row { flex-direction: column; }
    .navbar .container { flex-direction: column; gap: 0.5rem; }
    .section-info { padding: 3rem 0; }
}
