/* ========================================
   ImageForge — Premium Dark Theme
   ======================================== */

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a28;
    --bg-card: rgba(22, 22, 35, 0.8);
    --bg-glass: rgba(255, 255, 255, 0.03);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-active: rgba(124, 92, 252, 0.5);
    --text-primary: #f0f0f5;
    --text-secondary: #8a8a9a;
    --text-muted: #55556a;
    --accent: #7c5cfc;
    --accent-light: #9b80ff;
    --accent-glow: rgba(124, 92, 252, 0.25);
    --danger: #ff4d6a;
    --success: #00d68f;
    --warning: #ffaa00;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.5);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

body.light-theme {
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f3f5;
    --bg-card: rgba(255, 255, 255, 0.9);
    --bg-glass: rgba(0, 0, 0, 0.03);
    --border-color: rgba(0, 0, 0, 0.08);
    --border-active: rgba(124, 92, 252, 0.3);
    --text-primary: #1a1a2e;
    --text-secondary: #4a4a5e;
    --text-muted: #6a6a7e;
    --shadow-sm: 0 2px 10px rgba(0,0,0,0.05);
    --shadow-md: 0 5px 25px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(124, 92, 252, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(99, 179, 237, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(236, 72, 153, 0.04) 0%, transparent 50%);
}

/* ---- Header ---- */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

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

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

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

.logo-text {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo-accent {
    color: var(--accent-light);
}

.header-badge {
    font-size: 12px;
    font-weight: 600;
    color: var(--success);
    background: rgba(0, 214, 143, 0.1);
    border: 1px solid rgba(0, 214, 143, 0.2);
    padding: 5px 12px;
    border-radius: 50px;
}

/* ---- Main ---- */
.main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
    min-height: calc(100vh - 140px);
}

/* ---- Homepage Dashboard ---- */
.dash-center-wrapper {
    max-width: 960px;
    margin: 0 auto;
}

.hero-section {
    text-align: center;
    padding: 40px 20px 10px;
}

.hero-title {
    font-size: 36px;
    font-weight: 900;
    letter-spacing: -1px;
    line-height: 1.2;
    margin-bottom: 10px;
}

.hero-accent {
    background: linear-gradient(135deg, #e63946, #ff6b6b, #ff4d5a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    color: var(--text-muted);
    font-size: 16px;
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.6;
}

.dash-section {
    margin-top: 36px;
}

.dash-section-title {
    font-size: 18px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-left: 0;
}

.section-dot {
    width: 6px;
    height: 22px;
    border-radius: 3px;
    display: inline-block;
}

.dash-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

.dash-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 12px;
    padding: 24px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    width: 150px;
    height: 150px;
    flex-shrink: 0;
}

.dash-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
    transition: left 0.6s ease;
    pointer-events: none;
    transform: skewX(-20deg);
}

.dash-card:hover::before {
    left: 200%;
}

.dash-card:hover {
    transform: translateY(-6px);
    border-color: #00d68f; /* Green hover border to match screenshot style */
    box-shadow: 0 12px 30px rgba(0, 214, 143, 0.15);
}

.dash-card:active {
    transform: translateY(-2px) scale(0.98);
}

.dash-card-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%; /* Circle shape */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.dash-card-icon svg {
    width: 32px;
    height: 32px;
    stroke: white;
}

.dash-card:hover .dash-card-icon {
    transform: scale(1.15) translateY(-4px);
}

.dash-card-text {
    width: 100%;
}

.dash-card-text h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0;
    line-height: 1.3;
}

/* Hide description text to match the clean square look of the screenshot */
.dash-card-text p {
    display: none;
}

.dash-card-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 9px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 50px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.dash-card-badge.hot {
    background: rgba(230, 57, 70, 0.15);
    color: #e63946;
    border: 1px solid rgba(230, 57, 70, 0.3);
}

.dash-card-badge.new {
    background: rgba(0, 214, 143, 0.15);
    color: #00d68f;
    border: 1px solid rgba(0, 214, 143, 0.3);
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Home tab button */
.home-tab {
    background: rgba(230, 57, 70, 0.1) !important;
    color: #e63946 !important;
    border-color: rgba(230, 57, 70, 0.2) !important;
}

.home-tab:hover {
    background: rgba(230, 57, 70, 0.2) !important;
    box-shadow: 0 0 15px rgba(230, 57, 70, 0.15) !important;
}

/* ---- Ad Slots ---- */
.ad-slot {
    width: 100%;
    margin: 20px 0;
    display: flex;
    justify-content: center;
}

.ad-placeholder {
    width: 100%;
    max-width: 728px;
    min-height: 90px;
    background: var(--bg-glass);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ---- SEO Section ---- */
.seo-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.seo-section h2 {
    font-size: 22px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 20px;
}

.seo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.seo-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
}

.seo-card h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 6px;
}

