/*
Theme Name: ConvertPro
Theme URI: https://example.com
Author: Your Name
Description: Client-side image format converter theme with clean URLs.
Version: 1.1
License: GNU General Public License v2 or later
Text Domain: convertpro
*/

:root {
    --ink: #0a0a0f;
    --ink-soft: #1a1a24;
    --surface: #ffffff;
    --surface-alt: #f7f7fb;
    --border: rgba(10,10,15,0.08);
    --border-strong: rgba(10,10,15,0.15);
    --muted: #6b7280;
    --muted-soft: #9ca3af;
    --lime: #c4f000;
    --lime-dark: #a8d100;
    --violet: #7c3aed;
    --pink: #f472b6;
    --blue: #3b82f6;
    --red: #ef4444;
    --green: #10b981;
    --radius: 20px;
    --radius-sm: 12px;
    --radius-lg: 28px;
    --shadow-xs: 0 1px 2px rgba(10,10,15,0.04);
    --shadow-sm: 0 2px 8px rgba(10,10,15,0.06);
    --shadow: 0 8px 24px -8px rgba(10,10,15,0.12);
    --shadow-lg: 0 24px 48px -12px rgba(10,10,15,0.18);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--surface-alt);
    color: var(--ink);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    position: relative;
    min-height: 100vh;
}

body.admin-bar .navbar { top: 32px; }
body.admin-bar .sidebar { top: 97px; height: calc(100vh - 97px); }
@media screen and (max-width: 782px) {
    body.admin-bar .navbar { top: 46px; }
}

body::before,
body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.35;
}
body::before {
    width: 500px; height: 500px;
    background: radial-gradient(circle, var(--lime), transparent 70%);
    top: -150px; left: -150px;
    animation: float1 20s ease-in-out infinite;
}
body::after {
    width: 600px; height: 600px;
    background: radial-gradient(circle, var(--violet), transparent 70%);
    bottom: -200px; right: -200px;
    animation: float2 25s ease-in-out infinite;
}
@keyframes float1 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(80px, 40px); }
}
@keyframes float2 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-60px, -50px); }
}

.navbar {
    background: rgba(255,255,255,0.7) !important;
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid var(--border);
    padding: 0.85rem 0;
    position: sticky;
    top: 0;
    z-index: 1030;
}

.navbar-brand {
    font-family: 'Instrument Serif', serif;
    font-weight: 400;
    font-size: 1.75rem;
    color: var(--ink) !important;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    line-height: 1;
}

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: var(--ink);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--lime);
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}
.brand-mark::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 40%, rgba(196,240,0,0.3) 100%);
}

.navbar-toggler {
    border: 1px solid var(--border-strong);
    padding: 0.4rem 0.6rem;
    border-radius: 10px;
}
.navbar-toggler:focus { box-shadow: none; }
.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%230a0a0f' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    width: 20px;
    height: 20px;
}

.navbar-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--ink);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    text-decoration: none;
    transition: all 0.2s;
}
.navbar-cta:hover {
    color: var(--lime);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(10,10,15,0.25);
}
.navbar-cta .dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--lime);
    box-shadow: 0 0 8px var(--lime);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.app-shell {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: calc(100vh - 65px);
}

.sidebar {
    width: 260px;
    flex-shrink: 0;
    background: rgba(255,255,255,0.6);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border);
    padding: 1.75rem 1rem;
    position: sticky;
    top: 65px;
    height: calc(100vh - 65px);
    overflow-y: auto;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }

.sidebar-label {
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted-soft);
    font-weight: 700;
    padding: 0 0.75rem;
    margin-bottom: 0.75rem;
}

.nav-link.route-link {
    display: flex;
    align-items: center;
    color: #4b5563;
    border-radius: var(--radius-sm);
    margin-bottom: 0.15rem;
    padding: 0.6rem 0.75rem;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.18s ease;
    position: relative;
}
.nav-link.route-link i {
    width: 22px;
    font-size: 0.85rem;
    color: var(--muted-soft);
    transition: color 0.18s;
}
.nav-link.route-link:hover {
    background: rgba(10,10,15,0.04);
    color: var(--ink);
}
.nav-link.route-link:hover i { color: var(--ink); }

.nav-link.route-link.active {
    background: var(--ink);
    color: var(--lime);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}
.nav-link.route-link.active i { color: var(--lime); }

.nav-link.route-link.active::after {
    content: '';
    position: absolute;
    right: 0.75rem;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--lime);
    box-shadow: 0 0 8px var(--lime);
}

