        /* Default light theme variables */
        :root {
            --paper-white: #fcfcfc;
            --paper-cream: #f7f5f2;
            --ink-dark: #1a1a1a;
            --ink-medium: #2d2d2d;
            --ink-light: #4a4a4a;
            --accent-warm: #fbbf24;
            --badge-styles: rgb(0, 0, 0);
            --accent-glow: #fbbe245d;
            --backdrop-filter: blur(33px);
            --shadow-pop: 0 8px 32px rgba(0, 0, 0, 0.1);
            --paper-texture: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23noise)' opacity='0.08'/%3E%3C/svg%3E");
            --nav-shadow:#f0eded;
            --paper-border: rgba(0, 0, 0, 0.05);
            --paper-shadow: rgba(0, 0, 0, 0.1);
            --video-bg: none;
            --image-bg: none;
            --background: linear-gradient(15deg, 
                transparent 70%, 
                var(--paper-shadow) 98%),
            linear-gradient(-15deg, 
                transparent 70%, 
                var(--paper-shadow) 98%),
            var(--paper-white);
            box-shadow: inset 0 0 40px var(--paper-border);
            --nav-bg:#fcfcfcbd;
            --hero-bg: rgba(255, 255, 255, 0.753);
            --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
            --backdrop-filter: blur(12px);
            --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
            --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
            --shadow-elevation: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
            --hero-shadow: none;
            --box-shadow: none;
            --card-bg: rgba(195, 223, 223, 0.144);
            --card-border: 0.5px solid rgb(202, 200, 200);
            
            --tools-bg: rgba(195, 223, 223, 0.144);
                 --head-fonts:  "Open Sans", sans-serif;

           --dis-fonts : 'Montserrat', sans-serif;
        }

        [data-theme="dark"] {
            --paper-white: #000000;
            --paper-cream: #000000;
            --video-bg: block;
            --hero-bg: rgba(0, 0, 0, 0.753);
            --ink-dark: #ffffff;
            --ink-medium: #ffffff;
            --ink-light: #999999;
            --badge-styles: rgba(43, 226, 202, 0.15);
            --card-bg: rgba(20, 20, 20, 0.6);
            --accent-warm: #00ced1;
            --accent-glow: rgba(0, 206, 209, 0.25);
            --image-bg: block;
            --nav-shadow: #222222;
            --background: linear-gradient(90deg, #1a1a1a 1px, transparent 1px),
                linear-gradient(#1a1a1a 1px, transparent 1px);
            --background-color: #141414;
            --background-size: 40px 40px;
            --color: white;
            --backdrop-filter: none;
            --nav-bg: black;
            --hero-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
            --box-shadow: var(--shadow-md), inset 0 10px 20px -5px var(--accent-glow);
            --tools-bg: rgba(65, 65, 65, 0.144);
            --head-fonts:  "Open Sans", sans-serif;
            --dis-fonts : 'Montserrat', sans-serif;

        }

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

        body {
            font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
            background: var(--paper-white);
            color: var(--ink-dark);
            line-height: 1.6;
        }

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

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

        .header h1 {
            font-size: 2.5rem;
            margin-top: 5.5rem;
            color: var(--ink-dark);
            font-family: var(--head-fonts);
        }

        .header p {
            font-size: 1.1rem;
            color: var(--ink-medium);
        }

        /* Upload Section */
     .upload-section {
  margin-bottom: 20px;
  max-width: 100%; /* Full width on mobile */
  margin-left: auto;
  margin-right: auto;
  padding: 0 10px; /* Add side padding */
}

        .upload-area {
            border: 2px dashed var(--accent-warm);
            border-radius: 12px;
            padding: 20px;
            text-align: center;
            background: var(--card-bg);
            transition: all 0.3s ease;
            cursor: pointer;
        }

        .upload-area:hover, .upload-area.dragover {
            border-color: var(--accent-warm);
            background: var(--accent-glow);
            transform: translateY(-2px);
        }

        .upload-icon {
            font-size: 2rem;
            margin-bottom: 10px;
        }

        .upload-text {
            font-size: 1rem;
            margin-bottom: 15px;
            color: var(--ink-medium);
        }

        .file-input {
            display: none;
        }

        /* Buttons */
        .btn {
            padding: 12px 24px;
            border: none;
            border-radius: 8px;
            font-size: 1rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s ease;
            background: var(--accent-warm);
            color: white;
        }


/* Ensure canvas container is visible */
/* UPDATED CSS - Replace your existing canvas container styles */
.canvas-container {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 20px auto;
    border: 2px dashed var(--accent-warm);
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    max-height: 80vh; /* Prevent container from being too tall */
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.canvas-container.has-image {
    border-color: var(--paper-border);
    background: var(--paper-white);
    padding: 15px;
    min-height: auto;
}

/* Canvas styling - IMPORTANT: Remove position absolute */
#imageCanvas {
    display: block;
    position: relative;
    max-width: 100%;
    max-height: 70vh;
    width: auto;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background: #ffffff;
    object-fit: contain; /* Ensures full image is visible */
    margin: 0 auto;
    transition: all 0.3s ease;
}

#maskCanvas {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    border-radius: 8px;
    z-index: 10;
}

.canvas-container.loading {
    min-height: 300px;
    background: linear-gradient(45deg, #f0f0f0 25%, transparent 25%), 
                linear-gradient(-45deg, #f0f0f0 25%, transparent 25%), 
                linear-gradient(45deg, transparent 75%, #f0f0f0 75%), 
                linear-gradient(-45deg, transparent 75%, #f0f0f0 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    animation: loading-bg 2s linear infinite;
}

@keyframes loading-bg {
    0% { background-position: 0 0, 0 10px, 10px -10px, -10px 0px; }
    100% { background-position: 20px 20px, 20px 30px, 30px 10px, 10px 20px; }
}

/* Image size specific adjustments */
.canvas-container[data-image-type="portrait"] {
    max-width: 600px; /* Narrower for portrait images */
}

.canvas-container[data-image-type="landscape"] {
    max-width: 900px; /* Wider for landscape images */
}

.canvas-container[data-image-type="square"] {
    max-width: 700px; /* Balanced for square images */
}

/* Very tall images handling */
.canvas-container[data-image-type="very-tall"] #imageCanvas {
    max-height: 60vh;
    width: auto;
}

/* Very wide images handling */
.canvas-container[data-image-type="very-wide"] #imageCanvas {
    max-width: 95%;
    height: auto;
}

/* Small images handling */
.canvas-container[data-image-type="small"] {
    min-height: 300px;
    max-width: 500px;
}

.canvas-container[data-image-type="small"] #imageCanvas {
    min-width: 200px;
    min-height: 150px;
}


@media (max-width: 1024px) {
    .canvas-container {
        max-width: 95%;
        padding: 18px;
        max-height: 75vh;
    }
    
    #imageCanvas {
        max-height: 65vh;
    }
    
    .canvas-container[data-image-type="portrait"] {
        max-width: 500px;
    }
    
    .canvas-container[data-image-type="landscape"] {
        max-width: 95%;
    }
}

/* Small tablets (768px and down) */
@media (max-width: 768px) {
    .canvas-container {
        max-width: 100%;
        margin: 15px auto;
        padding: 15px;
        max-height: 70vh;
        border-radius: 10px;
    }
    
    #imageCanvas {
        max-height: 60vh;
        border-radius: 6px;
    }
    
    .canvas-container[data-image-type="portrait"] {
        max-width: 400px;
    }
    
    .canvas-container[data-image-type="landscape"] {
        max-width: 100%;
    }
    
    .canvas-container[data-image-type="square"] {
        max-width: 450px;
    }
}

