/* 
   ImgLumina Stylesheet 
   Premium modern design with glassmorphism and micro-animations
*/

:root {
    --primary: #3CB6E2;
    --primary-hover: #2A9BC4;
    --secondary: #f0f0f5;
    --text-dark: #333333;
    --text-light: #666666;
    --bg-light: #f5f5fa;
    --white: #ffffff;
    --border: #e2e4e8;
    
    /* Category Colors */
    --color-optimize: #8FBC5D;
    --color-edit: #3CB6E2;
    --color-convert: #FFD400;
    --color-create: #AB6993;
    
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 24px rgba(0,0,0,0.12);
    --radius-md: 12px;
    --radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Base Buttons */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    border: none;
}

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

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(60, 182, 226, 0.3);
}

.dark-theme .btn-secondary {
    background-color: transparent;
    color: var(--text-dark);
}

.dark-theme .btn-secondary:hover {
    background-color: rgba(0,0,0,0.05);
}

.btn-mega {
    background-color: var(--primary);
    color: var(--white);
    font-size: 20px;
    padding: 20px 48px;
    border-radius: var(--radius-md);
    box-shadow: 0 8px 16px rgba(60, 182, 226, 0.2);
}

.btn-mega:hover {
    background-color: var(--primary-hover);
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(60, 182, 226, 0.3);
}

.btn-action {
    background-color: var(--primary);
    color: var(--white);
    width: 100%;
    padding: 16px;
    font-size: 16px;
    border-radius: 8px;
}

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

/* Header */
.header {
    background-color: var(--white);
    height: 70px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 20px;
    color: var(--text-dark);
}

.logo span {
    letter-spacing: -0.5px;
}



.desktop-nav ul {
    list-style: none;
    display: flex;
    gap: 32px;
}

.dark-theme .desktop-nav a {
    font-weight: 500;
    font-size: 15px;
    color: var(--text-dark);
    opacity: 0.8;
    transition: var(--transition);
    position: relative;
}

.dark-theme .desktop-nav a:hover, .dark-theme .desktop-nav a.active {
    opacity: 1;
    color: var(--primary);
}



/* Mega Menu Styles */
.has-mega-menu {
    position: static; /* so mega menu can span full width */
}

.mega-menu {
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background: var(--white);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1000;
    border-top: 1px solid var(--border);
    transform: translateY(-10px);
}

.has-mega-menu:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mega-menu-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    padding: 40px 20px;
    gap: 30px;
}

.dark-theme .mega-menu-col h3 {
    font-size: 13px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 24px;
    font-weight: 600;
}

.mega-menu-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 0;
}

.mega-menu-col a {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    text-decoration: none;
    opacity: 1;
}

.mega-menu-col a::after {
    display: none; /* Hide the active underline in mega menu */
}

.mega-menu-col a:hover {
    color: var(--primary);
    transform: translateX(3px);
}

.mega-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}


.auth-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
}
.auth-buttons .btn {
    text-align: center;
}
.auth-buttons .btn {
    text-align: center;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-dark);
}

/* Mobile Nav Overlay */
.mobile-nav-overlay {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    height: calc(100vh - 70px);
    background-color: var(--white);
    z-index: 999;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.mobile-nav-overlay.active {
    transform: translateX(0);
}

.mobile-nav ul {
    list-style: none;
    padding: 24px;
}

.mobile-nav li {
    margin-bottom: 24px;
}

.mobile-nav a {
    font-size: 18px;
    font-weight: 500;
    display: block;
}

.auth-li {
    display: flex;
    gap: 16px;
    margin-top: 32px;
    border-top: 1px solid var(--border);
    padding-top: 24px;
}


/* Main Content (Landing) */
.main-content {
    margin-top: 70px;
    min-height: calc(100vh - 70px);
    padding-bottom: 80px;
}

.hero {
    text-align: center;
    padding: 80px 20px 60px;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
    letter-spacing: -1px;
}

.hero .highlight {
    color: var(--primary);
}

.hero p {
    font-size: 22px;
    color: var(--text-light);
    font-weight: 300;
}

.tools-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.tool-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
    transition: var(--transition);
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.dark-theme .tool-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border);
}



/* =========================================
   GOD-TIER TOOL ICONS (iOS Squircle Style)
   ========================================= */
.tool-icon {
    width: 72px;
    height: 72px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    background: currentColor; 
    box-shadow: 0 12px 25px -8px currentColor;
    position: relative;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

/* Subtle glass shine overlay */
.tool-icon::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0) 60%);
    border-radius: 20px;
    pointer-events: none;
}