.seo-card p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ---- Tabs ---- */
.tabs-container {
    margin-bottom: 24px;
}

.tabs {
    display: flex;
    gap: 6px;
    background: linear-gradient(135deg, rgba(30, 15, 15, 0.9), rgba(20, 10, 10, 0.95));
    padding: 6px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 60, 60, 0.15);
    width: fit-content;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 60, 60, 0.05);
    position: relative;
    overflow: hidden;
}

.tabs::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 60, 60, 0.03), transparent);
    animation: tabShimmer 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes tabShimmer {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: 100%; }
}

.tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border: none;
    background: transparent;
    color: rgba(255, 180, 180, 0.6);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.2px;
}

.tab::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(255, 60, 60, 0.15), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.tab:hover::before {
    opacity: 1;
}

.tab:hover {
    color: #fff;
    transform: translateY(-1px);
    text-shadow: 0 0 12px rgba(255, 80, 80, 0.5);
}

.tab:hover svg {
    filter: drop-shadow(0 0 6px rgba(255, 80, 80, 0.6));
    transform: scale(1.1);
}

.tab svg {
    transition: all 0.3s ease;
}

.tab:active {
    transform: translateY(0) scale(0.97);
}

.tab.active {
    background: linear-gradient(135deg, #e63946, #ff4d5a, #d62839);
    background-size: 200% 200%;
    animation: tabGradient 3s ease infinite;
    color: white;
    box-shadow:
        0 0 20px rgba(230, 57, 70, 0.4),
        0 0 40px rgba(230, 57, 70, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    transform: translateY(0);
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20%;
    right: 20%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    border-radius: 1px;
}

.tab.active svg {
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.4));
}

@keyframes tabGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ---- Tab Content ---- */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---- Upload Area ---- */
.upload-area {
    border: 2px dashed rgba(124, 92, 252, 0.3);
    border-radius: var(--radius-xl);
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-glass);
    position: relative;
    overflow: hidden;
    max-width: 650px;
    margin: 40px auto;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.upload-area::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(124, 92, 252, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.upload-area:hover {
    border-color: var(--accent);
    background: rgba(124, 92, 252, 0.05);
    transform: scale(1.005);
}

.upload-area.dragover {
    border-color: var(--accent);
    background: rgba(124, 92, 252, 0.1);
    box-shadow: 0 0 40px var(--accent-glow);
}

.upload-inner {
    position: relative;
    z-index: 1;
}

.upload-icon {
    color: var(--accent-light);
    margin-bottom: 16px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.upload-area h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
}

.upload-area p {
    color: var(--text-secondary);
    font-size: 14px;
}

.upload-formats {
    margin-top: 8px;
    font-size: 12px !important;
    color: var(--text-muted) !important;
}

/* ---- Editor ---- */
.editor-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    align-items: start;
}

@media (max-width: 900px) {
    .editor-layout {
        grid-template-columns: 1fr;
    }
}

