/* Reset & Base Styles */
:root {
    --primary-gradient: linear-gradient(135deg, #dc2626, #7c3aed);
    --primary-hover: linear-gradient(135deg, #b91c1c, #6d28d9);
    --secondary-bg: rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(15, 23, 42, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    
    /* Colors */
    --bg-dark: #0f172a;
    --text-main: #f4f4f5;
    --text-muted: #a1a1aa;
    --text-dark: #71717a;
    --red-500: #ef4444;
    --blue-500: #3b82f6;
    --green-500: #10b981;
    --yellow-500: #eab308;
    --purple-500: #a855f7;
    
    /* Spacing */
    --container-width: 1200px;
    --header-height: 80px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    overflow-x: hidden; /* FIX: Prevents horizontal scrolling */
    position: relative;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    background-attachment: fixed;
    min-height: 100vh;
    color: var(--text-main);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

ul {
    list-style: none;
}

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1rem;
}

.hidden {
    display: none !important;
}

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-justify { text-align: justify; }

.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-12 { margin-top: 3rem; }
.mr-2 { margin-right: 0.5rem; }
.mr-3 { margin-right: 0.75rem; }

/* Flexbox Helpers */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

/* Header */
.main-header {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
}

.logo span { color: white; }
.logo .highlight { color: var(--red-500); }

.badge-free {
    background: linear-gradient(to right, #dc2626, #9333ea);
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-weight: bold;
    margin-left: 0.75rem;
    animation: pulse 2s infinite;
}

.nav-links a {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-left: 1.5rem;
}

.nav-links a:hover {
    color: white;
}

/* Hero Section */
.hero-section {
    padding: 3rem 0;
    text-align: center;
}

.hero-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #ef4444, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

.hero-subtitle {
    display: block;
    color: white;
    font-size: 1.5rem;
    margin-top: 0.5rem;
    -webkit-text-fill-color: white; /* Reset fill for subtitle */
}

.hero-desc {
    font-size: 1rem;
    color: var(--text-muted);
    max-width: 42rem;
    margin: 0 auto 2rem;
}

/* Card Styles */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    margin-bottom: 3rem;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    color: white;
    margin-bottom: 0.8rem;
}

.input-group {
    position: relative;
    margin-bottom: 1rem;
}

.url-input {
    width: 100%;
    padding: 1.25rem 1.25rem 1.25rem 3.5rem;
    background: rgba(24, 24, 27, 0.5);
    border: 2px solid #3f3f46;
    border-radius: 0.75rem;
    color: white;
    font-size: 1.125rem;
    outline: none;
    transition: all 0.3s;
}

.url-input:focus {
    border-color: var(--red-500);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.2);
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--red-500);
    font-size: 1.25rem;
}

.supports-text {
    font-size: 0.875rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
}

/* Buttons */
.btn-primary {
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(220, 38, 38, 0.3);
}

.btn-large {
    width: 100%;
    padding: 1.25rem;
    font-size: 1.125rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-radius: 9999px;
}

/* Status Messages */
.loader-box {
    background: rgba(24, 24, 27, 0.5);
    border: 1px solid #3f3f46;
    border-radius: 0.75rem;
    padding: 1.5rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

.error-box {
    background: rgba(127, 29, 29, 0.2);
    border: 1px solid rgba(185, 28, 28, 0.3);
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

.error-text { font-weight: 500; color: #fecaca; }
.error-sub { font-size: 0.875rem; color: rgba(254, 202, 202, 0.7); }

/* Results Area */
.video-info-card {
    background: linear-gradient(to right, rgba(39, 39, 42, 0.3), rgba(24, 24, 27, 0.3));
    border: 1px solid rgba(63, 63, 70, 0.5);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.thumb-img {
    width: 100%;
    border-radius: 0.75rem;
    background: #27272a;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

@media (min-width: 768px) {
    .thumb-img { width: 16rem; height: 10rem; object-fit: cover; }
    .info-layout { display: flex; gap: 1.5rem; }
    .hero-title { font-size: 3.75rem; }
    .nav-links { display: block; } /* Show on desktop */
}

.tag {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    display: inline-flex;
    align-items: center;
    background: #27272a;
    color: #d4d4d8;
}

.tag-blue { background: rgba(30, 58, 138, 0.3); color: #93c5fd; }
.tag-red { background: rgba(127, 29, 29, 0.3); color: #fca5a5; }

/* Format Lists */
.section-title {
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

.format-card {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
    transition: all 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.format-card:hover {
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.video-format { border-left: 4px solid var(--blue-500); }
.audio-format { border-left: 4px solid var(--green-500); }

.format-btn {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

.btn-blue { background: linear-gradient(to right, #2563eb, #1d4ed8); }
.btn-blue:hover { background: linear-gradient(to right, #1d4ed8, #1e40af); }
.btn-green { background: linear-gradient(to right, #059669, #047857); }
.btn-green:hover { background: linear-gradient(to right, #047857, #065f46); }

/* Features Grid */
.grid-3 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

.feature-box {
    background: rgba(24, 24, 27, 0.5);
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid #27272a;
    transition: all 0.3s;
}

.feature-box:hover { border-color: rgba(239, 68, 68, 0.3); }

.feature-icon { font-size: 1.875rem; margin-bottom: 1rem; }
.feature-title { font-weight: 700; margin-bottom: 0.5rem; color: white; }
.feature-text { font-size: 0.875rem; color: var(--text-muted); }

/* Step Numbers */
.step-number {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    background: linear-gradient(to right, #ef4444, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Content & FAQ */
.content-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #27272a;
}

.seo-content p {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.faq-item {
    background: rgba(24, 24, 27, 0.5);
    padding: 1.25rem;
    border-radius: 0.75rem;
    border: 1px solid #27272a;
    margin-bottom: 1rem;
}

/* Footer */
footer {
    margin-top: 3rem;
    padding: 2rem 0;
    border-top: 1px solid #27272a;
    background: rgba(24, 24, 27, 0.5);
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.footer-links a { color: var(--text-muted); font-size: 0.875rem; }
.footer-links a:hover { color: white; }

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 1.25rem;
}

.modal-container {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border-radius: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    max-width: 500px;
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    transition: all 0.3s ease-out;
}

.modal-show {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: var(--primary-gradient);
    border-radius: 1.25rem 1.25rem 0 0;
}

.modal-header h3 { font-size: 1.25rem; font-weight: 700; color: white; display: flex; align-items: center; }

.modal-content { padding: 2rem; }

.countdown-timer {
    font-size: 4rem;
    font-weight: 700;
    text-align: center;
    margin: 1rem 0;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.download-progress {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin: 1.5rem 0;
    overflow: hidden;
}

.download-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.file-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 1.5rem 0;
}

.file-info-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.75rem;
    border-radius: 0.625rem;
    text-align: center;
}

.file-label { display: block; font-size: 0.75rem; color: #94a3b8; margin-bottom: 0.25rem; }
.file-value { display: block; font-weight: 700; color: white; }

/* Notification */
.notification {
    position: fixed;
    top: 1rem;
    right: 1rem;
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 3000;
    display: flex;
    align-items: center;
    animation: slideIn 0.3s ease-out;
}

.notify-success { background: var(--green-500); border: 1px solid #065f46; }
.notify-error { background: var(--red-500); border: 1px solid #991b1b; }
.notify-info { background: var(--blue-500); border: 1px solid #1e40af; }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .5; }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.spin-icon { animation: spin 1s linear infinite; }
.pulse-glow { animation: pulse 2s ease-in-out infinite; }

/* --- Legal/Info Page Styles --- */
.page-container {
    padding-top: 3rem;
}

.page-title {
    font-size: 2rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
    color: white;
}

.legal-content {
    color: var(--text-muted);
}

.legal-content h2 {
    color: white;
    font-size: 1.25rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.legal-content p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.legal-content ul {
    list-style: disc;
    padding-left: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

.legal-content li {
    margin-bottom: 0.5rem;
}

/* Specific component for DMCA */
.dmca-notice {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 0.75rem;
    margin-top: 1.5rem;
    border: 1px solid var(--glass-border);
}

.dmca-notice h3 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 700;
}

.dmca-notice ul {
    margin-bottom: 0;
}

.contact-email {
    font-weight: bold;
    color: white;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    display: block;
}