/**
 * RoundCut Tool Common Styles
 * Shared CSS for all tool pages (Circle Crop, Background Remover, Image Compress)
 *
 * This file contains all shared styles extracted from inline CSS across tool pages.
 * Import this file in all tool HTML pages to maintain consistency and reduce code duplication.
 */

/* =====================================================
   CSS VARIABLES - Light Theme (Default)
   ===================================================== */
:root {
    /* Background Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #fafafa;
    --bg-card: #fafafa;

    /* Text Colors - WCAG AA Compliant */
    --text-primary: #1a1a1a;
    --text-secondary: #595959;
    --text-muted: #707070;

    /* Border Colors */
    --border-color: #d0d0d0;
    --border-dashed: #bebebe;

    /* Shadows */
    --shadow-sm: rgba(0, 0, 0, 0.08);
    --shadow-md: rgba(0, 0, 0, 0.12);
    --shadow-lg: rgba(0, 0, 0, 0.2);

    /* Checkerboard Pattern */
    --checkerboard-light: #e8e8e8;
    --checkerboard-dark: transparent;

    /* Gradients */
    --gradient-start: #fafafa;
    --gradient-end: #f5f5f5;

    /* Logo */
    --logo-url: url('../images/logo-dark.webp');

    /* Disabled States */
    --disabled-bg: #e5e5e5;
    --disabled-text: #757575;

    /* Overlay */
    --overlay-radial: rgba(26, 26, 26, 0.015);

    /* Canvas Background */
    --canvas-bg: #1a1a1a;

    /* Premium Minimal Design Tokens */
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --accent-contrast: #ffffff;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 12px;

    /* Focus Ring */
    --focus-ring: 0 0 0 2px rgba(37, 99, 235, 0.25);
}

/* =====================================================
   CSS VARIABLES - Dark Theme
   ===================================================== */
[data-theme="dark"] {
    /* Background Colors */
    --bg-primary: #121212;
    --bg-secondary: #1e1e1e;
    --bg-card: #252525;

    /* Text Colors - WCAG AA Compliant */
    --text-primary: #ffffff;
    --text-secondary: #e0e0e0;
    --text-muted: #b8b8b8;

    /* Border Colors */
    --border-color: #4a4a4a;
    --border-dashed: #5a5a5a;

    /* Shadows */
    --shadow-sm: rgba(0, 0, 0, 0.5);
    --shadow-md: rgba(0, 0, 0, 0.6);
    --shadow-lg: rgba(0, 0, 0, 0.8);

    /* Checkerboard Pattern */
    --checkerboard-light: #3a3a3a;
    --checkerboard-dark: #2a2a2a;

    /* Gradients */
    --gradient-start: #252525;
    --gradient-end: #1a1a1a;

    /* Logo */
    --logo-url: url('../images/logo-light.webp');

    /* Disabled States */
    --disabled-bg: #353535;
    --disabled-text: #888888;

    /* Overlay */
    --overlay-radial: rgba(255, 255, 255, 0.04);

    /* Canvas Background */
    --canvas-bg: #0d0d0d;

    /* Premium Minimal */
    --accent: #60a5fa;
    --accent-hover: #3b82f6;
    --accent-contrast: #0b1220;
}

/* =====================================================
   BASE STYLES
   ===================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg-primary);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3 {
    line-height: 1.25;
    letter-spacing: -0.2px;
    font-weight: 600;
}

p {
    line-height: 1.65;
    color: var(--text-secondary);
}

/* Emoji support for flags */
.lang-current, .lang-option, #currentLangDisplay {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Apple Color Emoji', 'Noto Color Emoji', Arial, sans-serif;
}

/* =====================================================
   HEADER STYLES
   ===================================================== */
.header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 0;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

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

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

.logo img {
    height: 60px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    content: var(--logo-url);
}

/* =====================================================
   NAVIGATION MENU
   ===================================================== */