.main-content {
    flex: 1;
    padding: 2.5rem 2rem;
    min-width: 0;
}

.page-header {
    text-align: center;
    margin-bottom: 2rem;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink);
    background: var(--lime);
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    margin-bottom: 1rem;
}

.page-header h1 {
    font-family: 'Instrument Serif', serif;
    font-weight: 400;
    font-size: clamp(2rem, 5vw, 3.25rem);
    letter-spacing: -0.02em;
    line-height: 1.05;
    color: var(--ink);
    margin-bottom: 0.85rem;
}
.page-header h1 em {
    font-style: italic;
    background: linear-gradient(135deg, var(--violet), var(--pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-header p {
    color: var(--muted);
    font-size: 0.95rem;
    max-width: 540px;
    margin: 0 auto;
    line-height: 1.6;
}

.upload-zone {
    background: var(--surface);
    border: 2px dashed var(--border-strong);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}
.upload-zone::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(196,240,0,0.15), transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}
.upload-zone:hover {
    border-color: var(--ink);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}
.upload-zone:hover::before { opacity: 1; }

.upload-zone.dragover {
    border-color: var(--lime-dark);
    border-style: solid;
    background: linear-gradient(180deg, #fff, #fbffea);
    transform: scale(1.01);
    box-shadow: 0 0 0 6px rgba(196,240,0,0.25);
}

.upload-icon-wrap {
    width: 88px;
    height: 88px;
    margin: 0 auto 1.5rem;
    border-radius: 26px;
    background: var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: transform 0.3s;
    box-shadow: 0 12px 32px rgba(10,10,15,0.2);
}
.upload-icon-wrap::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 30px;
    background: linear-gradient(135deg, var(--lime), var(--violet), var(--pink));
    z-index: -1;
    opacity: 0.6;
    filter: blur(8px);
}
.upload-zone:hover .upload-icon-wrap {
    transform: scale(1.08) rotate(-4deg);
}
.upload-icon {
    font-size: 2rem;
    color: var(--lime);
}

.upload-zone h4 {
    font-family: 'Instrument Serif', serif;
    font-weight: 400;
    font-size: 1.5rem;
    margin-bottom: 0.4rem;
    color: var(--ink);
    letter-spacing: -0.01em;
}
.upload-zone .hint {
    color: var(--muted);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.btn {
    font-weight: 600;
    letter-spacing: -0.01em;
    transition: all 0.18s ease;
    border: none;
}

.btn-ink {
    background: var(--ink);
    color: #fff;
    padding: 0.75rem 1.75rem;
    border-radius: 999px;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(10,10,15,0.25);
}
.btn-ink:hover {
    color: var(--lime);
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(10,10,15,0.35);
}
.btn-ink i { margin-right: 0.4rem; }

.btn-lime {
    background: var(--lime);
    color: var(--ink);
    border-radius: 999px;
    padding: 0.55rem 1.15rem;
    font-size: 0.82rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(196,240,0,0.4);
}
.btn-lime:hover {
    background: var(--lime-dark);
    color: var(--ink);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(196,240,0,0.5);
}

.btn-ghost {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.9rem;
    font-size: 0.82rem;
    font-weight: 600;
}
.btn-ghost:hover {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
}

.btn-icon-danger {
    background: transparent;
    color: var(--muted);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    width: 34px; height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 0.85rem;
}
.btn-icon-danger:hover {
    background: rgba(239,68,68,0.1);
    color: var(--red);
    border-color: rgba(239,68,68,0.3);
}

.btn-download {
    background: var(--ink);
    color: var(--lime);
    border-radius: var(--radius-sm);
    padding: 0.5rem 1rem;
    font-size: 0.82rem;
    font-weight: 700;
}
.btn-download:hover {
    background: var(--lime);
    color: var(--ink);
    transform: translateY(-1px);
}

.global-bar {
    background: var(--ink);
    color: #fff;
    border-radius: var(--radius);
    padding: 0.85rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}
.global-bar::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 200px; height: 100%;
    background: radial-gradient(circle at right, rgba(196,240,0,0.2), transparent 70%);
    pointer-events: none;
}

.file-count-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 600;
    font-size: 0.875rem;
    position: relative;
    z-index: 1;
}

.file-count-pill {
    background: var(--lime);
    color: var(--ink);
    min-width: 28px;
    height: 28px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 800;
    padding: 0 0.55rem;
}

.global-bar label {
    color: rgba(255,255,255,0.7) !important;
    font-weight: 500;
}

.file-item {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
    margin-bottom: 0.85rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
    animation: fadeUp 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.file-item:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

.file-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--surface-alt);
    flex-shrink: 0;
}