/* Mobile phones (640px and down) */
@media (max-width: 640px) {
    .canvas-container {
        margin: 10px auto;
        padding: 12px;
        max-height: 65vh;
        border-radius: 8px;
        border-width: 1px;
    }
    
    #imageCanvas {
        max-height: 55vh;
        border-radius: 4px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    
    .canvas-container[data-image-type="portrait"] {
        max-width: 320px;
    }
    
    .canvas-container[data-image-type="very-tall"] #imageCanvas {
        max-height: 50vh;
    }
    
    .canvas-container[data-image-type="small"] {
        min-height: 250px;
        max-width: 350px;
    }
}

/* Small phones (480px and down) */
@media (max-width: 480px) {
    .canvas-container {
        margin: 8px auto;
        padding: 10px;
        max-height: 60vh;
        min-height: 150px;
    }
    
    #imageCanvas {
        max-height: 50vh;
        min-height: 120px;
    }
    
    .canvas-container[data-image-type="portrait"] {
        max-width: 280px;
    }
    
    .canvas-container[data-image-type="landscape"] {
        max-width: 100%;
    }
    
    .canvas-container[data-image-type="square"] {
        max-width: 300px;
    }
    
    .canvas-container[data-image-type="very-tall"] #imageCanvas {
        max-height: 45vh;
    }
    
    .canvas-container[data-image-type="small"] {
        min-height: 200px;
        max-width: 280px;
    }
    
    .canvas-container[data-image-type="small"] #imageCanvas {
        min-width: 150px;
        min-height: 100px;
    }
}

