
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #ff0000;
    --primary-hover: #d90000;
    --secondary: #2196F3;
    --bg-body: #0a0a0a;
    --bg-surface: #171717;
    --bg-card: #1e1e1e;
    --bg-input: #262626;
    --text-main: #ffffff;
    --text-muted: #a3a3a3;
    --border-color: #333333;
    --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(255, 0, 0, 0.15);
    --glass: rgba(23, 23, 23, 0.85);
    --radius-lg: 16px;
    --radius-md: 10px;
    --font-main: 'Outfit', sans-serif;
    --transition: all 0.25s ease;
}

[data-theme="light"] {
    --bg-body: #f3f4f6;
    --bg-surface: #ffffff;
    --bg-card: #ffffff;
    --bg-input: #f9fafb;
    --text-main: #111827;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 20px rgba(255, 0, 0, 0.05);
    --glass: rgba(255, 255, 255, 0.9);
}

/* RESET & BASE */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-main); background: var(--bg-body); color: var(--text-main); line-height: 1.7; transition: background 0.3s, color 0.3s; overflow-x: hidden; }
a { text-decoration: none; color: inherit; transition: var(--transition); }
strong, b { font-weight: 700; color: var(--text-main); }
em, i { font-style: italic; color: var(--text-muted); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* UTILS */
.text-gradient { background: linear-gradient(135deg, var(--text-main) 0%, var(--text-muted) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.text-primary { color: var(--primary); }
.hidden { display: none !important; }

/* HEADER */
header { position: sticky; top: 0; z-index: 1000; background: var(--glass); backdrop-filter: blur(16px); border-bottom: 1px solid var(--border-color); padding: 16px 0; }
.nav { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.5rem; font-weight: 800; display: flex; align-items: center; gap: 10px; letter-spacing: -0.5px; }
.logo svg { color: var(--primary); width: 28px; height: 28px; }
.theme-btn { background: transparent; border: 1px solid var(--border-color); color: var(--text-main); width: 40px; height: 40px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; transition: var(--transition); }
.theme-btn:hover { background: var(--bg-input); border-color: var(--text-muted); }

/* HERO SECTION */
.hero { text-align: center; padding: 80px 0 60px; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; top: -50%; left: 50%; transform: translateX(-50%); width: 800px; height: 800px; background: radial-gradient(circle, rgba(255,0,0,0.08) 0%, rgba(0,0,0,0) 70%); z-index: -1; pointer-events: none; }

h1 { font-size: 3.5rem; margin-bottom: 20px; line-height: 1.1; letter-spacing: -1.5px; font-weight: 800; }
.subtitle { color: var(--text-muted); font-size: 1.25rem; max-width: 700px; margin: 0 auto 50px; font-weight: 300; }

/* INPUT BOX */
.tool-wrapper { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 24px; padding: 40px; box-shadow: var(--shadow-card); position: relative; z-index: 10; margin-bottom: 60px; }
.input-group { display: flex; gap: 12px; margin-bottom: 30px; position: relative; }
.url-input { flex: 1; padding: 18px 24px; border-radius: var(--radius-lg); border: 2px solid var(--border-color); background: var(--bg-input); color: var(--text-main); font-size: 1.1rem; font-family: var(--font-main); transition: var(--transition); outline: none; }
.url-input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(255, 0, 0, 0.1); }
.action-btn { background: var(--primary); color: white; border: none; padding: 0 40px; border-radius: var(--radius-lg); font-weight: 700; cursor: pointer; font-size: 1.1rem; white-space: nowrap; transition: var(--transition); display: flex; align-items: center; gap: 8px; }
.action-btn:hover { background: var(--primary-hover); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(255, 0, 0, 0.3); }

/* RESULTS UI */
.result-section { animation: fadeIn 0.5s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.meta-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 15px; border-bottom: 1px solid var(--border-color); padding-bottom: 20px; }
.video-title { font-weight: 700; font-size: 1.1rem; color: var(--text-main); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60%; }
.format-select { padding: 10px 16px; border-radius: 8px; background: var(--bg-input); border: 1px solid var(--border-color); color: var(--text-main); font-family: var(--font-main); cursor: pointer; }

.content-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 40px; align-items: start; }
.preview-container { position: relative; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border-color); box-shadow: var(--shadow-card); aspect-ratio: 16/9; background: #000; }
.preview-img { width: 100%; height: 100%; object-fit: cover; }

.download-list { display: flex; flex-direction: column; gap: 12px; }
.dl-item { display: flex; align-items: center; justify-content: space-between; background: var(--bg-input); padding: 16px 20px; border-radius: var(--radius-md); border: 1px solid var(--border-color); transition: var(--transition); }
.dl-item:hover { border-color: var(--primary); background: var(--bg-surface); }
.dl-info h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 2px; }
.dl-info p { font-size: 0.8rem; color: var(--text-muted); font-family: monospace; }

