/* assets/style.css - Premium Y2Mate Redesign */
:root {
    --primary: #ff2a5f;
    --primary-hover: #ff003c;
    --bg-dark: #0a0f1d;
    --bg-surface: #121b2d;
    --text-main: #ffffff;
    --text-dim: #9ca3af;
    --glass: rgba(18, 27, 45, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --neon-glow: 0 0 20px rgba(255, 42, 95, 0.4);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Outfit', sans-serif; scroll-behavior: smooth; }
body { background: var(--bg-dark); color: var(--text-main); display: flex; flex-direction: column; min-height: 100vh; overflow-x: hidden; }

/* Dynamic Background Elements */
.bg-wrapper { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: -1; overflow: hidden; background: radial-gradient(circle at top right, #111827, #0a0f1d); }
.blob { position: absolute; border-radius: 50%; filter: blur(120px); opacity: 0.6; animation: float 10s infinite ease-in-out alternate; }
.blob-1 { width: 600px; height: 600px; background: rgba(255, 42, 95, 0.15); top: -10%; left: -10%; }
.blob-2 { width: 500px; height: 500px; background: rgba(59, 130, 246, 0.15); bottom: -10%; right: -10%; animation-delay: -5s; }

@keyframes float { 0% { transform: translate(0, 0) scale(1); } 100% { transform: translate(30px, 50px) scale(1.1); } }

/* Universal Layout & Utilities */
.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 6rem 0; position: relative; }
.section-title { text-align: center; font-size: 2.5rem; font-weight: 800; margin-bottom: 3rem; color: var(--text-main); background: linear-gradient(to right, #fff, #a5b4fc); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.glass-section { background: rgba(255, 255, 255, 0.02); border-top: 1px solid var(--glass-border); border-bottom: 1px solid var(--glass-border); backdrop-filter: blur(10px); }

/* Navbar */
.navbar { position: fixed; top: 0; left: 0; width: 100%; background: rgba(10, 15, 29, 0.85); backdrop-filter: blur(16px); z-index: 1000; border-bottom: 1px solid var(--glass-border); transition: all 0.3s; }
.nav-container { display: flex; justify-content: space-between; align-items: center; max-width: 1200px; margin: 0 auto; padding: 1.2rem 1.5rem; }
.navbar .logo { display: flex; align-items: center; gap: 0.5rem; text-decoration: none; }
.navbar .logo h1 { font-size: 1.8rem; font-weight: 800; letter-spacing: -0.5px; }
.navbar .logo span { color: var(--primary); }
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a { color: var(--text-dim); text-decoration: none; font-weight: 500; font-size: 1rem; transition: color 0.3s; }
.nav-links a:hover { color: var(--text-main); }

/* Hero Section */
.hero-section { padding-top: 10rem; min-height: 90vh; display: flex; align-items: center; justify-content: center; text-align: center; }
.app-container { width: 100%; max-width: 900px; margin: 0 auto; position: relative; z-index: 10; }
.hero-section .header h2 { font-size: 3.5rem; font-weight: 800; line-height: 1.2; margin-bottom: 1.5rem; background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-section .subtitle { font-size: 1.2rem; color: var(--text-dim); margin-bottom: 3rem; max-width: 600px; margin-left: auto; margin-right: auto; line-height: 1.6; }

/* Main Tool Container */
.main-content { background: rgba(18, 27, 45, 0.4); backdrop-filter: blur(20px); border: 1px solid var(--glass-border); border-radius: 24px; padding: 3rem; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5); position: relative; overflow: hidden; }
.main-content::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent); }

/* Input Wrapper */
.input-wrapper { margin-bottom: 0; position: relative; }
.input-inner { display: flex; gap: 0.5rem; background: rgba(0, 0, 0, 0.3); padding: 0.8rem; border-radius: 16px; border: 1px solid rgba(255,255,255,0.05); transition: all 0.3s; }
.input-inner:focus-within { border-color: rgba(255, 42, 95, 0.5); box-shadow: var(--neon-glow); }
input[type="url"] { flex: 1; background: transparent; border: none; color: white; padding: 1rem; outline: none; font-size: 1.1rem; width: 100%; }
input[type="url"]::placeholder { color: rgba(255,255,255,0.3); }
button#submitBtn { background: var(--primary); color: white; border: none; padding: 0 2.5rem; border-radius: 12px; font-weight: 700; font-size: 1.1rem; cursor: pointer; transition: all 0.3s; display: flex; align-items: center; justify-content: center; min-width: 150px; }
button#submitBtn:hover { background: var(--primary-hover); transform: translateY(-2px); box-shadow: var(--neon-glow); }
button#submitBtn:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }

/* Video Preview Area */
#resultArea { margin-top: 3rem; animation: fadeInUp 0.6s ease forwards; }
.video-preview { display: flex; gap: 2rem; margin-bottom: 2.5rem; background: rgba(0,0,0,0.2); padding: 1.5rem; border-radius: 16px; align-items: center; }
#videoThumb { width: 320px; height: 180px; object-fit: cover; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.3); }
.preview-info { flex: 1; text-align: left; }
.preview-info h3 { font-size: 1.4rem; margin-bottom: 1.5rem; line-height: 1.4; color: #fff; }

/* Tabs */
.tabs-nav { display: flex; gap: 1rem; margin-bottom: 2rem; border-bottom: 1px solid var(--glass-border); padding-bottom: 1rem; overflow-x: auto; scrollbar-width: none; }
.tab-btn { background: transparent; color: var(--text-dim); border: 1px solid transparent; padding: 0.8rem 1.5rem; font-size: 1rem; font-weight: 600; cursor: pointer; border-radius: 10px; transition: all 0.3s; white-space: nowrap; }
.tab-btn:hover { color: white; background: rgba(255,255,255,0.05); }
.tab-btn.active { color: white; background: rgba(255, 42, 95, 0.1); border-color: var(--primary); box-shadow: inset 0 0 20px rgba(255, 42, 95, 0.1); }
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.4s ease; }

/* Tables */
.format-table { width: 100%; border-collapse: separate; border-spacing: 0 0.8rem; }
.format-table th { text-align: left; padding: 1rem 1.5rem; color: var(--text-dim); font-size: 0.9rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }
.format-table td { padding: 1.2rem 1.5rem; background: rgba(255,255,255,0.03); font-size: 1rem; border-top: 1px solid rgba(255,255,255,0.02); border-bottom: 1px solid rgba(255,255,255,0.02); transition: background 0.2s; }
.format-table tr td:first-child { border-radius: 12px 0 0 12px; border-left: 1px solid rgba(255,255,255,0.02); font-weight: 700; color: #fff; }
.format-table tr td:last-child { border-radius: 0 12px 12px 0; border-right: 1px solid rgba(255,255,255,0.02); text-align: right; }
.format-table tr:hover td { background: rgba(255,255,255,0.06); }

/* Buttons & Badges */
.dl-btn { background: var(--primary); color: white; text-decoration: none; padding: 0.8rem 1.8rem; border-radius: 8px; font-weight: 600; font-size: 0.95rem; display: inline-block; border: none; cursor: pointer; transition: all 0.3s; }
.dl-btn:hover { background: var(--primary-hover); transform: translateY(-2px); box-shadow: 0 8px 15px rgba(255, 42, 95, 0.3); }
.size-badge { background: rgba(255, 255, 255, 0.1); padding: 0.4rem 0.8rem; border-radius: 6px; font-size: 0.85rem; color: #cbd5e1; font-family: monospace; }
.error-card { background: rgba(255, 42, 95, 0.1); border: 1px solid rgba(255, 42, 95, 0.3); padding: 1.5rem; border-radius: 12px; color: #fca5a5; margin-top: 2rem; display: flex; align-items: center; gap: 1rem; font-weight: 500; }

/* History Section */
.history-header { display: flex; justify-content: space-between; align-items: center; margin-top: 3rem; margin-bottom: 2rem; padding-top: 2rem; border-top: 1px solid var(--glass-border); flex-wrap: wrap; gap: 1rem; }
.history-header h4 { font-size: 1.4rem; font-weight: 700; }
.history-notice { font-size: 0.85rem; color: #fbbf24; background: rgba(251, 191, 36, 0.1); padding: 0.5rem 1rem; border-radius: 20px; border: 1px solid rgba(251, 191, 36, 0.2); display: flex; align-items: center; gap: 0.5rem; }

.history-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.5rem; }
.history-card { background: rgba(0, 0, 0, 0.3); border: 1px solid rgba(255,255,255,0.05); border-radius: 16px; overflow: hidden; cursor: pointer; transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); display: flex; flex-direction: column; position: relative; }
.history-card::after { content: 'Re-Download'; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.8); background: var(--primary); padding: 0.5rem 1rem; border-radius: 8px; font-weight: bold; opacity: 0; transition: all 0.3s; z-index: 2; pointer-events: none; }
.history-card:hover { transform: translateY(-8px); border-color: rgba(255, 42, 95, 0.5); box-shadow: 0 15px 30px rgba(0,0,0,0.4); }
.history-card:hover::after { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.history-card img { width: 100%; height: 130px; object-fit: cover; transition: filter 0.3s; }
.history-card:hover img { filter: brightness(0.4); }
.history-card-info { padding: 1.2rem; }
.history-card-info p { font-size: 0.95rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 0.5rem; }
.history-card-info span { font-size: 0.8rem; color: var(--text-dim); }

/* How It Works & Features */
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; margin-top: 2rem; }
.step-card { background: var(--bg-surface); padding: 2.5rem 2rem; border-radius: 20px; border: 1px solid var(--glass-border); text-align: center; transition: transform 0.3s; }
.step-card:hover { transform: translateY(-5px); border-color: rgba(255,255,255,0.15); }
.step-icon { font-size: 3.5rem; margin-bottom: 1.5rem; display: inline-block; background: rgba(255, 42, 95, 0.1); width: 80px; height: 80px; line-height: 80px; border-radius: 50%; color: var(--primary); }
.step-card h3 { font-size: 1.4rem; margin-bottom: 1rem; }
.step-card p { color: var(--text-dim); line-height: 1.6; }

.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 2rem; margin-top: 2rem; }
.feature-card { background: rgba(0,0,0,0.2); padding: 2.5rem; border-radius: 20px; border: 1px solid var(--glass-border); position: relative; overflow: hidden; transition: all 0.3s; }
.feature-card::before { content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%; background: var(--primary); transition: width 0.3s; opacity: 0.8; }
.feature-card:hover::before { width: 100%; opacity: 0.05; }
.feature-card h4 { font-size: 1.3rem; margin-bottom: 1rem; color: #fff; }
.feature-card p { color: var(--text-dim); line-height: 1.7; position: relative; z-index: 1; }

/* FAQ */
.faq-list { display: flex; flex-direction: column; gap: 1.2rem; max-width: 800px; margin: 2rem auto 0; }
.faq-item { background: var(--bg-surface); padding: 2rem; border-radius: 16px; border: 1px solid var(--glass-border); transition: border-color 0.3s; }
.faq-item:hover { border-color: rgba(255,255,255,0.15); }
.faq-item h4 { font-size: 1.2rem; margin-bottom: 1rem; color: var(--primary); display: flex; align-items: center; gap: 0.8rem; }
.faq-item h4::before { content: '?'; display: inline-block; width: 24px; height: 24px; background: rgba(255, 42, 95, 0.2); color: var(--primary); text-align: center; line-height: 24px; border-radius: 50%; font-size: 0.9rem; }
.faq-item p { color: var(--text-dim); line-height: 1.7; }

/* Developer Card */
.dev-card { display: flex; align-items: center; gap: 3rem; background: var(--bg-surface); padding: 3rem; border-radius: 24px; border: 1px solid var(--glass-border); margin-top: 2rem; flex-wrap: wrap; position: relative; overflow: hidden; }
.dev-card::after { content: ''; position: absolute; top: -50%; right: -20%; width: 300px; height: 300px; background: radial-gradient(circle, rgba(255, 42, 95, 0.1), transparent); filter: blur(40px); pointer-events: none; }
.dev-photo { width: 160px; height: 160px; border-radius: 50%; object-fit: cover; border: 4px solid var(--bg-dark); outline: 2px solid var(--primary); box-shadow: 0 15px 35px rgba(0,0,0,0.4); z-index: 1; }
.dev-info { flex: 1; min-width: 280px; z-index: 1; }
.dev-info h3 { font-size: 2.2rem; font-weight: 800; margin-bottom: 0.5rem; }
.dev-role { display: inline-block; background: rgba(255, 42, 95, 0.15); color: var(--primary); padding: 0.4rem 1rem; border-radius: 20px; font-weight: 600; font-size: 0.9rem; margin-bottom: 1.5rem; }
.dev-desc { color: var(--text-dim); line-height: 1.7; margin-bottom: 2rem; font-size: 1.05rem; max-width: 600px; }
.dev-contact { display: flex; gap: 1rem; flex-wrap: wrap; }
.contact-link { display: inline-flex; align-items: center; gap: 0.5rem; background: rgba(255,255,255,0.03); color: white; text-decoration: none; padding: 0.8rem 1.5rem; border-radius: 12px; font-weight: 500; border: 1px solid rgba(255,255,255,0.1); transition: all 0.3s; }
.contact-link:hover { background: var(--primary); border-color: var(--primary); transform: translateY(-3px); box-shadow: 0 10px 20px rgba(255, 42, 95, 0.25); }

/* Footer */
.footer { background: #060913; padding: 4rem 1.5rem; border-top: 1px solid rgba(255,255,255,0.05); text-align: center; margin-top: auto; }
.footer-logo { display: flex; align-items: center; justify-content: center; gap: 0.5rem; margin-bottom: 1.5rem; opacity: 0.8; }
.footer-logo h2 { font-size: 1.8rem; font-weight: 800; }
.footer-logo span { color: var(--primary); }
.footer p { color: var(--text-dim); margin-bottom: 0.8rem; }
.footer .disclaimer { font-size: 0.85rem; opacity: 0.5; max-width: 600px; margin: 0 auto; }

/* Animations */
.spinner { width: 24px; height: 24px; border: 3px solid rgba(255,255,255,0.2); border-top-color: white; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hidden { display: none !important; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* Responsive Overrides */
@media (max-width: 900px) {
    .hero-section .header h2 { font-size: 2.5rem; }
    .main-content { padding: 2rem; }
    .video-preview { flex-direction: column; align-items: stretch; text-align: center; }
    #videoThumb { width: 100%; height: auto; aspect-ratio: 16/9; }
    .preview-info { text-align: center; }
}

@media (max-width: 768px) {
    .navbar { padding: 0.8rem 0; }
    .nav-links { display: none; }
    .hero-section { padding-top: 7rem; min-height: auto; padding-bottom: 4rem; }
    .hero-section .header h2 { font-size: 2rem; }
    .input-inner { flex-direction: column; background: transparent; border: none; padding: 0; gap: 1rem; }
    input[type="url"] { background: rgba(0, 0, 0, 0.3); border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; }
    button#submitBtn { width: 100%; padding: 1.2rem; }
    
    .format-table th { display: none; }
    .format-table td { display: block; text-align: center; padding: 0.8rem; border: none !important; border-radius: 0 !important; }
    .format-table tr { display: block; background: rgba(255,255,255,0.03); margin-bottom: 1rem; border-radius: 12px; padding: 1rem; }
    .format-table tr td:last-child { margin-top: 1rem; }
    .dl-btn { width: 100%; display: block; }
    
    .dev-card { flex-direction: column; text-align: center; padding: 2rem 1.5rem; }
    .dev-contact { justify-content: center; }
    .contact-link { width: 100%; justify-content: center; }
}