/* Force the SVG inside to be crisp white with a soft shadow */
.tool-icon svg {
    width: 34px;
    height: 34px;
    fill: #ffffff !important;
    color: #ffffff !important;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    transition: transform 0.4s ease;
}

.tool-card:hover .tool-icon {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 18px 35px -5px currentColor;
}

.tool-card:hover .tool-icon svg {
    transform: scale(1.1);
}

/* Dark mode specific enhancements */
.dark-theme .tool-icon {
    box-shadow: 0 12px 35px -5px currentColor;
}
.dark-theme .tool-icon::after {
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 60%);
}

.tool-card h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
}

.tool-card p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.5;
}

.badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: #E5F5D2;
    color: #5F8C30;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* Tool Workspace (Resize Page) */
.tool-page {
    background-color: #EFEFEF; /* Slightly darker for workspace feel */
    overflow-x: hidden;
}

.dark-theme .tool-page {
    background: radial-gradient(circle at top left, #1e293b, #0f172a);
}

.workspace {
    margin-top: 70px;
    display: flex;
    height: calc(100vh - 70px);
}

.workspace-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    position: relative;
    transition: padding 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.workspace:has(.sidebar-options.active) .workspace-content {
    padding-left: 100px; /* Space on left for ads */
    padding-right: calc(320px + 100px); /* Sidebar width + space on right for ads */
}

.uploader-area {
    text-align: center;
    max-width: 600px;
    transition: var(--transition);
}

.uploader-content h1 {
    font-size: 40px;
    margin-bottom: 16px;
}

.uploader-content p {
    font-size: 18px;
    color: var(--text-light);
    margin-bottom: 40px;
}

.drag-text {
    margin-top: 16px;
    font-size: 14px;
    color: var(--text-light);
}

.preview-area {
    width: 100%;
    max-width: 1200px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--secondary);
    border-radius: var(--radius-lg);
    padding: 30px;
    position: relative;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.03);
}

.image-preview-container {
    background: var(--white);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    position: relative;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#imagePreview {
    max-width: 100%;
    max-height: calc(100vh - 240px);
    object-fit: contain;
    border-radius: 8px;
}

.image-details {
    margin-top: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

.sidebar-options {
    width: 320px;
    background-color: var(--white);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 15px rgba(0,0,0,0.05);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: absolute;
    right: 0;
    top: 70px;
    bottom: 0;
    z-index: 100;
}

.sidebar-options.active {
    transform: translateX(0);
}

.sidebar-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.sidebar-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: 0.5px;
}

.sidebar-body {
    padding: 24px;
    flex: 1;
    overflow-y: auto;
}

.option-group {
    margin-bottom: 24px;
}

.option-group > label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
}

.dimensions-input {
    display: flex;
    align-items: center;
    gap: 10px;
}

.input-group {
    flex: 1;
}

.input-group label {
    display: block;
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 4px;
}

.input-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 16px;
    font-family: inherit;
    text-align: center;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
}

.aspect-ratio-link {
    margin-top: 16px;
}

.aspect-ratio-link button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    padding: 4px;
    border-radius: 4px;
    transition: var(--transition);
}

.aspect-ratio-link button.active {
    color: var(--primary);
    background: rgba(60, 182, 226, 0.1);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
}

.checkbox-group label {
    font-size: 14px;
    cursor: pointer;
}

.sidebar-footer {
    padding: 24px;
    border-top: 1px solid var(--border);
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius-lg);
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: var(--shadow-lg);
    animation: modalPop 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

@keyframes modalPop {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-content h2 {
    margin-bottom: 16px;
    color: var(--primary);
}

.modal-content p {
    margin-bottom: 24px;
    color: var(--text-light);
}

/* Footer */
.footer {
    background-color: var(--white);
    padding: 60px 20px 30px;
    border-top: 1px solid var(--border);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

.footer-main {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    width: 100%;
    margin-bottom: 40px;
}

.footer-col .logo {
    margin-bottom: 16px;
    display: inline-flex;
}

.footer-col h3 {
    margin-bottom: 20px;
    font-size: 16px;
    color: var(--text-dark);
}

.footer-col p {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.6;
}

.footer-col-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-col-links a {
    color: var(--text-light);
    font-size: 14px;
    transition: color 0.3s;
}

.footer-col-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 20px;
}

.footer-bottom p {
    color: var(--text-light);
    font-size: 14px;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: var(--text-light);
    font-size: 14px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--primary);
}

/* Responsive */
@media (max-width: 1024px) {
    .workspace:has(.sidebar-options.active) .workspace-content {
        padding-left: 20px;
        padding-right: calc(320px + 20px);
    }
}

