/* Reset & Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: #eef2ff;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --bg-light: #f8fafc;
    --card-bg: #ffffff;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(99, 102, 241, 0.15);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text-main);
    background-color: var(--bg-light);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

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

.text-center { text-align: center; }
.hidden { display: none !important; }

/* Header & Nav */
.header {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-size: 22px;
    color: var(--text-main);
}

.logo-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.logo-text strong {
    color: var(--primary-color);
}

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

.nav-link {
    text-decoration: none;
    color: #4b5563;
    font-weight: 500;
    font-size: 15px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
}

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

/* Dropdown Mega Menu */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    padding: 20px;
    display: none;
    gap: 30px;
    z-index: 200;
    min-width: 580px;
    margin-top: 10px;
}

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

.mega-column h4 {
    font-size: 14px;
    color: var(--primary-color);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mega-column a {
    display: block;
    text-decoration: none;
    color: #374151;
    font-size: 14px;
    padding: 6px 0;
    transition: color 0.2s;
}

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

/* Buttons */
.btn {
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
}

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

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

.btn-secondary {
    background-color: #f3f4f6;
    color: #374151;
    border-color: #d1d5db;
}

.btn-secondary:hover {
    background-color: #e5e7eb;
}

.btn-outline {
    background: transparent;
    border-color: #d1d5db;
    color: #374151;
}

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

.btn-primary-lg {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: white;
    padding: 14px 32px;
    font-size: 16px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: none;
    cursor: pointer;
}

.btn-primary-lg:hover {
    transform: translateY(-1px);
    box-shadow: 0 25px 30px -5px rgba(99, 102, 241, 0.25);
}

/* Hero Section & Converter Box */
.hero-section {
    padding: 60px 0;
}

.hero-title {
    font-size: 40px;
    font-weight: 800;
    margin-bottom: 12px;
    color: #111827;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 40px;
}

.converter-box {
    max-width: 800px;
    margin: 0 auto;
    background: #ffffff;
    border: 2px dashed #cbd5e1;
    border-radius: var(--radius-lg);
    padding: 48px 30px;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
    position: relative;
}

.converter-box.dragover {
    border-color: var(--primary-color);
    background-color: var(--primary-light);
}

/* Split Upload Button (Match User Screenshot exactly) */
.split-btn-container {
    display: inline-flex;
    position: relative;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
    border-radius: 12px;
    overflow: visible;
    margin-bottom: 20px;
}

.btn-split-main {
    background-color: #6366f1;
    color: #ffffff;
    border: none;
    padding: 16px 28px;
    font-size: 18px;
    font-weight: 700;
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background-color 0.2s;
}

.btn-split-main:hover {
    background-color: #4f46e5;
}

.btn-split-toggle {
    background-color: #5558e6;
    color: #ffffff;
    border: none;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    padding: 16px 18px;
    font-size: 16px;
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.btn-split-toggle:hover {
    background-color: #4338ca;
}

/* Upload Menu Dropdown (Matched Screenshot) */
.upload-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    min-width: 240px;
    background-color: #6366f1;
    border-radius: 12px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: none;
    flex-direction: column;
    z-index: 50;
}

.upload-dropdown-menu.active {
    display: flex;
}

.dropdown-item {
    background: transparent;
    border: none;
    color: #ffffff;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background-color: #4f46e5;
}

.dropdown-item i {
    font-size: 18px;
    width: 22px;
    text-align: center;
}

.drag-hint {
    color: var(--text-muted);
    font-size: 15px;
    margin-bottom: 16px;
}

.size-limit-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #f1f5f9;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    color: #475569;
}

/* Queue List View */
.queue-container {
    text-align: left;
}

.queue-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
    font-weight: 600;
}

.format-select {
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    font-size: 14px;
    background: white;
    font-weight: 600;
    color: var(--primary-color);
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 40%;
}

.file-icon {
    font-size: 24px;
    color: var(--primary-color);
}

.file-name {
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.file-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge.ready { background: #e0f2fe; color: #0369a1; }
.status-badge.converting { background: #fef3c7; color: #b45309; }
.status-badge.done { background: #dcfce7; color: #15803d; }

.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
}

.btn-icon:hover {
    color: #ef4444;
    background: #fee2e2;
}

.queue-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 24px;
}

/* Tools Section (Matching user screenshot list) */
.tools-grid-section {
    padding: 60px 0;
    background-color: #ffffff;
    border-top: 1px solid var(--border-color);
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
}

.section-subtitle {
    color: var(--text-muted);
    margin-bottom: 48px;
}

.grid-two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.category-card {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-sm);
}

.category-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.category-header h3 {
    font-size: 20px;
    font-weight: 700;
}

.category-icon {
    font-size: 22px;
    color: var(--primary-color);
}

.links-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.tool-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #1f2937;
    font-weight: 500;
    font-size: 15px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    transition: all 0.15s;
}

.tool-link:hover {
    background-color: var(--primary-light);
    color: var(--primary-color);
    transform: translateX(3px);
}

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

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

/* Features Highlight */
.features-section {
    padding: 60px 0;
    background-color: var(--bg-light);
}

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

.feature-item {
    background: white;
    padding: 30px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    text-align: center;
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-light);
    color: var(--primary-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 20px;
}

/* Modals */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 500px;
    padding: 24px;
    box-shadow: var(--shadow-md);
}

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

.close-modal {
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
}

.form-input {
    width: 100%;
    padding: 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    margin-top: 10px;
    font-size: 14px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

/* Footer */
.footer {
    background-color: #ffffff;
    border-top: 1px solid var(--border-color);
    padding: 30px 0;
}

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

.footer-brand p {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 6px;
}

.footer-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 14px;
    margin-left: 20px;
}

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

/* Responsive */
@media (max-width: 768px) {
    .grid-two-columns, .features-grid, .links-list {
        grid-template-columns: 1fr;
    }
    .header-container {
        flex-direction: column;
        height: auto;
        padding: 15px;
        gap: 15px;
    }
    .hero-title {
        font-size: 28px;
    }
    .split-btn-container {
        width: 100%;
    }
    .btn-split-main {
        flex: 1;
    }
}
