﻿/* ==========================================================================
   PNG to WEBP Converter - Premium Dark CSS Styles
   Author: WebVK
   ========================================================================== */

/* --- Design Tokens --- */
: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;

    /* Theme colors (Sleek Dark Theme by default) */
    --bg-app: #0e0f12;
    --bg-surface: #17191e;
    --bg-surface-alt: #1f222a;
    --bg-header: rgba(14, 15, 18, 0.85);
    
    --border-color: #2b2f3a;
    --border-color-hover: #3e4454;
    
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --text-light: #6b7280;
    
    /* Crimson/Red-orange branding */
    --primary: #c22f36;
    --primary-hover: #a52329;
    --primary-light: #3d1517;
    
    --accent: #d32f2f;
    --accent-hover: #b71c1c;
    --accent-light: rgba(211, 47, 47, 0.1);
    
    --success: #10b981;
    --success-hover: #059669;
    --success-light: rgba(16, 185, 129, 0.1);

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.5);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.5), 0 2px 4px -1px rgba(0,0,0,0.3);
    --shadow-lg: 0 10px 20px -3px rgba(0, 0, 0, 0.6), 0 4px 10px -2px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 25px rgba(194, 47, 54, 0.25);
    
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Base Reset --- */
* {
    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;
    overflow-x: hidden;
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--border-color-hover);
}

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

/* --- Header --- */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 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-link {
    text-decoration: none;
    display: inline-block;
}

.brand-badge {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #ffffff;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 50px;
    box-shadow: var(--shadow-sm);
    font-family: var(--font-heading);
}

.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.15rem;
    font-weight: 700;
    color: #ffffff;
}

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

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

.nav-item-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
}
.nav-item-link:hover {
    color: #ffffff;
    border-color: var(--border-color-hover);
    background-color: var(--bg-surface);
}

/* --- Buttons --- */
.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: 6px 14px;
    font-size: 0.82rem;
    border-radius: var(--radius-sm);
}

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

.btn-primary {
    background-color: var(--primary);
    color: #ffffff;
}
.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

.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);
    border-color: var(--border-color-hover);
}

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

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

/* --- Hero Section --- */
.hero-section {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
    gap: 40px;
    padding: 50px 0;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
    margin-bottom: 15px;
}

.hero-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Conversion Graphic */
.conversion-badge-graphic {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-md);
}

.badge-icon {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.2rem;
    background-color: var(--bg-surface-alt);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.badge-icon.badge-accent {
    border-color: var(--primary);
    background-color: var(--primary-light);
    color: #ffffff;
    box-shadow: var(--shadow-glow);
}

.badge-connector {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.connect-icon {
    width: 22px;
    height: 22px;
    color: var(--text-muted);
}

.connect-text {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--text-light);
}

/* --- Interactive Uploader dropzone --- */
.uploader-container {
    margin-bottom: 50px;
}

/* Drop-zone as a high-contrast white card */
.drop-zone {
    background-color: #ffffff;
    color: #1f2937;
    border: 2px dashed #cbd5e1;
    border-radius: var(--radius-lg);
    padding: 50px 30px;
    text-align: center;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-normal);
}
.drop-zone:hover, .drop-zone.dragover {
    border-color: var(--primary);
    background-color: #f8fafc;
}

.drop-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.upload-icon-wrapper {
    background-color: #fee2e2;
    color: var(--primary);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}
.upload-icon-main {
    width: 30px;
    height: 30px;
}

.drop-zone h2 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 4px;
}
.drop-zone p {
    font-size: 0.95rem;
    color: #64748b;
    margin-bottom: 24px;
}

.btn-select {
    padding: 12px 28px;
    font-size: 0.98rem;
    border-radius: var(--radius-md);
}

.uploader-limits {
    display: block;
    margin-top: 15px;
    font-size: 0.78rem;
    color: #94a3b8;
}

/* Settings Options Panel */
.settings-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-top: 25px;
    box-shadow: var(--shadow-sm);
}

.settings-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}
.settings-icon {
    width: 20px;
    height: 20px;
    color: var(--primary);
}
.settings-header h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
}

.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.setting-item {
    display: flex;
    flex-direction: column;
}

.setting-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}
.setting-label-row label {
    font-weight: 600;
    font-size: 0.9rem;
    color: #ffffff;
}

.setting-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.badge-value {
    background-color: var(--primary-light);
    color: #ffffff;
    border: 1px solid var(--primary);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 50px;
}