/* Extra small phones (360px and down) */
@media (max-width: 360px) {
    .canvas-container {
        padding: 8px;
        max-height: 55vh;
    }
    
    #imageCanvas {
        max-height: 45vh;
    }
    
    .canvas-container[data-image-type="portrait"] {
        max-width: 250px;
    }
    
    .canvas-container[data-image-type="square"] {
        max-width: 270px;
    }
}

/* Landscape orientation for mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .canvas-container {
        max-height: 80vh;
    }
    
    #imageCanvas {
        max-height: 70vh;
    }
    
    .canvas-container[data-image-type="very-tall"] #imageCanvas {
        max-height: 65vh;
    }
}

/* ===== JAVASCRIPT HELPER CLASSES ===== */
/* Add these classes via JavaScript based on image dimensions */

/* For images with aspect ratio > 1.5 (wide) */
.canvas-wide #imageCanvas {
    width: 100%;
    height: auto;
    max-width: 100%;
}

/* For images with aspect ratio < 0.7 (tall) */
.canvas-tall #imageCanvas {
    width: auto;
    height: 100%;
    max-height: 70vh;
}

/* For perfect squares or near-squares (0.8 < ratio < 1.2) */
.canvas-square #imageCanvas {
    max-width: 90%;
    max-height: 90%;
}

/* Very small images (< 300px in either dimension) */
.canvas-small #imageCanvas {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    min-width: 200px;
    min-height: 150px;
}

/* Very large images optimization */
.canvas-large #imageCanvas {
    image-rendering: auto;
    image-rendering: smooth;
}

/* Debug info positioning */
.canvas-debug-info {
    position: absolute;
    bottom: 5px;
    left: 5px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 4px 8px;
    font-family: monospace;
    font-size: 10px;
    border-radius: 3px;
    z-index: 100;
    pointer-events: none;
}

@media (max-width: 480px) {
    .canvas-debug-info {
        font-size: 8px;
        padding: 2px 6px;
    }
}

/* Debug overlay */
.canvas-debug-info {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 5px 10px;
    font-family: monospace;
    border-radius: 3px;
    z-index: 100;
}
        .btn:hover {
            transform: translateY(-2px);
            box-shadow: var(--shadow-lg);
        }

        .btn-secondary {
          color: var(--ink-light);
          background: none;
          border: 2px solid var(--ink-light);
          margin-top: 1rm;

        }

        .btn-danger {
            background: #ef4444;
        }

        .btn-success {
            background: #22c55e;
        }

        /* Messages */
        .error-message, .success-message {
            padding: 15px;
            margin: 20px 0;
            border-radius: 8px;
            display: none;
        }

        .error-message {
            background: #fef2f2;
            color: #dc2626;
            border: 1px solid #fecaca;
        }

        .success-message {
            background: #f0f9f0;
            color: #16a34a;
            border: 1px solid #bbf7d0;
        }

        /* Editor Section */
        .editor-section {
            display: none;
            margin-bottom: 30px;
        }

      .editor-controls {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 15px 10px; /* Reduced side padding */
}


