:root {
    /* Color Palette */
    --primary: #4f46e5;
    --primary-gradient: linear-gradient(135deg, #4f46e5 0%, #a855f7 100%);
    --primary-hover: #4338ca;
    --secondary: #6366f1;
    --accent: #a855f7;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --bg-light: #0f172a;
    --bg-white: #1e293b;
    --text-dark: #f8fafc;
    --text-muted: #94a3b8;
    --border: #334155;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    transition: var(--transition);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    gap: 8px;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.3);
}

.btn-icon {
    background: transparent;
    border: 1px solid var(--border);
    padding: 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-dark);
    transition: var(--transition);
}

.btn-icon:hover {
    background-color: var(--bg-white);
}

/* Breadcrumbs */
.breadcrumb-nav {
    background-color: var(--bg-white);
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-muted);
}

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

.breadcrumbs a {
    color: var(--text-muted);
}

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

.breadcrumbs i {
    width: 16px;
    height: 16px;
}

/* Tool Page Specifics */
.tool-header {
    padding: 60px 0;
    text-align: center;
}

.tool-title {
    font-size: 40px;
    font-weight: 800;
    margin-bottom: 20px;
}

.tool-description {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 800px;
    margin: 0 auto;
}

.tool-content {
    padding: 80px 0;
    background-color: var(--bg-white);
}

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

.content-section h2 {
    font-size: 32px;
    margin-bottom: 20px;
}

.content-section p {
    margin-bottom: 20px;
    color: var(--text-muted);
}

.content-section ul {
    margin-bottom: 20px;
    padding-left: 20px;
}

.content-section li {
    margin-bottom: 10px;
    list-style: disc;
    color: var(--text-muted);
}

[data-theme="dark"] .header {
    background-color: rgba(15, 23, 42, 0.8);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
}

.logo-icon {
    background: var(--primary-gradient);
    color: white;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

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

.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    padding: 10px 0;
    min-width: 200px;
    display: none;
    z-index: 1000;
}

.dropdown-menu a {
    display: block;
    padding: 10px 20px;
    color: var(--text-dark);
}

.dropdown-menu a:hover {
    background-color: var(--bg-light);
    color: var(--primary);
}

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

.nav-link:hover {
    color: var(--primary);
}

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

/* Hero & Converter Section */
.hero {
    padding: 80px 0;
    text-align: center;
}

.hero-title {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 20px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 800px;
    margin: 0 auto 40px;
}

.converter-box {
    background-color: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow);
    margin-bottom: 60px;
}

.upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    padding: 60px 20px;
    cursor: pointer;
    transition: var(--transition);
    background-color: var(--bg-light);
}

.upload-area:hover, .upload-area.drag-over {
    border-color: var(--primary);
    background-color: rgba(79, 70, 229, 0.05);
}

.upload-icon {
    color: var(--primary);
    margin-bottom: 20px;
}

.upload-area h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.upload-area p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* File List & Conversion Controls */
.file-list-container {
    margin-top: 30px;
}

.file-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.file-list {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 30px;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background-color: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
}

.file-info {
    flex-grow: 1;
    display: flex;
    align-items: center;
    gap: 15px;
}

.file-name {
    font-weight: 500;
}

.file-size {
    color: var(--text-muted);
    font-size: 14px;
}

.file-status {
    font-size: 14px;
    padding: 4px 12px;
    border-radius: 20px;
    background-color: #f1f5f9;
}

.conversion-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.format-selector {
    display: flex;
    align-items: center;
    gap: 15px;
}

.select-input {
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background-color: var(--bg-white);
    color: var(--text-dark);
}

/* Features & Sections */
.section-title {
    font-size: 36px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 50px;
}

.features {
    padding: 80px 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-card {
    background-color: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 40px;
    text-align: center;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
}

.how-it-works {
    padding: 80px 0;
    background-color: var(--bg-white);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.step-card {
    text-align: center;
    position: relative;
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--primary-gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin: 0 auto 20px;
}

.faq {
    padding: 80px 0;
}

.faq-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
}

.faq-item h3 {
    margin-bottom: 15px;
    font-size: 20px;
}

.faq-item p {
    color: var(--text-muted);
}

/* Ad Sections */
.ad-container {
    background-color: #f1f5f9;
    border: 1px dashed #cbd5e1;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    margin: 30px 0;
}

[data-theme="dark"] .ad-container {
    background-color: #1e293b;
    border-color: #334155;
}

.header-ad {
    height: 90px;
    width: 100%;
    max-width: 728px;
    margin: 0 auto 40px;
}

.content-ad {
    height: 250px;
    width: 100%;
}

/* Footer */
.footer {
    background-color: var(--bg-white);
    padding: 80px 0 30px;
    border-top: 1px solid var(--border);
    margin-top: 80px;
}

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

.footer-description {
    color: var(--text-muted);
    margin: 20px 0;
    max-width: 300px;
}

.footer-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 25px;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--text-muted);
}

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

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.social-link:hover {
    background: var(--primary-gradient);
    color: white;
}

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

/* Ad Management Styles */
.ad-container {
    margin: 40px auto;
    text-align: center;
    width: 100%;
    display: flex;
    justify-content: center;
}

.ad-banner-header,
.ad-banner-middle,
.ad-banner-footer {
    min-height: 90px;
    width: 728px;
}

[data-theme="dark"] .ad-container {
    background: transparent;
}

.ad-placeholder-text {
    color: var(--text-muted);
    font-size: 14px;
    opacity: 0.6;
    pointer-events: none;
}

/* Specific Banner Sizing */
.ad-banner-header {
    max-width: 728px;
    margin-top: 30px;
}

.ad-banner-middle {
    max-width: 970px;
    margin: 60px auto;
}

.ad-banner-footer {
    max-width: 728px;
    margin-bottom: 40px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

.spin {
    animation: spin 1s linear infinite;
}

.hero-content, .converter-box, .feature-card, .step-card, .faq-item {
    animation: fadeIn 0.6s ease-out forwards;
}

/* Glassmorphism */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .glass {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Sticky Mobile Ad */
.mobile-sticky-ad {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background-color: var(--bg-white);
    border-top: 1px solid var(--border);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

@media (max-width: 768px) {
    .mobile-sticky-ad {
        display: flex;
    }
    
    body {
        padding-bottom: 60px;
    }
}
