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

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --text: #1f2937;
    --text-light: #6b7280;
    --bg: #ffffff;
    --bg-light: #f9fafb;
    --border: #e5e7eb;
    --gradient-start: #f97316;
    --gradient-end: #ec4899;
}

html { scroll-behavior: smooth; }

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

a { text-decoration: none; color: inherit; }
button { border: none; background: none; cursor: pointer; font-family: inherit; }

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}

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

.nav-link {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    border-radius: 8px;
    transition: background 0.2s;
}

.nav-link:hover { background: var(--bg-light); }

.nav-dropdown { position: relative; }

.nav-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 4px;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    padding: 8px;
    margin-top: 8px;
}

.nav-dropdown:hover .dropdown-menu { display: block; }

.dropdown-item {
    display: block;
    padding: 10px 16px;
    font-size: 14px;
    color: var(--text);
    border-radius: 8px;
    transition: background 0.2s;
}

.dropdown-item:hover { background: var(--bg-light); }

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-login {
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: all 0.2s;
}

.btn-login:hover { border-color: var(--primary); color: var(--primary); }

.mobile-menu-btn {
    display: none;
    padding: 8px;
    color: var(--text);
}

/* Hero Section */
.hero {
    position: relative;
    padding: 140px 24px 60px;
    text-align: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(135deg,
        rgba(192,132,252,0.35) 0%,
        rgba(240,171,252,0.25) 25%,
        rgba(252,211,77,0.15) 50%,
        rgba(147,197,253,0.35) 75%,
        rgba(192,132,252,0.25) 100%);
    z-index: -1;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 16px;
    color: var(--text);
}

.hero-subtitle {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 24px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.social-proof {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: rgba(255,255,255,0.9);
    border-radius: 50px;
    font-size: 14px;
    color: var(--text);
    margin-bottom: 32px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.social-proof strong { color: var(--primary); }

.converter-box {
    max-width: 600px;
    margin: 0 auto 16px;
}

.input-wrapper {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 50px;
    padding: 6px 6px 6px 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.input-wrapper:focus-within { border-color: var(--primary); }

.input-icon { flex-shrink: 0; color: var(--text-light); }

.url-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 12px 16px;
    font-size: 15px;
    color: var(--text);
    background: transparent;
}

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

.start-btn {
    padding: 14px 32px;
    background: var(--primary);
    color: white;
    font-size: 15px;
    font-weight: 600;
    border-radius: 50px;
    transition: background 0.2s, transform 0.1s;
}

.start-btn:hover { background: var(--primary-dark); }
.start-btn:active { transform: scale(0.98); }

.disclaimer {
    font-size: 12px;
    color: var(--text-light);
}

/* Result Section */
.result-section {
    max-width: 900px;
    margin: 0 auto 40px;
    padding: 0 24px;
}

.result-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.result-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 24px;
}

.result-content {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.result-left {
    flex: 0 0 380px;
}

.result-thumbnail {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 12px;
    background: #f3f4f6;
}

.result-video-title {
    margin-top: 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    line-height: 1.4;
}

.result-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Format Tabs */
.format-tabs {
    display: flex;
    background: #f3f4f6;
    border-radius: 10px;
    padding: 4px;
    width: fit-content;
}

.format-tab {
    padding: 10px 28px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-light);
    border-radius: 8px;
    transition: all 0.2s;
}

.format-tab.active {
    background: white;
    color: var(--text);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.format-tab:hover:not(.active) {
    color: var(--text);
}

/* Quality Select */
.quality-select-wrapper {
    position: relative;
}

.quality-select {
    width: 100%;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.quality-select:focus {
    outline: none;
    border-color: var(--primary);
}

/* Download Button */
.download-btn {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    border-radius: 12px;
    transition: opacity 0.2s, transform 0.1s;
}

.download-btn:hover { opacity: 0.9; }
.download-btn:active { transform: scale(0.99); }
.download-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* Summarize Button */
.summarize-btn {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    color: var(--primary);
    background: rgba(99,102,241,0.08);
    border-radius: 12px;
    transition: background 0.2s;
}

.summarize-btn:hover { background: rgba(99,102,241,0.15); }

/* Loading */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    margin-top: 16px;
    font-size: 15px;
    color: var(--text-light);
}

/* Tools Section */
.tools {
    padding: 80px 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 48px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.tool-card {
    padding: 24px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    transition: all 0.2s;
}

.tool-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(99,102,241,0.1);
    transform: translateY(-2px);
}

.tool-icon {
    width: 48px;
    height: 48px;
    background: rgba(99,102,241,0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.tool-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.tool-desc {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.5;
}

/* FAQ Section */
.faq {
    padding: 80px 24px;
    max-width: 800px;
    margin: 0 auto;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    text-align: left;
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    background: white;
    transition: background 0.2s;
}

.faq-question:hover { background: var(--bg-light); }

.faq-chevron {
    flex-shrink: 0;
    transition: transform 0.3s;
    color: var(--text-light);
}

.faq-item.active .faq-chevron { transform: rotate(180deg); }

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.faq-item.active .faq-answer { max-height: 500px; }

.faq-answer p {
    padding: 0 24px 20px;
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.7;
}

/* Footer */
.footer {
    background: var(--bg-light);
    border-top: 1px solid var(--border);
    padding: 60px 24px 24px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand .logo { margin-bottom: 16px; }

.footer-links h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text);
}

.footer-links a {
    display: block;
    font-size: 13px;
    color: var(--text-light);
    padding: 4px 0;
    transition: color 0.2s;
}

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

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-light);
}

.footer-legal {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-legal a:hover { color: var(--primary); }

.footer-social {
    display: flex;
    align-items: center;
    gap: 16px;
}

.footer-social a {
    color: var(--text-light);
    transition: color 0.2s;
}

.footer-social a:hover { color: var(--primary); }

/* Notification */
.notification {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    z-index: 300;
    animation: slideDown 0.3s ease;
}

.notification-success { background: #10b981; color: white; }
.notification-error { background: #ef4444; color: white; }

@keyframes slideDown {
    from { opacity: 0; transform: translate(-50%, -20px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes slideUp {
    from { opacity: 1; transform: translate(-50%, 0); }
    to { opacity: 0; transform: translate(-50%, -20px); }
}

/* Responsive */
@media (max-width: 900px) {
    .nav { display: none; }
    .mobile-menu-btn { display: block; }
    .tools-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .result-content { flex-direction: column; }
    .result-left { flex: none; width: 100%; }
}

@media (max-width: 600px) {
    .hero-title { font-size: 32px; }
    .hero-subtitle { font-size: 14px; }
    .tools-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    .input-wrapper {
        flex-direction: column;
        border-radius: 16px;
        padding: 16px;
    }
    .url-input { width: 100%; padding: 12px 0; }
    .start-btn { width: 100%; }
    .input-icon { display: none; }
    .result-card { padding: 20px; }
}