.brush-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.brush-size {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 150px;
}

        .action-buttons {
            display: flex;
            gap: 10px;
        }

       .canvas-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 100%;
    max-height: 100%;
}
        .canvas-container {
            position: relative;
            border: 2px solid var(--paper-border);
            border-radius: 8px;
            overflow: hidden;
            background: var(--paper-white);
        }

        #imageCanvas, #maskCanvas {
            position: absolute;
            top: 0;
            left: 0;
            cursor: crosshair;
        }

        #maskCanvas {
            pointer-events: none;
        }

        /* Loading */
        .loading {
            display: none;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 60px;
            text-align: center;
        }

        .spinner {
            width: 40px;
            height: 40px;
            border: 4px solid var(--paper-border);
            border-top: 4px solid var(--accent-warm);
            border-radius: 50%;
            animation: spin 1s linear infinite;
            margin-bottom: 20px;
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        .loading-text {
            color: var(--ink-medium);
            font-size: 1.1rem;
        }

        /* Results */
        .results-section {
            display: none;
            margin-top: 40px;
        }

        .results-icon {
    width: 1.2em;
    height: 1.2em;
    vertical-align: middle;
    margin-right: 8px;
    color: var(--accent-warm); /* Matches your theme */
 animation: checkmark 0.5s ease-in-out;
    transform-origin: center;
}

@keyframes checkmark {
    0% { transform: scale(0); opacity: 0; }
    80% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

        /* UPDATED CSS - Replace your existing comparison styles */
.comparison {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    align-items: flex-start;
    margin-top: 20px;
}

.comparison-item {
    flex: 1;
    min-width: 300px;
    max-width: 400px;
    text-align: center;
    background: var(--card-bg);
    border: var(--card-border);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.comparison-item h3 {
    margin-bottom: 15px;
    color: var(--ink-dark);
    font-size: 1.1rem;
    font-weight: 600;
}

.comparison-item img {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain; /* This ensures the full image is visible */
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background: #f8f9fa; /* Light background for transparency */
    display: block;
    margin: 0 auto; /* Center the image */
}

/* Results section styling */
.results-section {
    display: none;
    padding: 40px 20px;
    background: var(--paper-white);
    border-radius: 16px;
    margin-top: 20px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.results-icon {
    width: 24px;
    height: 24px;
    margin-right: 8px;
    color: var(--accent-warm);
}

/* Responsive design for comparison */


        /* New Sections */
        .steps-section {
            margin: 60px 0;
            padding: 40px 0;
        }

        .steps-container {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 30px;
            margin-top: 40px;
        }

        .step-card {
            background: var(--card-bg);
            border: var(--card-border);
            border-radius: 16px;
            padding: 30px;
            text-align: center;
            transition: all 0.3s ease;
        }

        .step-card:hover {
            transform: translateY(-5px);
            box-shadow: var(--shadow-elevation);
        }

        .step-number {
            width: 60px;
            height: 60px;
            background: var(--accent-warm);
            color: white;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.5rem;
            font-weight: bold;
            margin: 0 auto 20px;
        }

        .step-title {
            font-size: 1.3rem;
            font-weight: 600;
            font-family: var(--head-fonts);
            margin-bottom: 15px;
            color: var(--ink-dark);
        }

        .step-description {
            color: var(--ink-medium);
            font-size: 1rem;
            font-family: var(--dis-fonts);
        }

        /* ===== Video Container Styles ===== */
.video-container {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 
              0 10px 10px -5px rgba(0, 0, 0, 0.04);
  transform: translateZ(0);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin: 0 auto; /* Center the video */
}


.video-container video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}



/* Optional: Add a subtle noise texture */


/* ===== Video Showcase Layout ===== */
.video-showcase {
  margin: 60px 0; /* Reduced margin for mobile */
  border-radius: 16px;
  overflow: hidden;
}

.video-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  min-height: 400px;
  gap: 0; /* Remove gap that can cause issues */
}

.video-text {
  padding: 60px;
  position: relative;
  z-index: 2;
}

.video-title {
            font-family: var(--head-fonts);
  font-weight: 800;
  font-size: 2.5rem;
  line-height: 1.2;
  margin-bottom: 24px;
  -webkit-background-clip: text;
  background-clip: text;
  color: var(--ink-dark);
}

.video-description {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--ink-medium);
  margin-bottom: 32px;
  max-width: 90%;
            font-family: var(--dis-fonts);
}

.video-button {
  display: inline-flex;
  align-items: center;
  padding: 12px 24px;
  background: var(--ink-dark);
  color: var(--paper-white);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.video-button:hover {
  transform: translateY(-2px);
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 1024px) {
  .video-content {
    grid-template-columns: 1fr;
  }
  
  .video-text {
    padding: 40px;
    order: 2;
  }
  
  .video-container {
    order: 1;
    padding-bottom: 75%; /* Taller aspect ratio for mobile */
  }
  
  .video-title {
    font-size: 2rem;
  }
}

@media (max-width: 640px) {
  .video-showcase {
    margin: 60px 0;
    border-radius: 16px;
  }
  
  .video-text {
    padding: 30px;
  }
  
  .video-title {
    font-size: 1.8rem;
  }
  
  .video-description {
    font-size: 1rem;
    max-width: 100%;
  }
  
  .video-button {
    padding: 10px 20px;
  }
}


       /* Tools Section - Centered & Responsive */
.tools-section {
  margin: 60px 0;
  text-align: center;
}

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

.tool-card {
  background: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  text-decoration: none;
  box-shadow: var(--shadow-md);
  border: var(--card-border);
}

.tool-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.tool-image {
  height: 140px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.tool-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.15) 100%);
}