@media (max-width: 768px) {
    .desktop-nav, .auth-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
}
.auth-buttons .btn {
    text-align: center;
}
.auth-buttons .btn {
    text-align: center;
}
}

/* Crop Styles */
.crop-container {
    position: relative;
    display: inline-block;
    user-select: none;
    max-width: 100%;
    max-height: calc(100vh - 200px);
}

.crop-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    pointer-events: none;
    z-index: 10;
}

.dark-theme .crop-box {
    position: absolute;
    border: 2px dashed #fff;
    box-shadow: 0 0 0 9999em rgba(0,0,0,0.5); /* old trick to darken outside, but we use overlay instead and this provides extra contrast if needed */
    z-index: 20;
    cursor: move;
    box-sizing: border-box;
}

.crop-handle {
    position: absolute;
    width: 12px;
    height: 12px;
    background-color: var(--primary);
    border: 2px solid #fff;
    border-radius: 50%;
    z-index: 30;
}

.top-left { top: -6px; left: -6px; cursor: nwse-resize; }
.top-right { top: -6px; right: -6px; cursor: nesw-resize; }
.bottom-left { bottom: -6px; left: -6px; cursor: nesw-resize; }
.bottom-right { bottom: -6px; right: -6px; cursor: nwse-resize; }

.radio-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.radio-label:hover {
    border-color: var(--primary);
}

.radio-label input[type="radio"] {
    margin-top: 4px;
}

.radio-content h4 {
    font-size: 15px;
    margin-bottom: 4px;
}

.radio-content p {
    font-size: 13px;
    color: var(--text-light);
}



/* =========================================
   DARK MODE & GLASSMORPHISM OVERRIDES
   ========================================= */
html.dark-theme {
    --primary: #00d2ff;
    --primary-hover: #3a7bd5;
    --secondary: rgba(255, 255, 255, 0.1);
    --text-dark: #f8fafc;
    --text-light: #94a3b8;
    --bg-light: #0f172a; 
    --white: rgba(255, 255, 255, 0.03); 
    --border: rgba(255, 255, 255, 0.1);
    
    --shadow-sm: 0 4px 15px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 8px 25px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 15px 35px rgba(0, 0, 0, 0.4);
}

/* Base Body Background with subtle gradient */
html.dark-theme {
    background: radial-gradient(circle at top left, #1e293b, #0f172a);
    background-attachment: fixed;
    color: var(--text-dark);
}

/* Glassmorphism Classes */
.dark-theme .tool-card, .dark-theme .uploader-area, .dark-theme .modal-content, .dark-theme .footer {
    background: rgba(255, 255, 255, 0.03) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1) !important;
}

.dark-theme .header, .dark-theme .mega-menu, .dark-theme .sidebar-options {
    background: rgba(15, 23, 42, 0.95) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3) !important;
}

/* Tool Cards Hover - Enhance glow */
.dark-theme .tool-card:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 10px 40px rgba(0, 210, 255, 0.15) !important;
}

/* Glowing tool icons */


/* Text overrides */
.dark-theme .mega-menu-col h3 {
    color: var(--text-light) !important;
}
.dark-theme .desktop-nav a {
    color: var(--text-dark);
}
.dark-theme .desktop-nav a:hover, .dark-theme .desktop-nav a.active {
    color: var(--primary) !important;
}

/* Logo Adjustments */
.dark-theme .logo svg path[fill="#fff"] {
    fill: #0f172a !important; 
}
.dark-theme .logo svg path[fill="#007BFF"] {
    fill: var(--primary) !important; 
}

/* Buttons */
.dark-theme .btn-primary, .dark-theme .btn-mega, .dark-theme .btn-action {
    color: #0f172a !important; /* Dark text for high contrast against bright primary background */
    font-weight: 700 !important;
}

.dark-theme .btn-secondary {
    background: rgba(255,255,255,0.05) !important;
    color: #fff !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
}
.dark-theme .btn-secondary:hover {
    background: rgba(255,255,255,0.1) !important;
}

/* Form Inputs */
.dark-theme input[type="number"], .dark-theme input[type="text"], .dark-theme select {
    background: rgba(0,0,0,0.2) !important;
    color: #fff !important;
    border: 1px solid rgba(255,255,255,0.2) !important;
}
.dark-theme input:focus, .dark-theme select:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 2px rgba(0, 210, 255, 0.2) !important;
}

/* Crop box & Modals */
.dark-theme .crop-box {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.8) !important;
}

