﻿/* Shared PDF style template */
:root {
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: 'Fira Code', 'Courier New', Courier, monospace;

    --bg-app: #12161a;
    --bg-surface: #1e242b;
    --bg-surface-alt: #242d36;
    --bg-header: rgba(18, 22, 26, 0.85);
    
    --border-color: #2e3b48;
    --border-color-hover: #3e4f60;
    --border-color-focus: #e11d48;
    
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --text-light: #64748b;
    
    --primary: #e11d48;
    --primary-hover: #be123c;
    --primary-light: rgba(225, 29, 72, 0.15);
    
    --success: #10b981;
    --success-hover: #059669;
    --success-light: rgba(16, 185, 129, 0.15);
    
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.4), 0 2px 4px -1px rgba(0,0,0,0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 20px rgba(225, 29, 72, 0.25);
    
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    
    --transition-fast: 0.12s ease;
    --transition-normal: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
    --bg-app: #f4f6f8;
    --bg-surface: #ffffff;
    --bg-surface-alt: #f8fafc;
    --bg-header: rgba(244, 246, 248, 0.85);
    
    --border-color: #cbd5e1;
    --border-color-hover: #94a3b8;
    --border-color-focus: #e11d48;
    
    --text-main: #0f172a;
    --text-muted: #475569;
    --text-light: #64748b;
    
    --primary-light: #fff1f2;
    --success-light: #d1fae5;
    
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
    --shadow-glow: 0 0 20px rgba(225, 29, 72, 0.15);
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-app);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color var(--transition-normal);
}

.app-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background-color: var(--bg-header);
    backdrop-filter: blur(12px);
    z-index: 100;
}

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

.brand-logo {
    height: 52px;
    width: auto;
    border-radius: var(--radius-sm);
    display: block;
    background-color: #ffffff;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    padding: 1px;
}

.logo-separator {
    color: var(--text-light);
    font-weight: 600;
}

.logo-tool-name {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 800;
}

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

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

.nav-item-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
    cursor: pointer;
    background: transparent;
    outline: none;
}
.nav-item-link:hover {
    color: var(--text-main);
    border-color: var(--border-color-hover);
    background-color: var(--bg-surface-alt);
}

.nav-dropdown {
    position: relative;
    display: inline-block;
}

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

.dropdown-chevron {
    width: 14px;
    height: 14px;
}

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    width: 200px;
    max-height: 280px;
    overflow-y: auto;
    z-index: 500;
}

.dropdown-item-link {
    color: var(--text-muted);
    text-decoration: none;
    display: block;
    padding: 10px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all var(--transition-fast);
}
.dropdown-item-link:hover {
    color: var(--text-main);
    background-color: var(--bg-surface-alt);
}

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

.hero-section {
    padding: 40px 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 2.6rem;
    font-weight: 800;
    color: var(--text-main);
}

.hero-subtitle {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 650px;
    margin: 8px auto 0 auto;
}

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

.format-badge {
    padding: 8px 20px;
    border-radius: var(--radius-md);
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-md);
}

.format-input-badge {
    background-color: #6366f1;
    color: #ffffff;
}
.format-output-badge {
    background-color: #10b981;
    color: #ffffff;
}

.format-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-light);
}
.format-arrow i {
    width: 20px;
    height: 20px;
}
.arrow-text {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-top: 2px;
}

.converter-workspace {
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.uploader-card {
    background-color: #ffffff;
    border: 3px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 45px 20px;
    text-align: center;
    cursor: pointer;
    box-shadow: var(--shadow-md);
}
[data-theme="dark"] .uploader-card {
    background-color: #1a2026;
}

.uploader-inner {
    max-width: 450px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.uploader-icon-bg {
    background-color: var(--primary-light);
    color: var(--primary);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.uploader-icon {
    width: 32px;
    height: 32px;
}

.uploader-card h3 {
    color: #0f172a;
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
}
[data-theme="dark"] .uploader-card h3 {
    color: #f1f5f9;
}

.uploader-sub {
    color: #64748b;
    font-size: 0.9rem;
}

.queue-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
}

.queue-header h3 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 16px;
}

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

.queue-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background-color: var(--bg-surface-alt);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    gap: 16px;
}

.item-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1.3;
}

.item-icon {
    color: var(--text-light);
}

.item-details {
    min-width: 0;
}
.item-name {
    font-size: 0.9rem;
    font-weight: 600;
    word-break: break-all;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}