.btn-group { display: flex; gap: 8px; }
.dl-btn { background: var(--text-main); color: var(--bg-body); border: none; padding: 8px 16px; border-radius: 6px; font-weight: 600; cursor: pointer; font-size: 0.85rem; transition: var(--transition); text-decoration: none; display: inline-flex; align-items: center; justify-content: center; min-width: 90px; }
.dl-btn:hover { opacity: 0.9; transform: scale(1.02); }
.copy-btn { background: transparent; border: 1px solid var(--border-color); color: var(--text-main); width: 34px; height: 34px; border-radius: 6px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: var(--transition); }
.copy-btn:hover { border-color: var(--primary); color: var(--primary); }

/* CONTENT ARTICLE & SEO */
.seo-article { max-width: 900px; margin: 0 auto; padding: 60px 20px; }
.seo-article h2 { font-size: 2.2rem; margin-bottom: 25px; margin-top: 50px; letter-spacing: -0.5px; }
.seo-article h3 { font-size: 1.5rem; margin-bottom: 15px; margin-top: 30px; color: var(--text-main); }
.seo-article p { margin-bottom: 20px; color: var(--text-muted); font-size: 1.05rem; }
.seo-article ul { margin-bottom: 25px; padding-left: 20px; color: var(--text-muted); }
.seo-article li { margin-bottom: 10px; }

/* FAQ SECTION (Accordion) */
.faq-section { background: var(--bg-card); border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); padding: 80px 0; margin-top: 60px; }
.faq-grid { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.faq-item { border: 1px solid var(--border-color); border-radius: var(--radius-md); background: var(--bg-input); overflow: hidden; transition: var(--transition); }
.faq-item:hover { border-color: var(--text-muted); }
.faq-item[open] { border-color: var(--primary); }
.faq-item summary { padding: 20px; cursor: pointer; font-weight: 600; font-size: 1.1rem; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 1.5rem; color: var(--text-muted); transition: transform 0.2s; }
.faq-item[open] summary::after { transform: rotate(45deg); color: var(--primary); }
.faq-content { padding: 0 20px 20px; color: var(--text-muted); font-size: 1rem; border-top: 1px solid transparent; }
.faq-item[open] .faq-content { border-top-color: var(--border-color); padding-top: 20px; }

/* FOOTER */
footer { background: var(--bg-surface); border-top: 1px solid var(--border-color); padding: 80px 0 40px; margin-top: 80px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; margin-bottom: 60px; }
.footer-col h4 { font-size: 1.1rem; margin-bottom: 20px; color: var(--text-main); }
.footer-col a { display: block; color: var(--text-muted); margin-bottom: 12px; font-size: 0.95rem; }
.footer-col a:hover { color: var(--primary); padding-left: 5px; }
.copyright { text-align: center; color: var(--text-muted); font-size: 0.9rem; padding-top: 30px; border-top: 1px solid var(--border-color); }

/* TOAST */
.toast { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(100px); background: var(--text-main); color: var(--bg-body); padding: 12px 24px; border-radius: 50px; font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,0.3); opacity: 0; transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55); z-index: 2000; }
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* RESPONSIVE */
@media (max-width: 900px) {
    h1 { font-size: 2.5rem; }
    .content-grid { grid-template-columns: 1fr; }
    .input-group { flex-direction: column; }
    .action-btn { width: 100%; justify-content: center; padding: 16px; }
}