/* ---- Canvas ---- */
.canvas-wrapper {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.canvas-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    max-height: 600px;
    overflow: hidden;
    background:
        linear-gradient(45deg, #1a1a28 25%, transparent 25%),
        linear-gradient(-45deg, #1a1a28 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #1a1a28 75%),
        linear-gradient(-45deg, transparent 75%, #1a1a28 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    background-color: #12121a;
}

#main-canvas {
    max-width: 100%;
    max-height: 600px;
    display: block;
}

/* ---- Crop Overlay ---- */
.crop-overlay {
    position: absolute;
    cursor: crosshair;
    overflow: hidden;
}

.crop-box {
    position: absolute;
    border: 2px solid var(--accent);
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.55);
    cursor: move;
    z-index: 10;
}

.crop-area {
    width: 100%;
    height: 100%;
    position: relative;
}

/* Grid lines inside crop */
.crop-area::before,
.crop-area::after {
    content: '';
    position: absolute;
    background: rgba(124, 92, 252, 0.3);
}

.crop-area::before {
    top: 33.33%;
    left: 0;
    right: 0;
    height: 1px;
    box-shadow: 0 calc(33.33% * 1) 0 rgba(124, 92, 252, 0.3);
}

.crop-area::after {
    left: 33.33%;
    top: 0;
    bottom: 0;
    width: 1px;
    box-shadow: calc(33.33% * 1) 0 0 rgba(124, 92, 252, 0.3);
}

.crop-handle {
    position: absolute;
    width: 14px;
    height: 14px;
    background: white;
    border: 2px solid var(--accent);
    border-radius: 50%;
    z-index: 20;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.crop-handle:hover {
    transform: scale(1.3);
    box-shadow: 0 0 10px var(--accent-glow);
}

.crop-handle.nw { top: -7px; left: -7px; cursor: nw-resize; }
.crop-handle.n  { top: -7px; left: 50%; margin-left: -7px; cursor: n-resize; }
.crop-handle.ne { top: -7px; right: -7px; cursor: ne-resize; }
.crop-handle.e  { top: 50%; margin-top: -7px; right: -7px; cursor: e-resize; }
.crop-handle.se { bottom: -7px; right: -7px; cursor: se-resize; }
.crop-handle.s  { bottom: -7px; left: 50%; margin-left: -7px; cursor: s-resize; }
.crop-handle.sw { bottom: -7px; left: -7px; cursor: sw-resize; }
.crop-handle.w  { top: 50%; margin-top: -7px; left: -7px; cursor: w-resize; }

.crop-info {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
}

/* ---- Canvas Toolbar ---- */
.canvas-toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 14px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-card);
    flex-wrap: wrap;
}

.tool-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.tool-btn:hover {
    background: var(--bg-glass);
    color: var(--text-primary);
    border-color: var(--border-active);
}

.tool-btn.active {
    background: rgba(124, 92, 252, 0.15);
    color: var(--accent-light);
    border-color: var(--border-active);
}

.tool-btn.danger:hover {
    background: rgba(255, 77, 106, 0.15);
    color: var(--danger);
    border-color: rgba(255, 77, 106, 0.3);
}

.apply-crop-btn {
    background: linear-gradient(135deg, #00d68f, #00b377) !important;
    color: white !important;
    border-color: #00d68f !important;
    font-weight: 700 !important;
    padding: 10px 20px !important;
    font-size: 14px !important;
    box-shadow: 0 0 20px rgba(0, 214, 143, 0.3);
    animation: cropPulse 2s ease-in-out infinite;
}

.apply-crop-btn:hover {
    background: linear-gradient(135deg, #00e89d, #00c985) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 25px rgba(0, 214, 143, 0.45) !important;
}

@keyframes cropPulse {
    0%, 100% { box-shadow: 0 0 15px rgba(0, 214, 143, 0.25); }
    50% { box-shadow: 0 0 25px rgba(0, 214, 143, 0.45); }
}

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

/* ---- Controls Panel ---- */
.controls-panel {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.panel-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

/* ---- Info Bar ---- */
.info-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.info-item {
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
}

.info-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.info-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

/* ---- Control Group ---- */
.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.control-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: -4px;
}

/* ---- Adjustments ---- */
.adjustments-group {
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px;
    gap: 12px;
}

.adjust-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.adjust-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

.adjust-val {
    font-weight: 700;
    color: var(--accent-light);
    font-size: 12px;
    min-width: 30px;
    text-align: right;
}

.adjust-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 5px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    outline: none;
    border: none;
    padding: 0;
}

.adjust-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--accent);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 8px var(--accent-glow);
    transition: transform 0.15s ease;
}

.adjust-slider::-webkit-slider-thumb:hover {
    transform: scale(1.25);
}

.adjust-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--accent);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.reset-adjust-btn {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    margin-top: 4px;
}

.reset-adjust-btn:hover {
    background: rgba(255, 77, 106, 0.1);
    color: var(--danger);
    border-color: rgba(255, 77, 106, 0.3);
}

/* ---- Inputs ---- */
input[type="number"],
input[type="text"],
select {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    outline: none;
    transition: var(--transition);
    width: 100%;
}

input[type="number"]:focus,
input[type="text"]:focus,
select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%238a8a9a' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.text-input {
    width: 100%;
}

/* ---- Dimension inputs ---- */
.dimension-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-group {
    flex: 1;
}

.input-group label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.link-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    margin-top: 14px;
    flex-shrink: 0;
}

.link-btn.active {
    background: rgba(124, 92, 252, 0.15);
    color: var(--accent-light);
    border-color: var(--border-active);
}

.link-btn:hover {
    background: var(--bg-glass);
}

/* ---- DPI ---- */
.dpi-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.dpi-row input {
    flex: 1;
}