.tool-info {
  padding: 16px;
  text-align: left;
}

.tool-title {
  font-family: 'Manrope', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--ink-dark);
}

.tool-description {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  color: var(--ink-medium);
  line-height: 1.4;
}

/* Responsive Behavior */

   .section-title {
            font-size: 2.5rem;
            font-weight: 800;
            margin-bottom: 50px;
            color: var(--ink-dark);
                        font-family: var(--head-fonts);

        }
        .see-all-tools {
            margin-top: 40px;
        }

       
        .see-all-btn {
            background: var(--ink-dark);
            color: var(--paper-white);
            padding: 16px 32px;
            border-radius: 10px;
            text-decoration: none;
            font-weight: 600;
            display: inline-block;
            transition: all 0.3s ease;
        }

        .see-all-btn:hover {
            transform: translateY(-2px);
            box-shadow: var(--shadow-lg);
        }

       

        /* Responsive Design */
       


        .header-icon {
    width: 1em;
    height: 1em;
    vertical-align: middle;
    margin-right: 10px;
    color: var(--accent-warm);
}

.step-card {
    background: var(--card-bg);
    border: var(--card-border);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.step-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    background: var(--accent-warm);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    padding: 15px;
}

.step-icon svg {
    width: 100%;
    height: 100%;
    stroke-width: 1.5;
}

.step-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-elevation);
}

.step-card:hover .step-icon {
    background: color-mix(in srgb, var(--accent-warm) 90%, black);
}