.item-meta {
    font-size: 0.75rem;
    color: var(--text-light);
    display: flex;
    gap: 8px;
    align-items: center;
}
.meta-input-ext {
    background-color: var(--border-color);
    color: var(--text-main);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    text-transform: uppercase;
}

.item-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 100px;
}

.progress-track {
    width: 100%;
    height: 6px;
    background-color: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background-color: var(--primary);
    width: 0%;
    transition: width 0.15s ease;
}
.progress-fill.success {
    background-color: var(--success);
}

.progress-text {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-light);
    text-align: right;
}

.item-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all var(--transition-fast);
    gap: 8px;
    outline: none;
    text-decoration: none;
}

.btn-sm {
    padding: 5px 12px;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
    border-radius: var(--radius-md);
}

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

.btn-secondary {
    background-color: var(--bg-surface-alt);
    border-color: var(--border-color);
    color: var(--text-main);
}
.btn-secondary:hover {
    background-color: var(--border-color);
}

.btn-success {
    background-color: var(--success);
    color: #ffffff;
}
.btn-success:hover {
    background-color: var(--success-hover);
}

.btn-icon {
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 50%;
    border-color: var(--border-color);
    background-color: var(--bg-surface);
    color: var(--text-muted);
}
.btn-icon:hover {
    color: var(--text-main);
    border-color: var(--border-color-hover);
}

.btn-icon-sm {
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: var(--radius-sm);
    border-color: var(--border-color);
    background-color: var(--bg-surface-alt);
    color: var(--text-muted);
}
.btn-icon-sm:hover {
    color: var(--text-main);
    border-color: var(--border-color-hover);
}

.btn-glow {
    box-shadow: var(--shadow-glow);
}

.control-actions-panel {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.actions-right {
    display: flex;
    gap: 10px;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

.seo-content-section {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 30px;
    margin-bottom: 40px;
}

.seo-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
}

.seo-guide h2 {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 800;
    margin-bottom: 12px;
}
.seo-guide > p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 24px;
}

.bullet-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.bullet-item {
    display: flex;
    gap: 15px;
}
.bullet-num {
    background-color: var(--primary-light);
    color: var(--primary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.bullet-body h4 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 3px;
}
.bullet-body p {
    font-size: 0.88rem;
    color: var(--text-muted);
}

.seo-faqs h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 20px;
}

.accordion {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.accordion-item {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}
.accordion-trigger {
    width: 100%;
    padding: 16px 20px;
    background: var(--bg-surface-alt);
    border: none;
    outline: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    font-family: var(--font-body);
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-main);
    gap: 15px;
}
.accordion-trigger:hover {
    background-color: var(--border-color);
}
.accordion-arrow {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    transition: transform var(--transition-normal);
}
.accordion-item.active .accordion-arrow {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-normal);
    background-color: var(--bg-surface);
}
.accordion-content p {
    padding: 16px 20px;
    font-size: 0.88rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
}
.accordion-item.active .accordion-content {
    max-height: 200px;
}

.app-footer {
    border-top: 1px solid var(--border-color);
    padding: 24px 0;
    margin-top: auto;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.footer-brand {
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}
.footer-brand:hover {
    text-decoration: underline;
}
.footer-links {
    display: flex;
    align-items: center;
    gap: 12px;
}
.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
}
.footer-links a:hover {
    color: var(--text-main);
    text-decoration: underline;
}

.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 2000;
}
.toast {
    background-color: var(--bg-surface);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-md);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    animation: toast-slide-in 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    min-width: 240px;
}
.toast-success {
    border-left: 4px solid var(--success);
}
.toast-success i {
    color: var(--success);
}
.toast-danger {
    border-left: 4px solid var(--danger);
}
.toast-danger i {
    color: var(--danger);
}

@keyframes toast-slide-in {
    from {
        transform: translateY(20px) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}
.toast-fade-out {
    animation: toast-slide-out 0.25s ease forwards;
}
@keyframes toast-slide-out {
    to {
        transform: translateY(10px);
        opacity: 0;
    }
}

@media (max-width: 900px) {
    .seo-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 700px) {
    .queue-item {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .item-right {
        justify-content: flex-end;
    }
}

@media (max-width: 600px) {
    .app-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    .header-actions {
        width: 100%;
        justify-content: space-between;
    }
    .hero-title {
        font-size: 2.1rem;
    }
    .control-actions-panel {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    .actions-right {
        flex-direction: column;
    }
    .btn {
        width: 100%;
    }
    .footer-content {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}