.dpi-presets {
    display: flex;
    gap: 4px;
}

.preset-btn {
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.preset-btn:hover {
    background: var(--bg-glass);
    color: var(--text-primary);
}

.preset-btn.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* ---- File Size ---- */
.filesize-row {
    display: flex;
    gap: 8px;
}

.filesize-row input { flex: 1; }
.filesize-row select { width: 80px; flex-shrink: 0; }

/* ---- Format ---- */
.format-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.format-option {
    cursor: pointer;
}

.format-option input {
    display: none;
}

.format-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 8px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    text-align: center;
}

.format-option input:checked + .format-card {
    border-color: var(--accent);
    background: rgba(124, 92, 252, 0.1);
    box-shadow: 0 0 15px var(--accent-glow);
}

.format-card:hover {
    border-color: var(--border-active);
    background: var(--bg-glass);
}

.format-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.format-desc {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ---- Quality Slider ---- */
.quality-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    outline: none;
    border: none;
    padding: 0;
}

.quality-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--accent);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px var(--accent-glow);
    transition: transform 0.15s ease;
}

.quality-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.quality-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--accent);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 10px var(--accent-glow);
}

/* ---- Download Button ---- */
.download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--accent), #9b80ff);
    border: none;
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 700;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 20px var(--accent-glow);
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(124, 92, 252, 0.4);
}

.download-btn:active {
    transform: translateY(0);
}

/* ---- Output Info ---- */
.output-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

/* ---- Footer ---- */
.footer {
    text-align: center;
    padding: 24px;
    color: var(--text-muted);
    font-size: 13px;
    border-top: 1px solid var(--border-color);
}

/* ---- Loading Overlay ---- */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    gap: 16px;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay p {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
}

/* ---- Compress / Convert Editor ---- */
.compress-editor,
.convert-editor {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    align-items: start;
}

@media (max-width: 900px) {
    .compress-editor,
    .convert-editor {
        grid-template-columns: 1fr;
    }
}

.compress-preview {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.compress-preview img {
    max-width: 100%;
    max-height: 500px;
    border-radius: var(--radius-sm);
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
    .header-inner {
        padding: 12px 16px;
    }
    .main {
        padding: 16px;
    }
    .upload-area {
        padding: 50px 20px;
    }
    .format-options {
        grid-template-columns: repeat(3, 1fr);
    }
    .tabs {
        width: 100%;
    }
    .tab {
        flex: 1;
        justify-content: center;
        padding: 10px 12px;
        font-size: 12px;
    }
    .tab svg {
        display: none;
    }
}

/* ---- Toast Notification ---- */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 14px 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    z-index: 10000;
    animation: slideInToast 0.3s ease, slideOutToast 0.3s ease 2.7s forwards;
    max-width: 360px;
}

.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--danger); }
.toast.warning { border-left: 3px solid var(--warning); }

@keyframes slideInToast {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideOutToast {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(20px); }
}

/* ======== ID CARD PRINT TAB ======== */
.idcard-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
    align-items: start;
}

@media (max-width: 900px) {
    .idcard-layout {
        grid-template-columns: 1fr;
    }
}

.idcard-controls {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.idcard-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Type Buttons */
.idtype-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.idtype-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 8px;
    border: 2px solid var(--border-color);
    background: var(--bg-glass);
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.idtype-btn:hover {
    border-color: var(--border-active);
    color: var(--text-primary);
}

.idtype-btn.active {
    border-color: var(--accent);
    background: rgba(124, 92, 252, 0.1);
    color: var(--accent-light);
    box-shadow: 0 0 15px var(--accent-glow);
}

/* Checkbox */
.idcard-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
}

.idcard-checkbox input {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
    cursor: pointer;
}

/* Card Upload Boxes */
.card-uploads {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.card-upload-box {
    position: relative;
    border: 2px dashed rgba(124, 92, 252, 0.3);
    border-radius: var(--radius-md);
    padding: 16px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100px;
    overflow: hidden;
}

.card-upload-box:hover {
    border-color: var(--accent);
    background: rgba(124, 92, 252, 0.05);
}

.card-upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
}

.card-preview-img {
    width: 100%;
    height: 100%;
    max-height: 90px;
    object-fit: contain;
    border-radius: 4px;
}

.card-remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: none;
    background: var(--danger);
    color: white;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 2;
}

.card-remove-btn:hover {
    transform: scale(1.1);
}

/* ID Card Action Buttons */
.idcard-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.idcard-save-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-glass);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.jpg-btn:hover {
    background: rgba(0, 214, 143, 0.1);
    border-color: var(--success);
    color: var(--success);
}