@media (max-width: 1024px) {
  .video-content {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .video-text {
    padding: 30px 20px;
    order: 2;
  }
  
  .video-container {
    order: 1;
    padding-bottom: 60%; /* Slightly taller for tablets */
    width: 95%;
    margin: 0 auto;
  }
  
  .video-title {
    font-size: 2rem;
  }
  
  .container {
    padding: 15px;
  }
}

/* Tablets (768px and down) */
@media (max-width: 768px) {
  .header h1 {
    font-size: 2rem;
  }
  
  .video-showcase {
    margin: 40px 0;
  }
  
  .video-text {
    padding: 25px 15px;
    text-align: center; /* Center text on mobile */
  }
  
  .video-container {
    width: 100%;
    padding-bottom: 65%;
    border-radius: 12px;
  }
  
  .video-title {
    font-size: 1.8rem;
    margin-bottom: 16px;
  }
  
  .video-description {
    font-size: 1rem;
    margin-bottom: 24px;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .steps-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .comparison {
    flex-direction: column;
    gap: 15px;
  }
  
  .comparison-item {
    min-width: 100%;
    max-width: 100%;
    padding: 15px;
  }
}

/* Small phones (640px and down) */
@media (max-width: 640px) {
  .container {
    padding: 10px;
  }
  
  .header {
    margin-bottom: 30px;
  }
  
  .header h1 {
    font-size: 1.8rem;
    margin-bottom: 8px;
  }
  
  .header p {
    font-size: 1rem;
  }
  
  .video-showcase {
    margin: 30px 0;
    border-radius: 12px;
  }
  
  .video-text {
    padding: 20px 15px;
  }
  
  .video-container {
    width: 100%;
    padding-bottom: 70%; /* Taller for small screens */
    border-radius: 10px;
  }
  
  .video-title {
    font-size: 1.5rem;
    line-height: 1.3;
    margin-bottom: 12px;
  }
  
  .video-description {
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 20px;
    max-width: 100%;
  }
  
  .video-button {
    padding: 10px 20px;
    font-size: 0.9rem;
  }
  
  .section-title {
    font-size: 1.8rem;
    margin-bottom: 30px;
  }
  
  .upload-area {
    padding: 15px;
  }
  
  .upload-text {
    font-size: 0.9rem;
  }
  
  .btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }
  
  .step-card {
    padding: 20px;
  }
  
  .step-number {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }
  
  .step-title {
    font-size: 1.1rem;
  }
  
  .step-description {
    font-size: 0.9rem;
  }
}

/* Extra small phones (480px and down) */
@media (max-width: 480px) {
  .container {
    padding: 8px;
  }
  
  .header h1 {
    font-size: 1.6rem;
  }
  
  .video-text {
    padding: 15px 10px;
  }
  
  .video-container {
    padding-bottom: 75%; /* Even taller for very small screens */
    border-radius: 8px;
  }
  
  .video-title {
    font-size: 1.3rem;
  }
  
  .video-description {
    font-size: 0.85rem;
  }
  
  .section-title {
    font-size: 1.6rem;
    margin-bottom: 25px;
  }
  
  .tools-grid {
    grid-template-columns: 1fr;
    gap: 15px;
    padding: 0 10px;
  }
  
  .tool-image {
    height: 100px;
  }
  
  .tool-info {
    padding: 12px;
  }
  
  .comparison-item {
    padding: 12px;
  }
  
  .comparison-item img {
    max-height: 250px;
  }
  
  .canvas-container {
    padding: 8px;
    min-height: 150px;
  }
  
  #imageCanvas, #maskCanvas {
    max-height: 50vh;
  }
  
  .editor-controls {
    padding: 10px 5px;
    gap: 10px;
  }
  
  .brush-controls, .action-buttons {
    gap: 8px;
  }
  
  .btn {
    padding: 8px 16px;
    font-size: 0.85rem;
  }
}

/* Landscape orientation fixes for phones */
@media (max-width: 768px) and (orientation: landscape) {
  .video-container {
    padding-bottom: 45%; /* Shorter in landscape */
  }
  
  .video-text {
    padding: 20px 15px;
  }
  
  .video-title {
    font-size: 1.6rem;
  }
  
  #imageCanvas, #maskCanvas {
    max-height: 40vh; /* Shorter canvas in landscape */
  }
}

/* Fix for very wide but short screens */
@media (min-width: 769px) and (max-height: 500px) {
  .video-container {
    padding-bottom: 35%;
  }
}



/* Upload Wrapper with Showcase Images */
.fantasy-decoration {
  position: relative;
  width: 100vw; /* Full viewport width */
  left: 50%; /* Center hack */
  transform: translateX(-50%); /* Center hack */
  overflow: hidden;
  margin: 0;
  padding: 0;
}