.nav-menu {
    display: flex;
    gap: 24px;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.nav-link.active {
    color: white;
    background: linear-gradient(135deg, #8b5cf6 0%, #3b82f6 100%);
    font-weight: 600;
}

.nav-link.disabled {
    color: #ccc;
    cursor: not-allowed;
    position: relative;
}

.nav-link.disabled::after {
    content: 'Soon';
    font-size: 9px;
    background: #f0f0f0;
    color: var(--text-muted);
    padding: 2px 6px;
    border-radius: 8px;
    margin-left: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* =====================================================
   THEME TOGGLE
   ===================================================== */
.theme-toggle {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    width: 36px;
    height: 36px;
    position: relative;
}

.theme-toggle:hover {
    border-color: var(--text-primary);
    background: var(--bg-secondary);
    color: var(--text-primary);
    transform: scale(1.05);
}

.theme-toggle:active {
    transform: scale(0.95);
}

.theme-toggle:focus-visible {
    outline: 2px solid var(--text-primary);
    outline-offset: 2px;
}

.theme-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.theme-icon.moon-icon,
.theme-icon.sun-icon {
    position: absolute;
}

/* =====================================================
   LANGUAGE DROPDOWN
   ===================================================== */
.lang-dropdown {
    position: relative;
}

.lang-current {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s;
    min-width: 80px;
    justify-content: space-between;
}

.lang-current:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
}

.lang-arrow {
    font-size: 10px;
    transition: transform 0.2s;
}

.lang-dropdown.open .lang-arrow {
    transform: rotate(180deg);
}

.lang-options {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 120px;
    display: none;
    z-index: 100;
    overflow: hidden;
}

.lang-dropdown.open .lang-options {
    display: block;
}

.lang-option {
    padding: 10px 16px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lang-option:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.lang-option.active {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* =====================================================
   MAIN WRAPPER & SECTIONS
   ===================================================== */
.main-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 8px 24px;
    position: relative;
}

.tool-section {
    margin-bottom: 80px;
}

.section-header {
    text-align: center;
    margin-bottom: 16px;
}

.section-header h1 {
    font-size: 32px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    margin-bottom: 6px;
    line-height: 1.2;
    transition: color 0.3s ease;
}

.section-header p {
    font-size: 15px;
    color: var(--text-secondary);
    margin: 0;
}

/* =====================================================
   TOOL CONTAINER
   ===================================================== */
.tool-container {
    background: var(--bg-card);
    border-radius: 16px;
    box-shadow: 0 4px 24px var(--shadow-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

/* =====================================================
   UPLOAD AREA
   ===================================================== */
.upload-area {
    border: 2px dashed rgba(139, 92, 246, 0.5);
    border-radius: 12px;
    margin: 16px;
    padding: 80px 24px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-area:hover {
    background: var(--bg-secondary);
}

.upload-area.drag-over {
    background: rgba(139, 92, 246, 0.1);
    border: 2px dashed rgba(139, 92, 246, 0.5);
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.upload-icon-circle {
    width: 128px;
    height: 128px;
    background: linear-gradient(135deg, #8b5cf6 0%, #3b82f6 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 8px 32px rgba(139, 92, 246, 0.3);
    transition: transform 0.2s ease;
}

.upload-area:hover .upload-icon-circle {
    transform: scale(1.1);
}

.upload-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.upload-hint {
    font-size: 16px;
    color: var(--text-secondary);
    margin: 0;
}

.upload-formats {
    font-size: 14px;
    color: var(--text-muted);
}

/* =====================================================
   EDITOR LAYOUT
   ===================================================== */
.editor-area, .preview-area {
    padding: 24px;
    display: none;
}

.editor-layout {
    display: flex;
    gap: 24px;
}

.editor-main {
    flex: 1;
    min-width: 0;
}

.editor-sidebar {
    width: 280px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* =====================================================
   IMAGE WRAPPER
   ===================================================== */
.image-wrapper {
    background: var(--canvas-bg);
    border-radius: 12px;
    padding: 24px;
    box-shadow: inset 0 2px 8px var(--shadow-sm);
    min-height: 400px;
    max-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.image-wrapper img {
    max-width: 100%;
    max-height: 500px;
    display: block;
    border-radius: 0;
}

/* =====================================================
   PREVIEW WRAPPER - Checkerboard Background
   ===================================================== */
.preview-wrapper {
    background:
        linear-gradient(45deg, var(--checkerboard-light) 25%, var(--checkerboard-dark) 25%),
        linear-gradient(-45deg, var(--checkerboard-light) 25%, var(--checkerboard-dark) 25%),
        linear-gradient(45deg, var(--checkerboard-dark) 75%, var(--checkerboard-light) 75%),
        linear-gradient(-45deg, var(--checkerboard-dark) 75%, var(--checkerboard-light) 75%);
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
    border-radius: 12px;
    padding: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    border: 2px dashed rgba(139, 92, 246, 0.5);
    position: relative;
}

.preview-wrapper canvas {
    display: block;
    max-width: 100%;
    max-height: 400px;
    box-shadow: 0 8px 32px var(--shadow-lg);
    border-radius: 8px;
}

/* =====================================================
   TRANSPARENCY INDICATOR
   ===================================================== */
.transparency-indicator {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    color: white;
    white-space: nowrap;
    font-weight: 600;
    letter-spacing: 0.3px;
    background: linear-gradient(135deg, #1E8449 0%, #186A3B 100%);
    padding: 6px 14px;
    border-radius: 16px;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* =====================================================
   CONTROL GROUPS
   ===================================================== */
.control-group {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 20px;
}

.control-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.control-title svg {
    opacity: 0.7;
}

/* =====================================================
   MODEL BUTTONS (for AI tools)
   ===================================================== */
.model-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-model {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-model:hover {
    background: var(--bg-primary);
    border-color: var(--text-muted);
}

.btn-model.active {
    border-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.1);
}

.btn-model .model-name {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-model .model-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(139, 92, 246, 0.2);
    color: #8b5cf6;
}

.btn-model .model-badge.recommended {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

/* =====================================================
   FORM ELEMENTS
   ===================================================== */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-select {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-primary);
    cursor: pointer;
}

.form-select:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

/* =====================================================
   FILE INFO
   ===================================================== */
.file-info {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    padding: 4px 0;
}

.info-row span {
    color: var(--text-muted);
}

.info-row strong {
    color: var(--text-primary);
}

/* =====================================================
   FAQ SECTION
   ===================================================== */
.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item[open] summary span:last-child {
    transform: rotate(45deg);
}

.faq-item summary:hover {
    background: var(--bg-secondary);
}

/* =====================================================
   ROTATION BUTTONS (Circle Crop)
   ===================================================== */
.rotation-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.btn-rotate {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-rotate:hover {
    background: var(--bg-primary);
    border-color: var(--text-muted);
}

.btn-rotate svg {
    flex-shrink: 0;
}

/* =====================================================
   ACTION BUTTONS
   ===================================================== */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: auto;
}

.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    background: linear-gradient(135deg, #8b5cf6 0%, #3b82f6 100%);
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--text-muted);
}

/* =====================================================
   PROCESSING OVERLAY
   ===================================================== */
.processing-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    z-index: 10;
}

.processing-overlay .spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #8b5cf6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.processing-overlay .progress-text {
    color: white;
    font-size: 14px;
    margin-top: 16px;
    font-weight: 500;
}

.processing-overlay .progress-bar {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    margin-top: 12px;
    overflow: hidden;
}

.processing-overlay .progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #8b5cf6 0%, #3b82f6 100%);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* =====================================================
   HOW IT WORKS SECTION
   ===================================================== */
.how-section {
    max-width: 800px;
    margin: 0 auto 80px;
}

.how-section h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 32px;
    text-align: center;
    letter-spacing: -0.5px;
    transition: color 0.3s ease;
}

[data-theme="dark"] .how-section h2 {
    color: #ffffff !important;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.step-item {
    text-align: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px 16px;
}

[data-theme="dark"] .step-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

.step-number {
    width: 32px;
    height: 32px;
    background: var(--text-primary);
    color: var(--bg-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    margin: 0 auto 12px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.step-item h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.step-item p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* =====================================================
   FEATURES SECTION
   ===================================================== */
.features-section {
    max-width: 900px;
    margin: 0 auto 80px;
    padding: 48px 24px;
    background: var(--bg-secondary);
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.features-section h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 32px;
    text-align: center;
    letter-spacing: -0.5px;
    transition: color 0.3s ease;
}

[data-theme="dark"] .features-section h2 {
    color: #ffffff !important;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.feature-item {
    text-align: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px 16px;
}

[data-theme="dark"] .feature-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

.feature-icon {
    font-size: 28px;
    margin-bottom: 12px;
}

.feature-item h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.feature-item p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Dark theme text override for cards */
[data-theme="dark"] .feature-item h3,
[data-theme="dark"] .feature-item p,
[data-theme="dark"] .step-item h3,
[data-theme="dark"] .step-item p {
    color: var(--text-primary) !important;
}

/* =====================================================
   INFO SECTION
   ===================================================== */
.info-section {
    max-width: 960px;
    margin: 0 auto 64px;
    padding: 0 24px;
}

.info-header {
    text-align: center;
    margin-bottom: 32px;
}

.info-header h2 {
    font-size: 24px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.info-header p {
    color: var(--text-secondary);
    font-size: 15px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.info-card {
    display: flex;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-card);
    align-items: center;
}

.info-card .info-icon {
    font-size: 28px;
}

.info-card h3 {
    margin: 0 0 4px;
    font-size: 15px;
    color: var(--text-primary);
}

.info-card p {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.info-tips {
    margin-top: 24px;
    padding: 16px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.info-tips strong {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text-primary);
}

.info-tips ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.info-tips li {
    font-size: 13px;
    color: var(--text-secondary);
}

/* =====================================================
   FOOTER
   ===================================================== */
.footer {
    border-top: 1px solid var(--border-color);
    padding: 32px 24px;
    text-align: center;
}

.footer p {
    font-size: 13px;
    color: var(--text-muted);
    margin: 4px 0;
}

/* =====================================================
   CROPPER.JS CIRCULAR STYLES
   ===================================================== */
.cropper-view-box,
.cropper-face {
    border-radius: 50% !important;
}

.cropper-view-box {
    outline: 0 !important;
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.95) !important;
}

.cropper-crop-box {
    border: 2px solid rgba(139, 92, 246, 0.95) !important;
}

.cropper-face {
    overflow: hidden !important;
    background-color: transparent !important;
}

.cropper-modal {
    background-color: rgba(0, 0, 0, 0.5) !important;
}

.cropper-dashed {
    opacity: 0.8 !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
}

.cropper-line {
    opacity: 0.3 !important;
    background-color: rgba(255, 255, 255, 0.5) !important;
}

.cropper-point {
    background-color: rgba(139, 92, 246, 0.95) !important;
    border: 2px solid #fff !important;
}

.cropper-point.point-e,
.cropper-point.point-n,
.cropper-point.point-w,
.cropper-point.point-s {
    display: none !important;
}

.cropper-point.point-ne,
.cropper-point.point-nw,
.cropper-point.point-se,
.cropper-point.point-sw {
    width: 12px !important;
    height: 12px !important;
    background-color: #fff !important;
    border: 2px solid rgba(139, 92, 246, 0.95) !important;
}

/* Mobile: Larger touch targets for crop handles */
@media (max-width: 768px) {
    .cropper-point.point-ne,
    .cropper-point.point-nw,
    .cropper-point.point-se,
    .cropper-point.point-sw {
        width: 28px !important;
        height: 28px !important;
        border: 3px solid rgba(139, 92, 246, 0.95) !important;
        border-radius: 50% !important;
        opacity: 1 !important;
    }

    /* Ensure crop box border is more visible on mobile */
    .cropper-crop-box {
        border: 3px solid rgba(139, 92, 246, 0.95) !important;
    }

    .cropper-view-box {
        box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.95) !important;
    }
}

/* =====================================================
   AD CONTAINERS (Hidden by default)
   ===================================================== */
.ad-container {
    display: none;
    justify-content: center;
    margin: 32px 0;
    min-height: 90px;
}

.ad-container.top {
    margin-top: 16px;
    margin-bottom: 24px;
}

.ad-container.middle {
    margin-top: 48px;
    margin-bottom: 48px;
}

.ad-container.bottom {
    margin-top: 48px;
    margin-bottom: 32px;
}

.ad-placeholder {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-height: 90px;
}

/* =====================================================
   KEYFRAME ANIMATIONS
   ===================================================== */
@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes iconRotate {
    from { transform: rotate(0deg); opacity: 0; }
    to { transform: rotate(360deg); opacity: 1; }
}

/* =====================================================
   RESPONSIVE - Reduced Motion Preferences
   ===================================================== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .theme-toggle:hover {
        transform: none;
    }
    .theme-toggle:active {
        transform: none;
    }
}

/* =====================================================
   RESPONSIVE - Tablet (768px - 1024px)
   ===================================================== */
@media (max-width: 1024px) and (min-width: 769px) {
    .main-wrapper {
        padding: 32px 16px;
    }

    .section-header h1 {
        font-size: 28px;
    }
}

/* =====================================================
   RESPONSIVE - Mobile/Tablet (max 768px)
   ===================================================== */
@media (max-width: 768px) {
    .logo img {
        height: 45px;
    }

    .header-content {
        padding: 0 16px;
    }

    .nav-menu {
        gap: 12px;
    }

    .main-wrapper {
        padding: 8px 16px;
    }

    .section-header h1 {
        font-size: 24px;
    }

    .section-header p {
        font-size: 14px;
    }

    .editor-layout {
        flex-direction: column;
    }

    .editor-sidebar {
        width: 100%;
    }

    .upload-area {
        border: 2px dashed rgba(139, 92, 246, 0.5);
        border-radius: 12px;
        margin: 16px;
        padding: 48px 16px;
        min-height: 400px;
    }

    .upload-icon-circle {
        width: 96px;
        height: 96px;
    }

    .upload-icon-circle svg {
        width: 48px;
        height: 48px;
    }

    .upload-title {
        font-size: 22px;
    }

    .image-wrapper {
        min-height: 300px;
        padding: 16px;
    }

    .image-wrapper img {
        max-height: 350px;
    }

    .steps-grid, .features-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .transparency-indicator {
        font-size: 10px;
        padding: 3px 8px;
    }
}

/* =====================================================
   RESPONSIVE - Mobile Portrait (max 480px)
   ===================================================== */
@media (max-width: 480px) {
    .header {
        padding: 12px 0;
    }

    .logo img {
        height: 38px;
    }

    .lang-current {
        padding: 4px 8px;
        font-size: 11px;
        min-width: 65px;
    }

    .main-wrapper {
        padding: 16px 12px;
    }

    .tool-section {
        margin-bottom: 40px;
    }

    .section-header {
        margin-bottom: 16px;
    }

    .section-header h1 {
        font-size: 20px;
        margin-bottom: 6px;
    }

    .section-header p {
        font-size: 13px;
        margin-bottom: 20px;
    }

    .upload-area {
        padding: 30px 15px;
        min-height: 280px;
    }

    .upload-icon-circle {
        width: 80px;
        height: 80px;
    }

    .upload-icon-circle svg {
        width: 40px;
        height: 40px;
    }

    .upload-title {
        font-size: 18px;
    }

    .upload-hint {
        font-size: 14px;
    }

    .upload-formats {
        font-size: 12px;
    }

    .step-number {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .step-item h3 {
        font-size: 14px;
    }

    .step-item p {
        font-size: 12px;
    }

    .feature-icon {
        font-size: 24px;
    }

    .feature-item h3 {
        font-size: 13px;
    }

    .feature-item p {
        font-size: 12px;
    }

    .how-section h2 {
        font-size: 20px;
        margin-bottom: 24px;
    }

    .features-section h2 {
        font-size: 20px;
    }

    .transparency-indicator {
        font-size: 9px;
        padding: 2px 6px;
        bottom: 8px;
    }
}