.pdf-btn:hover {
    background: rgba(255, 77, 106, 0.1);
    border-color: var(--danger);
    color: var(--danger);
}

/* A4 Preview */
.a4-preview-wrapper {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.a4-preview {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 20px;
    display: flex;
    justify-content: center;
    width: 100%;
}

.a4-sheet {
    width: 100%;
    max-width: 500px;
    aspect-ratio: 210 / 297;
    background: white;
    border-radius: 4px;
    box-shadow: 0 4px 30px rgba(0,0,0,0.3);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 20px;
    gap: 12px;
    overflow: hidden;
}

.a4-empty-msg {
    color: #999;
    font-size: 14px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.a4-card-pair {
    width: 100%;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.a4-card-img {
    flex: 1;
    max-width: 48%;
    object-fit: contain;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.a4-card-single {
    width: 60%;
    object-fit: contain;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* ======== PDF TOOLS TAB ======== */
.pdf-dash-title { font-size: 28px; font-weight: 800; text-align: center; margin-bottom: 4px; }
.pdf-dash-subtitle { text-align: center; color: var(--text-muted); font-size: 14px; margin-bottom: 30px; }

.pdf-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    max-width: 960px;
    margin: 0 auto;
}

.pdf-tool-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.pdf-tool-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(255,255,255,0.03), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}

.pdf-tool-card:hover::before { opacity: 1; }

.pdf-tool-card:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 60, 60, 0.3);
    box-shadow: 0 12px 40px rgba(0,0,0,0.3), 0 0 20px rgba(230, 57, 70, 0.1);
}

.pdf-tool-card:active { transform: translateY(-2px) scale(0.98); }

.pdf-tool-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    transition: transform 0.3s ease;
}

.pdf-tool-card:hover .pdf-tool-icon { transform: scale(1.1) rotate(-3deg); }

.pdf-tool-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; color: var(--text-primary); }
.pdf-tool-card p { font-size: 12px; color: var(--text-muted); }

/* Sub-views */
.pdf-subview { animation: fadeIn 0.3s ease; }
.pdf-subview-title { font-size: 24px; font-weight: 800; margin-bottom: 20px; }

.pdf-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 16px;
}

.pdf-back-btn:hover { background: rgba(230,57,70,0.1); color: #e63946; border-color: rgba(230,57,70,0.3); }

.pdf-sub-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.pdf-preview-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    width: 100%;
}

.pdf-preview-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
    position: relative;
}

.pdf-preview-item img, .pdf-preview-item canvas {
    width: 100%;
    display: block;
}

.pdf-preview-item .pdf-page-label {
    text-align: center;
    padding: 6px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-card);
}

.pdf-preview-item .pdf-page-download {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: var(--accent);
    color: white;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.pdf-preview-item:hover .pdf-page-download { opacity: 1; }

.pdf-status-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    width: 100%;
    max-width: 600px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
}

/* Edit PDF */
.edit-pdf-workspace { width: 100%; }

.edit-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.edit-toolbar input[type="color"] {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    background: transparent;
    padding: 2px;
}

.edit-pages {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
    margin-bottom: 20px;
}

.edit-page-wrapper {
    position: relative;
    cursor: crosshair;
    box-shadow: var(--shadow-md);
    border-radius: 4px;
    overflow: hidden;
}

.edit-page-wrapper canvas { display: block; max-width: 100%; }

.edit-text-overlay {
    position: absolute;
    cursor: move;
    padding: 2px 6px;
    border: 1px dashed rgba(230,57,70,0.5);
    background: rgba(230,57,70,0.05);
    border-radius: 2px;
    white-space: nowrap;
    user-select: none;
    font-family: 'Inter', sans-serif;
}

/* ======== FOOTER ======== */
.footer {
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
    margin-top: 40px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px 20px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 30px;
}

@media (max-width: 768px) {
    .footer-inner {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

.footer-brand h3 {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #e63946, #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-brand p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
}

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

.footer-links h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.footer-links a {
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #e63946;
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding: 16px 24px;
    text-align: center;
}

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

/* ======== STATIC PAGES ======== */
.static-page {
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    z-index: 200;
    overflow-y: auto;
}

.static-page-inner {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 24px;
}

.static-page h1 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 20px;
}

.static-page h2 {
    font-size: 20px;
    font-weight: 700;
    margin-top: 24px;
    margin-bottom: 10px;
}

.static-page p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 12px;
}

