:root {
    --bg: #f8fafc;
    --text-main: #1e293b;
    --text-muted: #475569;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --card: #ffffff;
    --border: #e2e8f0;
    --danger: #ef4444;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
    background-color: var(--bg);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.65;
}

/* Top Navbar */
.navbar {
    background: var(--card);
    padding: 14px 24px;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-inner {
    max-width: 1040px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.brand-logo {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-nav {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    align-items: center;
}

.top-nav a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.top-nav a:hover, .top-nav a.active {
    color: var(--primary);
}

/* Tool Container */
.container {
    max-width: 880px;
    margin: 0 auto;
    padding: 36px 20px 20px;
    width: 100%;
}

.header {
    text-align: center;
    margin-bottom: 28px;
}

.header h1 {
    color: var(--primary);
    font-size: 30px;
    margin: 0 0 10px 0;
}

.header p {
    color: var(--text-muted);
    font-size: 16px;
    margin: 0 auto;
    max-width: 680px;
}

.security-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #dcfce7;
    color: #166534;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    margin-top: 12px;
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border);
    padding-bottom: 10px;
    justify-content: center;
}

.tab-btn {
    background: none;
    border: none;
    padding: 11px 24px;
    font-size: 16px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
}

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

.tab-btn.active {
    color: var(--primary);
    background: #dbeafe;
}

.panel {
    display: none;
    background: var(--card);
    padding: 32px;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.07);
}

.panel.active {
    display: block;
}

.panel h2 {
    margin-top: 0;
    color: #0f172a;
    font-size: 21px;
}

.file-drop-area {
    border: 2px dashed #93c5fd;
    border-radius: 10px;
    padding: 44px 20px;
    text-align: center;
    background: var(--primary-light);
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 20px;
}

.file-drop-area:hover {
    border-color: var(--primary);
    background: #dbeafe;
}

.file-drop-area p {
    margin: 0;
    font-weight: 600;
    color: #1e40af;
}

.file-drop-area input[type="file"] {
    display: none;
}

.btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 13px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    width: 100%;
    margin-top: 10px;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

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

.btn:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}

.file-list {
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
}

.file-list li {
    padding: 10px 14px;
    background: #f8fafc;
    border: 1px solid var(--border);
    margin-bottom: 6px;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
}

.input-group {
    margin-bottom: 16px;
}

.input-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #334155;
}

.input-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 15px;
}

#status-msg {
    margin-top: 16px;
    text-align: center;
    font-weight: 700;
    min-height: 24px;
}

/* SEO & Documentation Sections */
.seo-container {
    max-width: 960px;
    margin: 20px auto 48px;
    padding: 0 20px;
    width: 100%;
}

.seo-section {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 36px;
    margin-bottom: 28px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}

.seo-section h2 {
    color: #0f172a;
    font-size: 23px;
    margin-top: 0;
    margin-bottom: 16px;
    border-bottom: 2px solid var(--primary-light);
    padding-bottom: 10px;
}

.seo-section h3 {
    color: var(--primary-hover);
    font-size: 18px;
    margin-top: 22px;
    margin-bottom: 8px;
}

.seo-section p, .seo-section li {
    color: var(--text-muted);
}

.seo-section ul, .seo-section ol {
    padding-left: 22px;
    margin-bottom: 16px;
}

.seo-section li {
    margin-bottom: 8px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.feature-card {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
}

.feature-card h3 {
    margin-top: 0;
    color: #0f172a;
    font-size: 17px;
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 14px;
}

.compare-table th, .compare-table td {
    border: 1px solid var(--border);
    padding: 12px 14px;
    text-align: left;
}

.compare-table th {
    background: #f1f5f9;
    color: #0f172a;
    font-weight: 700;
}

.faq-item {
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
}

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

.faq-item h3 {
    margin: 0 0 8px 0;
    color: #0f172a;
    font-size: 17px;
}

.faq-item p {
    margin: 0;
}

/* Subpages */
.page-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
    flex: 1;
    width: 100%;
}

.paper-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 44px 48px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

.paper-card h1 {
    font-size: 30px;
    color: #0f172a;
    margin-top: 0;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border);
    padding-bottom: 12px;
}

.paper-card h2 {
    font-size: 21px;
    color: var(--primary-hover);
    margin-top: 28px;
    margin-bottom: 12px;
}

/* Footer */
.site-footer {
    background: #0f172a;
    color: #cbd5e1;
    padding: 40px 24px 28px;
    margin-top: auto;
}

.footer-inner {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-items: center;
    text-align: center;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.footer-links a {
    color: #e2e8f0;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.footer-links a:hover {
    color: #60a5fa;
    text-decoration: underline;
}

.footer-copy {
    font-size: 13px;
    color: #94a3b8;
}

@media (max-width: 768px) {
    .panel, .seo-section, .paper-card {
        padding: 24px 20px;
    }
}