.dark-theme .modal {
    background: rgba(15, 23, 42, 0.8) !important;
    backdrop-filter: blur(8px) !important;
}

/* Ensure links are visible */
a {
    color: inherit;
}

/* Theme Toggle Button */
.btn-theme {
    background: transparent;
    border: none;
    color: var(--text-dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: var(--transition);
}
.btn-theme:hover {
    background: rgba(0,0,0,0.05);
}
.dark-theme .btn-theme {
    color: var(--text-dark);
}
.dark-theme .btn-theme:hover {
    background: rgba(255,255,255,0.1);
}


/* =========================================
   FLOATING EDITOR TOOLBAR
   ========================================= */
.editor-toolbar {
    display: flex;
    align-items: center;
    background: var(--white);
    border-radius: 40px;
    padding: 8px 8px 8px 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 24px;
    gap: 16px;
    border: 1px solid var(--border);
    z-index: 100;
}

.dark-theme .editor-toolbar {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(12px);
    border-color: rgba(255,255,255,0.1);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.toolbar-tabs {
    display: flex;
    gap: 8px;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: var(--text-light);
    font-size: 14px;
    font-weight: 500;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    color: var(--text-dark);
    background: rgba(0,0,0,0.04);
}

.dark-theme .tab-btn:hover {
    color: var(--white);
    background: rgba(255,255,255,0.05);
}

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

.dark-theme .tab-btn.active {
    background: rgba(143, 188, 93, 0.15);
    color: var(--primary);
}

.toolbar-divider {
    width: 1px;
    height: 24px;
    background: var(--border);
}

.dark-theme .toolbar-divider {
    background: rgba(255,255,255,0.1);
}

.toolbar-actions {
    display: flex;
    gap: 8px;
}

.action-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s;
}

.action-icon-btn:hover:not([disabled]) {
    background: rgba(0,0,0,0.05);
    color: var(--text-dark);
}

.dark-theme .action-icon-btn:hover:not([disabled]) {
    background: rgba(255,255,255,0.1);
    color: var(--white);
}

.action-icon-btn[disabled] {
    opacity: 0.3;
    cursor: not-allowed;
}

.btn-download {
    border-radius: 24px;
    padding: 8px 20px;
    display: flex;
    align-items: center;
    background: #0066FF; /* Matching the screenshot blue */
    color: white;
}
.btn-download:hover {
    background: #0052cc;
    transform: none;
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.3);
}