.static-page ul {
    padding-left: 20px;
    margin-bottom: 12px;
}

.static-page li {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.static-page a {
    color: #e63946;
}

/* ======== CONTACT FORM ======== */
.contact-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-top: 24px;
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #e63946;
    outline: none;
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.15);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.contact-success {
    text-align: center;
    padding: 40px 20px;
}

.contact-success svg {
    margin-bottom: 16px;
}

.contact-success h3 {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 12px;
    color: #00d68f;
}

.contact-success p {
    color: var(--text-muted);
    margin-bottom: 24px;
}

/* ======== GLOBAL BACK BUTTON ======== */
.global-back-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(26, 27, 35, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.global-back-btn:hover {
    background: rgba(230, 57, 70, 0.15);
    border-color: #e63946;
    color: #fff;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .global-back-btn {
        top: 15px;
        left: 15px;
        padding: 8px 12px;
        font-size: 13px;
    }
}

/* ======== SCAN ADJUST MODAL ======== */
.scan-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.85);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}
.scan-modal-content {
    background: var(--bg-surface);
    width: 90%;
    height: 90%;
    max-width: 1200px;
    border-radius: 12px;
    display: flex;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
}
.scan-image-area {
    flex: 1;
    background: #0f1015;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 20px;
}
#scan-adjust-canvas {
    max-width: 100%;
    max-height: calc(100% - 80px);
    object-fit: contain;
}
.scan-rotate-tools {
    position: absolute;
    bottom: 20px;
    display: flex;
    gap: 12px;
}
.scan-rotate-tools button {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    width: 48px; height: 48px;
    border-radius: 50%;
    font-size: 22px;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.scan-rotate-tools button:hover {
    background: var(--accent);
    border-color: var(--accent);
}
.scan-crop-handle {
    position: absolute;
    width: 14px;
    height: 14px;
    background: #fff;
    border: 2px solid #3b82f6;
    border-radius: 50%;
    pointer-events: auto;
    z-index: 10;
}
.scan-sidebar {
    width: 380px;
    background: var(--bg-surface);
    border-left: 1px solid rgba(255,255,255,0.05);
    padding: 24px;
    display: flex;
    flex-direction: column;
}
.scan-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}
.scan-sidebar-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
}
#btn-scan-cancel {
    background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 14px; font-weight: 600;
}
#btn-scan-cancel:hover { color: #fff; }

.scan-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 30px;
}
.scan-filter-btn {
    flex: 1;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-primary);
    padding: 10px 0;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s;
}
.scan-filter-btn.active, .scan-filter-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
}

.scan-sliders {
    flex: 1;
}

.scan-confirm-btn {
    background: #3b82f6; 
    color: #fff;
    border: none;
    padding: 16px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
    margin-top: 20px;
}
.scan-confirm-btn:hover {
    background: #2563eb;
}
@media (max-width: 768px) {
    .scan-modal-content { flex-direction: column; height: 95%; width: 95%; }
    .scan-sidebar { width: 100%; padding: 16px; border-left: none; border-top: 1px solid rgba(255,255,255,0.05); flex:none; }
    .scan-image-area { flex: 1; min-height: 50vh; }
}

/* ---- Resume Maker ---- */
.resume-dynamic-block {
    background: rgba(0,0,0,0.15);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 12px;
    position: relative;
}
.resume-dynamic-block .btn-remove {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(230,57,70,0.2);
    color: #e63946;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.resume-dynamic-block .btn-remove:hover {
    background: #e63946;
    color: #fff;
}
.skill-tag {
    background: rgba(124, 92, 252, 0.2);
    color: #a8a5f8;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.skill-tag button {
    background: none;
    border: none;
    color: currentColor;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
}

/* ---- Bulk JPG Converter ---- */
.bulk-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    transition: all 0.2s ease;
}
.bulk-list-item:hover {
    background: rgba(255,255,255,0.02);
    border-color: rgba(255,255,255,0.1);
}
.bulk-item-left {
    display: flex;
    align-items: center;
    gap: 16px;
    overflow: hidden;
}
.bulk-thumb {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    object-fit: cover;
    background: #000;
}
.bulk-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.bulk-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}
.bulk-status {
    font-size: 12px;
    color: var(--accent);
    font-weight: 600;
}
.bulk-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ---- Payment QR Generator ---- */
.qr-container {
    max-width: 420px;
    margin: 0 auto;
    border-radius: 24px;
    overflow: hidden;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}
