:root {
    /* Color Palette - Premium Dark Mode */
    --bg-dark: #0f172a;
    --bg-sidebar: #1e293b;
    --bg-card: #1e293b;
    --accent: #6366f1;
    --accent-hover: #4f46e5;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: #334155;
    --success: #10b981;
    --danger: #ef4444;
    --glass: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] {
    --bg-dark: #f1f5f9;
    --bg-sidebar: #ffffff;
    --bg-card: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --glass: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow: hidden;
    height: 100vh;
    transition: var(--transition);
}

.app-container {
    display: flex;
    height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    width: 320px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    z-index: 1000;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.1);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.logo-container i {
    font-size: 2rem;
    color: var(--accent);
}

.logo-container h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.settings-scroll-area {
    flex: 1;
    overflow-y: auto;
    padding-right: 0.5rem;
}

/* Custom Scrollbar */
.settings-scroll-area::-webkit-scrollbar {
    width: 4px;
}

.settings-scroll-area::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}

.setting-group {
    margin-bottom: 2rem;
}

.setting-group h3 {
    font-size: 0.875rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.setting-item {
    margin-bottom: 1.25rem;
}

.setting-item label {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.setting-item input[type="text"],
.setting-item input[type="number"],
.setting-item select {
    width: 100%;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    outline: none;
    transition: var(--transition);
}

.setting-item input:focus,
.setting-item select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.input-row {
    display: flex;
    gap: 0.5rem;
}

.toggle-group {
    display: flex;
    gap: 0.5rem;
}

.toggle-btn {
    flex: 1;
    cursor: pointer;
}

.toggle-btn input {
    display: none;
}

.toggle-btn span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.6rem;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.toggle-btn input:checked+span {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* Range Slider */
input[type="range"] {
    width: 100%;
    accent-color: var(--accent);
}

/* Toggle Switch */
.has-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 22px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border);
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--accent);
}

input:checked+.slider:before {
    transform: translateX(22px);
}

/* Main Content Area */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
}

.topbar {
    height: 70px;
    min-height: 70px;
    padding: 0 2rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--glass);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 500;
}

/* Quick Tools Bar */
.quick-tools-bar {
    background: transparent;
    border-bottom: 1px dashed var(--border);
    padding: 0.75rem 2rem;
    overflow-x: auto;
    scrollbar-width: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
}

.quick-tools-bar::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar Chrome/Safari */
}

.quick-tools-inner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: max-content;
}

.quick-btn {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 0.5rem 1rem;
    border-radius: 99px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    white-space: nowrap;
}

.quick-btn:hover {
    background: var(--border);
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-1px);
}

.quick-btn.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.quick-btn i {
    font-size: 1.1rem;
}

.tool-divider {
    width: 1px;
    height: 24px;
    background: var(--border);
    margin: 0 0.5rem;
}

.mt-10 {
    margin-top: 10px;
}

/* Buttons */
.btn {
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--accent);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
}

.btn-outline:hover {
    background: var(--bg-dark);
}

.btn-success {
    background-color: var(--success);
    color: white;
}