/* Tab Panels */
.toolbar-panels {
    background: var(--white);
    border-radius: 12px;
    padding: 16px 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.dark-theme .toolbar-panels {
    background: rgba(15, 23, 42, 0.5);
    border-color: rgba(255,255,255,0.1);
}

.tab-panel {
    display: none;
    align-items: center;
    gap: 16px;
}

.tab-panel.active {
    display: flex;
}

.tab-panel label {
    font-size: 14px;
    font-weight: 500;
}

.tab-panel input[type="range"] {
    width: 150px;
}

.tab-panel input[type="color"] {
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.help-text {
    font-size: 12px;
    color: var(--text-light);
    margin-left: 16px;
}

/* New Background Remover Editor Styles */
.preset-grid {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.preset-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 13px;
    color: var(--text-dark);
    cursor: pointer;
    transition: var(--transition);
}

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

.slider-grid {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 12px;
    align-items: center;
    width: 100%;
    max-width: 300px;
}

.slider-grid label {
    font-size: 13px;
    color: var(--text-dark);
    text-align: right;
}

.slider-grid input[type="range"] {
    width: 100%;
}

/* =========================================
   BRUSH TOOL UI STYLES
   ========================================= */

.brush-tool-btn.active {
    border-color: #0055ff !important;
    color: #0055ff !important;
    background: #f0f5ff !important;
}

/* Custom Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .4s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #0055ff;
}

input:focus + .toggle-slider {
    box-shadow: 0 0 1px #0055ff;
}

input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

/* Override tab-panel for side panel layout */
.side-panel-ui .tab-panel.active {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

/* =========================================
   PREMIUM COLOR PICKER UI
   ========================================= */

.tab-panel input[type="color"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: transparent;
    width: 100%;
    height: 48px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    padding: 4px;
    transition: all 0.2s ease;
}

.tab-panel input[type="color"]:hover {
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.tab-panel input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.tab-panel input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 4px;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.1);
}

.tab-panel input[type="color"]::-moz-color-swatch {
    border: none;
    border-radius: 4px;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.1);
}

/* =========================================
   AD BANNER SPACES
   ========================================= */
.ad-banner {
    width: 100%;
    height: 90px;
    margin: 40px auto;
}

/* =========================================
   BLOG STYLES
   ========================================= */
.blog-section {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.blog-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg, 12px);
    overflow: hidden;
    text-decoration: none;
    color: var(--text-dark);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.blog-image {
    width: 100%;
    height: 200px;
    background-color: var(--border);
    overflow: hidden;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-image img {
    transform: scale(1.05);
}

.blog-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-date {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 8px;
    font-weight: 500;
}

.blog-content h2 {
    font-size: 20px;
    margin-bottom: 12px;
    line-height: 1.4;
}

.blog-content p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
    flex: 1;
    margin-bottom: 20px;
}

.read-more {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    display: flex;
    align-items: center;
}

.blog-card:hover .read-more {
    text-decoration: underline;
}

.dark-theme .blog-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* How To Use Section for SEO */
.how-to-use-section {
    max-width: 1200px;
    margin: 40px auto;
    padding: 40px 20px;
    background-color: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    color: var(--text-dark);
}

.how-to-use-section h2 {
    font-size: 28px;
    margin-bottom: 20px;
    color: var(--primary);
}

.how-to-use-section p {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 16px;
}

.how-to-use-section ol {
    margin-left: 24px;
    margin-bottom: 24px;
}

.how-to-use-section li {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 8px;
}
.dark-theme .how-to-use-section {
    background-color: #1e1e24;
}

/* =========================================
   BLOG STYLES
   ========================================= */
.blog-section {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.blog-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg, 12px);
    overflow: hidden;
    text-decoration: none;
    color: var(--text-dark);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.blog-image {
    width: 100%;
    height: 200px;
    background-color: var(--border);
    overflow: hidden;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-image img {
    transform: scale(1.05);
}

.blog-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-date {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 8px;
    font-weight: 500;
}

.blog-content h2 {
    font-size: 20px;
    margin-bottom: 12px;
    line-height: 1.4;
}

.blog-content p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
    flex: 1;
    margin-bottom: 20px;
}

.read-more {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    display: flex;
    align-items: center;
}

.blog-card:hover .read-more {
    text-decoration: underline;
}

.dark-theme .blog-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* How To Use Section for SEO */
.how-to-use-section {
    max-width: 1200px;
    margin: 40px auto;
    padding: 40px 20px;
    background-color: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    color: var(--text-dark);
}

.how-to-use-section h2 {
    font-size: 28px;
    margin-bottom: 20px;
    color: var(--primary);
}

.how-to-use-section p {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 16px;
}

.how-to-use-section ol {
    margin-left: 24px;
    margin-bottom: 24px;
}

.how-to-use-section li {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 8px;
}
.dark-theme .how-to-use-section {
    background-color: #1e1e24;
    border: 1px solid #333;
}
.dark-theme .how-to-use-section h2 {
    color: var(--primary);
}
.dark-theme .how-to-use-section p, .dark-theme .how-to-use-section li {
    color: #bbb;
}

/* Auth Forms Styling */
.auth-card {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
}

.auth-card form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-card .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}

.auth-card label {
    font-weight: 500;
    font-size: 14px;
    color: var(--text-dark);
}

.auth-input {
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 15px;
    background-color: var(--bg-light);
    color: var(--text-dark);
    transition: var(--transition);
}

.auth-input:focus {
    outline: none;
    border-color: var(--primary);
    background-color: var(--white);
    box-shadow: 0 0 0 3px rgba(60, 182, 226, 0.15);
}

.dark-theme .auth-card {
    background: rgba(30, 30, 36, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 12px 30px rgba(0,0,0,0.5);
}

.dark-theme .auth-card label {
    color: #e0e0e0;
}

.dark-theme .auth-input {
    background-color: rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.dark-theme .auth-input:focus {
    background-color: rgba(0, 0, 0, 0.4);
    border-color: var(--primary);
}

/* Custom Google Button - Light Mode (Default) */
.custom-google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background-color: #ffffff;
    color: #3c4043;
    border: 1px solid #dadce0;
    border-radius: var(--radius-md);
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 500;
    width: 100%;
    cursor: pointer;
    transition: var(--transition);
}

.custom-google-btn:hover {
    background-color: #f8f9fa;
    border-color: #d2e3fc;
}

.custom-google-btn svg {
    width: 20px;
    height: 20px;
}

/* Custom Google Button - Dark Mode */
.dark-theme .custom-google-btn {
    background-color: #24242c;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dark-theme .custom-google-btn:hover {
    background-color: #2a2a35;
    border-color: rgba(255, 255, 255, 0.2);
}