.qr-top-card {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    padding: 24px;
    text-align: center;
    position: relative;
}
.qr-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}
.qr-header button {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
}
.qr-header button:hover {
    background: rgba(255,255,255,0.3);
}
.qr-code-box {
    width: 220px;
    height: 220px;
    background: white;
    margin: 0 auto 24px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}
.qr-placeholder-text {
    color: #a0a0a0;
    font-size: 14px;
    font-weight: 600;
}
.qr-app-row {
    display: flex;
    justify-content: center;
    gap: 12px;
}
.qr-app-btn {
    background: white;
    border: none;
    padding: 8px 20px;
    border-radius: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}
.qr-app-btn:hover {
    transform: translateY(-2px);
}
.qr-bottom-card {
    padding: 24px;
}
.qr-amount-section {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
}
.qr-amount-label {
    font-size: 11px;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 1px;
    display: block;
    margin-bottom: 12px;
}
.qr-amount-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
}
.currency-sym {
    font-size: 32px;
    color: var(--text-muted);
    font-weight: 300;
}
.qr-amount-display input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 42px;
    font-weight: 800;
    width: 120px;
    text-align: center;
    outline: none;
}
.qr-amount-display input::-webkit-inner-spin-button,
.qr-amount-display input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.qr-lock-status {
    font-size: 12px;
    font-weight: 600;
    color: #00d68f;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.qr-quick-add {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}
.quick-amt-btn {
    flex: 1;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 0;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}
.quick-amt-btn:hover {
    background: rgba(255,255,255,0.05);
    border-color: var(--accent);
    color: var(--accent);
}
/* ---- Admin Panel Styles ---- */
.admin-panel-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.8); backdrop-filter: blur(10px); z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.admin-dashboard { background: #111; width: 100%; max-width: 900px; border-radius: 20px; border: 1px solid #333; overflow: hidden; display: flex; flex-direction: column; max-height: 90vh; }
.admin-header { padding: 20px 30px; background: #1a1a1a; border-bottom: 1px solid #333; display: flex; justify-content: space-between; align-items: center; }
.admin-title h2 { font-size: 20px; color: white; }
.admin-title span { font-size: 12px; color: #666; }
.admin-content { padding: 30px; overflow-y: auto; }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.admin-card { background: #1a1a1a; padding: 20px; border-radius: 12px; border: 1px solid #333; }
.admin-card h3 { font-size: 16px; margin-bottom: 15px; color: #ddd; }
.admin-control { margin-bottom: 15px; }
.switch-label { display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.admin-save-btn { width: 100%; padding: 12px; background: #3b82f6; color: white; border: none; border-radius: 8px; font-weight: 600; cursor: pointer; margin-top: 10px; }
.admin-close { background: none; border: none; color: #666; font-size: 24px; cursor: pointer; }
.logout-btn { background: #ef4444; color: white; border: none; padding: 8px 16px; border-radius: 6px; font-weight: 600; cursor: pointer; margin-right: 15px; }
/* ---- Premium Modal Styles ---- */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.85); backdrop-filter: blur(8px); z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.announcement-modal { background: white; width: 100%; max-width: 500px; border-radius: 24px; overflow: hidden; position: relative; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5); color: #1e293b; }
.modal-header-premium { background: linear-gradient(135deg, #1e3a8a, #3b82f6); padding: 40px 30px 30px; text-align: center; color: white; }
.modal-body-premium { padding: 30px; background: #f8fafc; }
.modal-action-card { background: white; border: 1px solid #e2e8f0; padding: 15px; border-radius: 12px; display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.whatsapp-join-card { border: 1px solid #22c55e; border-radius: 12px; overflow: hidden; margin-top: 20px; }
.wa-join-btn { display: flex; justify-content: space-between; padding: 15px; background: #22c55e; color: white; text-decoration: none; font-weight: 700; }
.modal-close-top { position: absolute; top: 15px; right: 15px; background: rgba(0,0,0,0.1); border: none; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; color: white; }
/* ---- Static Page Styles ---- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.static-card { background: var(--bg-secondary); border: 1px solid var(--border-color); padding: 40px; border-radius: 20px; margin-bottom: 30px; line-height: 1.8; }
.legal-text h3 { margin-top: 25px; color: var(--accent-light); }
.back-btn { background: var(--bg-tertiary); color: white; border: none; padding: 10px 20px; border-radius: 8px; cursor: pointer; font-weight: 600; margin-bottom: 20px; }

/* ---- Premium Footer Styles ---- */
.footer-premium { background: #050505; border-top: 1px solid #111; padding: 80px 0 40px; margin-top: 100px; color: #94a3b8; }
.footer-container { max-width: 1200px; margin: 0 auto; padding: 0 30px; }
.footer-row { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.footer-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.footer-logo img { width: 40px; height: 40px; object-fit: contain; }
.footer-logo span { font-size: 22px; font-weight: 800; color: white; }
.footer-col h4 { color: white; font-size: 16px; margin-bottom: 20px; }
.footer-col ul { list-style: none; padding: 0; }
.footer-col ul li { margin-bottom: 12px; }
.footer-col ul li a { color: #64748b; text-decoration: none; font-size: 14px; transition: 0.2s; }
.footer-col ul li a:hover { color: white; }
.footer-bottom-bar { border-top: 1px solid #111; padding-top: 30px; margin-top: 50px; display: flex; justify-content: space-between; align-items: center; }
.social-icons { display: flex; gap: 15px; }
.social-link { font-size: 20px; text-decoration: none; }



/* ---- Coming Soon Card Styles ---- */
.coming-soon-card {
    opacity: 0.7;
    filter: grayscale(0.5);
    cursor: not-allowed !important;
    pointer-events: none;
    position: relative;
    overflow: hidden;
}

.coming-soon-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.1);
    z-index: 10;
}

/* ---- Admin Lock Button Styles ---- */
.admin-lock-btn {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.1);
    color: #64748b;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.3s;
}
.admin-lock-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
    color: #ef4444;
}
.admin-lock-btn svg { opacity: 0.6; }
.admin-lock-btn:hover svg { opacity: 1; }


/* ---- Dashboard Top Bar (Clock & Theme) ---- */
.dash-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 15px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.dash-clock-area {
    display: flex;
    flex-direction: column;
}

#dash-time {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

#dash-date {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 600;
}

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

.theme-toggle-btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 20px;
}

.theme-toggle-btn:hover {
    background: var(--accent);
    color: white;
    transform: rotate(15deg);
}

/* ---- Vexiro Promo Bar (Long Box) ---- */
.vexiro-promo-bar {
    width: 100%;
    background: linear-gradient(90deg, #fff, #f0f7ff);
    border: 1px solid #cce3ff;
    padding: 20px 30px;
    border-radius: var(--radius-lg);
    margin: 30px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 10px 30px rgba(0, 122, 255, 0.08);
}

body.light-theme .vexiro-promo-bar {
    background: linear-gradient(90deg, #f0f7ff, #e6f0ff);
}

.vexiro-promo-bar:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 40px rgba(0, 122, 255, 0.15);
    border-color: #007aff;
}

.vexiro-promo-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.vexiro-promo-icon {
    width: 50px;
    height: 50px;
    background: #007aff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.vexiro-promo-text h4 {
    color: #001a33;
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 2px;
}

.vexiro-promo-text p {
    color: #4b5563;
    font-size: 14px;
    font-weight: 500;
}

.vexiro-promo-btn {
    background: #007aff;
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 14px;
}

/* ---- Live Stats Counter ---- */
.live-stats-area {
    margin-top: 50px;
    text-align: center;
    padding: 30px;
    background: var(--bg-glass);
    border-radius: var(--radius-xl);
    border: 1px dashed var(--border-color);
}

.stats-grid {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 15px;
}

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

.stat-value {
    font-size: 28px;
    font-weight: 900;
    color: var(--accent-light);
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
}

/* Fix for light theme logos */
body.light-theme .logo-text { color: #1a1a2e; }
body.light-theme .header { background: rgba(255, 255, 255, 0.85); }
body.light-theme .hero-subtitle { color: #4b5563; }

/* Logo fix for light mode */
body.light-theme .logo-icon img {
    background: #0a0a0f; /* Dark background to match neon logo */
    padding: 5px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border: 1px solid rgba(0,0,0,0.05);
}


/* ===== LOADING OVERLAY ===== */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    color: white;
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid var(--accent);
    border-radius: 50%;
    animation: spin 1s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.4);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}


/* UPI QR Tool Premium Updates */
.qr-app-btn {
    background: white !important;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    width: 48px !important;
    height: 48px !important;
    border-radius: 50% !important;
    border: 2px solid transparent !important;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.qr-app-btn img {
    width: 80%;
    height: 80%;
    object-fit: contain;
}

.qr-app-btn:hover {
    transform: scale(1.15);
    border-color: var(--accent) !important;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.qr-app-btn.active {
    border-color: white !important;
    box-shadow: 0 0 0 3px var(--accent);
}