.btn-success:hover {
    background-color: #059669;
    transform: translateY(-2px);
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.icon-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.icon-btn:hover {
    background: var(--bg-dark);
    border-color: var(--accent);
}

/* Dropzone */
.dropzone {
    margin: 2rem;
    min-height: 400px;
    border: 2px dashed var(--border);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding-top: 60px;
    transition: var(--transition);
    background: var(--bg-dark);
}

.dropzone.dragover {
    border-color: var(--accent);
    background: rgba(99, 102, 241, 0.05);
}

.dropzone-content {
    text-align: center;
}

.drop-icon {
    font-size: 4rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.dropzone h3 {
    margin-bottom: 0.5rem;
}

.dropzone p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.formats-info {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* Image Grid */
.image-grid {
    padding: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.image-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    transition: var(--transition);
}

.image-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.preview-container {
    height: 150px;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.preview-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.status-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    display: none;
}

.image-info {
    padding: 1rem;
}

.img-name {
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.img-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: block;
    margin-top: 0.25rem;
}

.remove-img {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.image-card:hover .remove-img {
    opacity: 1;
}

/* Toasts */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    background: var(--bg-card);
    border-left: 4px solid var(--accent);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideIn 0.3s ease-out forwards;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.stat-box {
    background: var(--bg-dark);
    padding: 0.75rem 0.5rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid var(--border);
}

.stat-box span {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent);
}

.stat-box label {
    display: block;
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-top: 0.25rem;
}

/* Features Showcase */
.features-showcase {
    padding: 6rem 2rem;
    background: var(--bg-dark);
    border-top: 1px solid var(--border);
}

.features-container {
    max-width: 1100px;
    margin: 0 auto;
}

.badge-mini {
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent);
    padding: 4px 16px;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    display: inline-block;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.section-header {
    text-align: center;
    margin-bottom: 5rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--text-main);
    letter-spacing: -1px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.15rem;
    line-height: 1.8;
    max-width: 700px;
    margin: 0 auto;
}

.features-grid-main {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.feature-card-main {
    background: var(--bg-sidebar);
    padding: 4rem 2.5rem;
    border-radius: 32px;
    border: 1px solid var(--border);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    position: relative;
    z-index: 1;
}

.feature-card-main:hover {
    transform: translateY(-12px);
    border-color: var(--accent);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

.feature-icon-main {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(99, 102, 241, 0.05));
    color: var(--accent);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    font-size: 2.5rem;
    transition: var(--transition);
}

.feature-card-main:hover .feature-icon-main {
    transform: scale(1.1) rotate(5deg);
    background: var(--accent);
    color: white;
}

.feature-card-main h3 {
    font-size: 1.5rem;
    color: var(--text-main);
    margin-bottom: 1.25rem;
    font-weight: 700;
}

.feature-card-main p {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.7;
}

.mt-10 {
    margin-top: 10px;
}

/* Professional SEO & Info Section */
.seo-content-area {
    padding: 6rem 2rem;
    background: var(--bg-dark);
    color: var(--text-main);
    border-top: 1px solid var(--border);
}

.seo-container {
    max-width: 1100px;
    margin: 0 auto;
}

.seo-header {
    text-align: center;
    margin-bottom: 5rem;
}

.seo-header h2 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #fff, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

.lead {
    font-size: 1.25rem;
    color: var(--text-muted);
    line-height: 1.8;
    max-width: 850px;
    margin: 0 auto;
}

.seo-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    margin-bottom: 6rem;
}

.seo-feature {
    background: var(--bg-sidebar);
    padding: 3rem 2rem;
    border-radius: 24px;
    border: 1px solid var(--border);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.seo-feature::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--accent);
    opacity: 0;
    transition: var(--transition);
}

.seo-feature:hover {
    border-color: var(--accent);
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.seo-feature:hover::after {
    opacity: 1;
}

.feature-icon {
    font-size: 3rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
}

.seo-feature h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.seo-feature p {
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 1rem;
}

.seo-details-row {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 6rem;
    align-items: start;
    padding-top: 4rem;
    border-top: 1px solid var(--border);
}

.seo-text-block h3,
.seo-faq-block h3 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    font-weight: 700;
}

.spec-list {
    list-style: none;
    margin-top: 2rem;
}

.spec-list li {
    padding: 0.75rem 0;
    font-size: 1.05rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.spec-list li::before {
    content: "\eb52";
    /* box-icons check */
    font-family: 'boxicons';
    color: var(--success);
    font-size: 1.4rem;
}

.faq-item {
    margin-bottom: 2.5rem;
}

.faq-item h4 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    color: var(--accent);
    font-weight: 600;
}

.faq-item p {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.7;
}

@media (max-width: 1000px) {
    .seo-details-row {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

.hidden {
    display: none !important;
}

.hint {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Professional Footer Styling */
.app-footer {
    background: var(--bg-sidebar);
    padding: 6rem 2rem 3rem;
    border-top: 1px solid var(--border);
    margin-top: auto;
}

.footer-container {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 2fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-brand .logo-container {
    margin-bottom: 1.5rem;
}

.footer-brand .logo-container span {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
}

.footer-brand p {
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 1rem;
    max-width: 300px;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.link-group h4 {
    color: var(--text-main);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.link-group h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--accent);
}

.link-group ul {
    list-style: none;
}

.link-group ul li {
    margin-bottom: 0.75rem;
}

.link-group ul li a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    transition: var(--transition);
    cursor: pointer;
}

.link-group ul li a:hover {
    color: var(--accent);
    padding-left: 5px;
}

.footer-bottom {
    max-width: 1100px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .footer-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .footer-links {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}