/* Custom range slider */
.slider-container input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--border-color);
    outline: none;
}
.slider-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(194, 47, 54, 0.4);
    transition: transform 0.1s;
}
.slider-container input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

/* Custom checkbox */
.custom-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff;
    gap: 8px;
}
.custom-checkbox input {
    display: none;
}
.checkbox-box {
    width: 16px;
    height: 16px;
    border: 2px solid var(--border-color-hover);
    border-radius: 4px;
    display: inline-block;
    position: relative;
    flex-shrink: 0;
}
.custom-checkbox input:checked + .checkbox-box {
    background-color: var(--primary);
    border-color: var(--primary);
}
.checkbox-box::after {
    content: '';
    position: absolute;
    width: 3px;
    height: 7px;
    border: solid white;
    border-width: 0 2px 2px 0;
    top: 1px;
    left: 4px;
    transform: rotate(45deg) scale(0);
    transition: transform var(--transition-fast);
}
.custom-checkbox input:checked + .checkbox-box::after {
    transform: rotate(45deg) scale(1);
}

.resize-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 10px;
    opacity: 0.4;
    transition: opacity var(--transition-fast);
}
.resize-inputs.active {
    opacity: 1;
}

.input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.input-wrapper label {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.input-wrapper input {
    height: 36px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background-color: var(--bg-surface-alt);
    color: #ffffff;
    padding: 0 10px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    outline: none;
}
.input-wrapper input:focus {
    border-color: var(--primary);
}

/* Files List Card */
.files-list-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-top: 25px;
    box-shadow: var(--shadow-sm);
}

.files-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.files-header h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
}

.table-container {
    overflow-x: auto;
    margin-bottom: 20px;
}

.files-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    text-align: left;
}

.files-table th {
    color: var(--text-light);
    font-weight: 600;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-color);
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.5px;
}

.files-table td {
    padding: 14px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
    vertical-align: middle;
}

.file-name-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 300px;
    font-weight: 500;
}
.file-icon {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    flex-shrink: 0;
}
.file-name-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Progress styles */
.progress-container-cell {
    width: 160px;
}
.progress-bar-bg {
    background-color: var(--bg-surface-alt);
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}
.progress-bar-fill {
    height: 100%;
    width: 0%;
    background-color: var(--primary);
    transition: width var(--transition-fast);
}
.status-text {
    font-size: 0.78rem;
    font-weight: 600;
    margin-top: 4px;
    display: block;
}
.status-text.text-converting { color: var(--accent); }
.status-text.text-completed { color: var(--success); }
.status-text.text-queued { color: var(--text-light); }

/* Savings Badge */
.savings-badge {
    background-color: var(--success-light);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.78rem;
    display: inline-block;
}

.btn-cell-action {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
}
.btn-cell-action:hover {
    color: var(--danger);
}
.btn-cell-download {
    color: var(--success);
}
.btn-cell-download:hover {
    color: #ffffff;
    background-color: var(--success);
}

.batch-actions-bar {
    display: flex;
    justify-content: flex-end;
    gap: 14px;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

/* --- SEO & FAQ section --- */
.seo-info-section {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-sm);
}

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

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

.features-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.feature-item {
    display: flex;
    gap: 15px;
}

.feature-bullet {
    background-color: var(--primary-light);
    color: var(--primary);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.feature-bullet i {
    width: 16px;
    height: 16px;
}

.feature-body h4 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 2px;
}
.feature-body p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

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

/* Accordions */
.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;
}

/* --- Footer --- */
.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 --- */
.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-info {
    border-left: 4px solid var(--primary);
}
.toast-info i {
    color: var(--primary);
}

.toast-danger {
    border-left: 4px solid var(--primary);
}
.toast-danger i {
    color: var(--primary);
}

@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;
    }
}

/* --- Responsive Adjustments --- */
@media (max-width: 900px) {
    .hero-section {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
        padding: 30px 0;
    }
    .conversion-badge-graphic {
        margin: 0 auto;
        max-width: 380px;
    }
    .settings-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .info-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 600px) {
    .app-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    .drop-zone {
        padding: 30px 15px;
    }
    .drop-zone h2 {
        font-size: 1.15rem;
    }
    .resize-inputs {
        grid-template-columns: 1fr;
    }
    .files-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    .batch-actions-bar {
        flex-direction: column;
    }
    .btn {
        width: 100%;
    }
    .footer-content {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

/* Nav dropdown styles added */
.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;
}