.file-details {
    flex-grow: 1;
    min-width: 140px;
}
.file-name {
    font-weight: 600;
    margin-bottom: 0.2rem;
    word-break: break-all;
    font-size: 0.9rem;
    color: var(--ink);
}
.file-size {
    font-size: 0.75rem;
    color: var(--muted);
    font-weight: 500;
}

.controls-wrapper {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.format-locked-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--lime);
    color: var(--ink);
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.form-select {
    border-radius: 10px;
    border: 1px solid var(--border-strong);
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--ink);
    padding: 0.4rem 2rem 0.4rem 0.75rem;
    background-color: var(--surface-alt);
    transition: all 0.15s;
    cursor: pointer;
}
.form-select:focus {
    border-color: var(--ink);
    box-shadow: 0 0 0 3px rgba(196,240,0,0.3);
    background-color: #fff;
}

#alert-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1050;
    max-width: 380px;
}
#alert-container .alert {
    border: none;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 0.875rem;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 1rem 1.25rem;
}
@keyframes slideIn {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

.seo-article {
    background: var(--surface);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    margin-top: 3rem;
    line-height: 1.8;
    color: #4b5563;
    box-shadow: var(--shadow-sm);
}
.seo-article h2 {
    font-family: 'Instrument Serif', serif;
    font-weight: 400;
    color: var(--ink);
    font-size: 1.75rem;
    margin-bottom: 0.85rem;
    letter-spacing: -0.01em;
}
.seo-article h2:not(:first-of-type) { margin-top: 2rem; }
.seo-article h3 {
    font-weight: 700;
    color: var(--ink);
    font-size: 1.05rem;
    margin-top: 1.75rem;
    margin-bottom: 0.6rem;
}
.seo-article ul { padding-left: 1.25rem; }
.seo-article li { margin-bottom: 0.4rem; }
.seo-article li strong { color: var(--ink); }

.faq-section-title {
    font-family: 'Instrument Serif', serif;
    font-weight: 400;
    font-size: 2rem;
    text-align: center;
    margin-bottom: 1.75rem;
    letter-spacing: -0.01em;
}
.faq-section-title em {
    font-style: italic;
    background: linear-gradient(135deg, var(--violet), var(--pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.accordion-item {
    border: 1px solid var(--border) !important;
    border-radius: var(--radius) !important;
    margin-bottom: 0.6rem;
    overflow: hidden;
    background: var(--surface);
    transition: border-color 0.2s;
}
.accordion-item:has(.accordion-button:not(.collapsed)) {
    border-color: var(--border-strong) !important;
    box-shadow: var(--shadow-sm);
}
.accordion-button {
    font-weight: 600;
    font-size: 0.95rem;
    padding: 1.15rem 1.5rem;
    background: var(--surface);
    color: var(--ink);
    box-shadow: none !important;
}
.accordion-button:not(.collapsed) {
    color: var(--ink);
    background: var(--surface);
}
.accordion-button::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%230a0a0f'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}
.accordion-body {
    padding: 0 1.5rem 1.25rem;
    line-height: 1.7;
    font-size: 0.9rem;
    color: var(--muted);
}

footer {
    color: var(--muted);
    font-size: 0.85rem;
    padding: 2rem 0 1rem;
    margin-top: 3rem;
    border-top: 1px solid var(--border);
    text-align: center;
}
footer strong { color: var(--ink); font-weight: 700; }

.offcanvas { border-right: none; box-shadow: var(--shadow-lg); }
.offcanvas-header { border-bottom: 1px solid var(--border); padding: 1.25rem 1.5rem; }
.offcanvas-title { font-family: 'Instrument Serif', serif; font-size: 1.5rem; font-weight: 400; }

@media (max-width: 991.98px) {
    .sidebar { display: none; }
    .main-content { padding: 1.75rem 1rem; }
}

@media (max-width: 576px) {
    .page-header h1 { font-size: 2rem; }
    .upload-zone { padding: 2rem 1.25rem; }
    .upload-icon-wrap { width: 68px; height: 68px; border-radius: 20px; }
    .upload-icon { font-size: 1.5rem; }
    .file-item { flex-direction: column; align-items: flex-start; }
    .controls-wrapper { width: 100%; justify-content: space-between; }
    .global-bar { flex-direction: column; align-items: stretch; }
    .seo-article { padding: 1.5rem; }
}