.fantasy-bg {
  width: 100%;
  height: auto;
  display: block;
  margin: 0;
  padding: 0;
}

/* For a full-width background effect */
.fantasy-decoration.full-width {
  margin: 0;
  height: 200px; /* Adjust height */
}

.fantasy-decoration.full-width .fantasy-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .fantasy-decoration {
    margin-top: -30px;
  }
  
  .fantasy-decoration.full-width {
    height: 150px;
  }
}

@media (max-width: 480px) {
  .fantasy-decoration {
    margin-top: -20px;
  }
  
  .fantasy-decoration.full-width {
    height: 100px;
  }
}

.upload-showcase-wrapper {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
}

/* Left Showcase Image (Skewed) */
.showcase-left {
    position: absolute;
    left: -20px;
    top: 20px;
    z-index: 1;
    opacity: 0.9;
    transition: all 0.3s ease;
}

.showcase-left img {
    width: 160px;
    height: 200px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: var(--shadow-lg);
    border: 2px solid var(--paper-border);
    transform: rotate(-8deg) translateY(-10px);
    transition: all 0.3s ease;
}

.showcase-left:hover {
    opacity: 1;
    transform: scale(1.05);
}

.showcase-left:hover img {
    transform: rotate(-5deg) translateY(-15px);
    box-shadow: var(--shadow-elevation);
}

/* Right Showcase Image (Lower Position) */
.showcase-right {
    position: absolute;
    right: -20px;
    top: 140px;
    z-index: 1;
    opacity: 0.9;
    transition: all 0.3s ease;
}

.showcase-right img {
    width: 160px;
    height: 200px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: var(--shadow-lg);
    border: 2px solid var(--paper-border);
    transform: rotate(5deg);
    transition: all 0.3s ease;
}

.showcase-right:hover {
    opacity: 1;
    transform: scale(1.05);
}

.showcase-right:hover img {
    transform: rotate(8deg) translateY(-5px);
    box-shadow: var(--shadow-elevation);
}

/* Upload Section */
.upload-section {
    background: var(--card-bg);
    border: var(--card-border);
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow-md);
    max-width: 400px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* Modern Upload Area */
.upload-area-modern {
    background: var(--paper-white);
    border: 2px dashed var(--accent-warm);
    border-radius: 16px;
    padding: 40px 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.upload-area-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 49%, var(--accent-glow) 50%, transparent 51%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.upload-area-modern:hover,
.upload-area-modern.dragover {
    border-color: var(--accent-warm);
    background: var(--accent-glow);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.upload-area-modern:hover::before,
.upload-area-modern.dragover::before {
    opacity: 0.1;
}

.upload-content {
    position: relative;
    z-index: 2;
}

.upload-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    opacity: 0.8;
}

.upload-area-modern h3 {
    color: var(--ink-dark);
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.upload-subtitle {
    color: var(--ink-medium);
    font-size: 0.95rem;
    margin-bottom: 20px;
    opacity: 0.8;
}

.btn-upload {
    background: var(--accent-warm);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.btn-upload:hover {
    background: color-mix(in srgb, var(--accent-warm) 90%, black);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.file-input {
    display: none;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .showcase-left {
        left: 10px;
    }
    
    .showcase-right {
        right: 10px;
    }
}

@media (max-width: 768px) {
    .upload-showcase-wrapper {
        padding: 40px 20px;
    }
    
    .showcase-left {
        left: -10px;
        top: 10px;
    }
    
    .showcase-left img {
        width: 120px;
        height: 150px;
    }
    
    .showcase-right {
        right: -10px;
        top: 120px;
    }
    
    .showcase-right img {
        width: 120px;
        height: 150px;
    }
    
    .upload-section {
        padding: 30px;
        max-width: 350px;
    }
    
    .upload-area-modern {
        padding: 30px 20px;
    }
}

@media (max-width: 480px) {
    .showcase-left,
    .showcase-right {
        display: none;
    }
    
    .upload-section {
        max-width: 100%;
        margin: 0;
    }
}
