
/* SEO-Friendly Heading Styles */
.seo-subtitle {
  font-size: 18px;
  color: #555;
  margin-bottom: 20px;
  font-weight: normal;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 768px) {
  .seo-subtitle {
    font-size: 16px;
  }
}

/* Ensuring H1 is properly styled */
.resizer-card h1 {
  color: #212529;
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 10px;
  content-visibility: auto;
  contain-intrinsic-size: 0 50px;
  display: block;
}

@media (max-width: 480px) {
  .resizer-card h1 {
    font-size: 22px;
  }
}

/* FAQ Section Styles */
.faq-container {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: #fff;
  border: 1px solid #e1e4e8;
  border-radius: 8px;
  margin-bottom: 16px;
  overflow: hidden;
}

.faq-question {
  padding: 20px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.3s ease;
}

.faq-question:hover {
  background-color: #f8f9fa;
}

.faq-question h3 {
  margin: 0;
  font-size: 18px;
  color: #333;
}

.toggle-icon {
  font-size: 24px;
  color: #666;
}

.faq-answer {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
  padding: 20px;
  max-height: none;
}

.faq-item.active .toggle-icon {
  transform: rotate(45deg);
}

@media (max-width: 768px) {
  .faq-question h3 {
    font-size: 16px;
  }

  .faq-answer p {
    font-size: 14px;
  }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
}

/* Optimize paint performance */
.image-container, .editor-container, .preview-container {
  transform: translateZ(0);
  backface-visibility: hidden;
  perspective: 1000px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Optimize paint performance */
.image-container, .editor-container, .preview-container {
  transform: translateZ(0);
  backface-visibility: hidden;
  perspective: 1000px;
}

.skip-to-content {
  position: absolute;
  top: -40px;
  left: 0;
  background: #1e88e5;
  color: white;
  padding: 8px;
  z-index: 100;
  transition: top 0.3s;
}

.skip-to-content:focus {
  top: 0;
}

body {
  background-color: #f5f7f8;
  min-height: 100vh;
  padding-top: 90px;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Header Styles - Floating Card Design */
header {
  background-color: #1e88e5;
  padding: 15px 0;
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 30px);
  max-width: 1200px;
  z-index: 1000;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
}

header:hover {
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2), 0 3px 10px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
  header {
    width: calc(100% - 20px);
    top: 8px;
    border-radius: 15px;
  }
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, #5563d1 0%, #5c3a7a 100%);
  padding: 40px 20px;
  color: white;
}

.hero-title {
  font-size: 32px;
  font-weight: 500;
  margin-bottom: 15px;
  color: white;
}

.hero-description {
  font-size: 16px;
  line-height: 1.6;
  max-width: 800px;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
  .hero-section {
    padding: 30px 20px;
  }
  
  .hero-title {
    font-size: 24px;
  }
  
  .hero-description {
    font-size: 14px;
  }
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.header-buttons {
  display: flex;
  align-items: center;
  gap: 15px;
}





header h1 {
  color: white;
  font-size: 24px;
  font-weight: 600;
}

.menu-toggle {
  background: none;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  padding: 5px;
  margin-right: 15px;
}

header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

header h1 {
  flex: 1;
  margin: 0;
}

.menu-toggle:hover {
  opacity: 0.8;
}

.share-button {
  background: none;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  padding: 5px;
  margin-left: 15px;
  transition: opacity 0.3s ease, transform 0.2s ease;
}

.share-button:hover {
  opacity: 0.8;
  transform: scale(1.1);
}

.share-button:active {
  transform: scale(0.95);
}

.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  border-radius: 4px;
  padding: 10px 0;
  z-index: 1000;
}

.mobile-menu.active {
  display: block;
}

.mobile-menu a {
  display: block;
  padding: 10px 20px;
  color: #333;
  text-decoration: none;
  transition: background 0.3s;
}

.mobile-menu a:hover {
  background: #f5f5f5;
}

/* Main Content */
main {
  padding: 10px 0;
}

.resizer-card {
  background-color: white;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  padding: 30px;
  margin-top: 20px;
  text-align: center;
}

h2 {
  color: #212529;
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 15px;
}

.description {
  color: #444a50;
  font-size: 16px;
  margin-bottom: 30px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Upload Box */
.upload-container {
  max-width: 450px;
  margin: 0 auto;
}

.upload-box {
  border: 2px dashed #3b82f6;
  border-radius: 8px;
  padding: 40px 20px;
  text-align: center;
  background-color: #f0f7ff;
  cursor: pointer;
  transition: all 0.3s ease;
}

.upload-box:hover {
  background-color: #e6f0ff;
}

.upload-icon-modern {
  width: 100px;
  height: 100px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.upload-box:hover .upload-icon-modern {
  transform: translateY(-5px) scale(1.05);
  filter: brightness(1.1);
}

.upload-icon-modern img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.upload-text {
  color: #212529;
  font-size: 16px;
  margin-bottom: 10px;
}

.error-message {
  background-color: #fee2e2;
  color: #dc2626;
  padding: 8px 12px;
  border-radius: 4px;
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: fadeIn 0.3s ease;
}

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

.supported-formats {
  color: #555b61;
  font-size: 14px;
  margin-bottom: 20px;
  font-weight: 500;
}

.choose-file-btn {
  background-color: #3b82f6;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.choose-file-btn:hover {
  background-color: #2563eb;
}

/* File Preview */
.file-preview {
  margin-top: 20px;
  height: 400px;
  display: flex;
  flex-direction: column;
}

.file-item {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 15px;
  background-color: #f0f7ff;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.file-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background-color: #f0f7ff;
  flex: 1;
  aspect-ratio: 1;
  contain: layout paint;
}

/* Prevent layout shifts by reserving space */
img {
  max-width: 100%;
  height: auto;
  aspect-ratio: attr(width) / attr(height);
}

/* Reserve space for dynamic content */
[data-height] {
  min-height: var(--min-height);
  contain: layout paint;
}

.file-info {
  padding: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #f0f7ff;
}

.file-details {
  text-align: left;
}

.file-size, .file-dimensions {
  color: #6c757d;
  font-size: 14px;
}

.delete-btn {
  background-color: #ef4444;
  color: white;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.delete-btn:hover {
  background-color: #dc2626;
}

/* Action Buttons */
.action-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}

.reset-btn {
  background-color: white;
  color: #212529;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  display: flex;
  align-items: center;
  gap: 5px;
}

.reset-btn:hover {
  background-color: #f5f5f5;
}

.next-btn {
  background-color: #3b82f6;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  display: flex;
  align-items: center;
  gap: 5px;
}

.next-btn:hover, .next-btn:focus {
  background-color: #2563eb;
  outline: 2px solid #0047b3;
  outline-offset: 2px;
}

/* Step 2: Type Selection */
.step-title {
  font-size: 24px;
  margin-bottom: 30px;
  color: #212529;
}

.type-options {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.type-option {
  cursor: pointer;
}

.type-option input[type="radio"] {
  display: none;
}

.type-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 160px;
  height: 120px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  padding: 15px;
  transition: all 0.3s ease;
  background-color: white;
}

.type-option input[type="radio"]:checked + .type-card {
  border-color: #3b82f6;
  background-color: #f0f7ff;
}

.type-card i {
  font-size: 32px;
  margin-bottom: 10px;
  color: #424242;
}

.type-option input[type="radio"]:checked + .type-card i {
  color: #3b82f6;
}

.type-card span {
  font-size: 16px;
  font-weight: 500;
  color: #424242;
}

.back-btn {
  background-color: white;
  color: #212529;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  display: flex;
  align-items: center;
  gap: 5px;
}

.back-btn:hover {
  background-color: #f5f5f5;
}

/* Button Disabled State */
.next-btn:disabled {
  background-color: #94a3b8;
  cursor: not-allowed;
}

.next-btn:disabled:hover {
  background-color: #94a3b8;
}

/* Step 3: Editor Containers */
.editor-container {
  max-width: 750px;
  margin: 0 auto;
}

.editor-wrapper {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.editing-symbols {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin: 15px 0;
  flex-wrap: wrap;
}

.edit-symbol {
  background-color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid #e0e0e0;
  transition: all 0.2s ease;
  font-size: 20px;
  color: #333;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.edit-symbol:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  background-color: #f0f7ff;
  border-color: #3b82f6;
  color: #3b82f6;
}

.editor-panel {
  margin-top: 10px;
  padding: 15px;
  border-radius: 5px;
  background-color: rgba(0, 0, 0, 0.05);
  display: none;
}

.editor-panel.active {
  display: block;
}

.slider-value {
  margin-left: 10px;
  font-size: 0.9em;
  font-weight: bold;
  color: #555;
}

@media (min-width: 768px) {
  .image-container {
    flex: 1;
  }
}

.image-container {
  position: relative;
  background-color: #f0f0f0;
  border-radius: 8px;
  overflow: hidden;
  height: 400px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Image Editor Area */
.image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 10;
}

/* Photo Selection Overlay */
.photo-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  pointer-events: none;
}

.photo-overlay-area {
  position: absolute;
  width: 243px;
  height: 307px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(255, 255, 255, 0.15);
  border: 2px solid white;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.6);
  z-index: 6;
}

/* Document overlay has been removed */

.image-canvas-container {
  position: relative;
  cursor: move;
  overflow: hidden;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.image-canvas-container canvas {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Image editing controls */
.zoom-value {
  margin: 0 10px;
  font-size: 14px;
  font-weight: bold;
  color: #333;
  user-select: none;
}

.editor-controls {
  background-color: white;
  padding: 15px;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.control-group {
  margin-bottom: 15px;
}

.control-label {
  display: block;
  margin-bottom: 5px;
  color: #6c757d;
  font-size: 14px;
}

.control-slider {
  width: 100%;
  height: 6px;
  appearance: none;
  border-radius: 3px;
  background-color: #e0e0e0;
  outline: none;
}

.control-slider::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: #3b82f6;
  cursor: pointer;
}

.control-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: #3b82f6;
  cursor: pointer;
}

.control-btn {
  background-color: white;
  color: #212529;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 8px 15px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin-right: 5px;
  margin-bottom: 5px;
}

.control-btn:hover {
  background-color: #f5f5f5;
}

.download-btn {
  background-color: #3b82f6;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 10px 20px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  width: 100%;
}

.download-btn:hover {
  background-color: #2563eb;
}

.preview-btn {
  background-color: #3b82f6;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  display: flex;
  align-items: center;
  gap: 5px;
}

.preview-btn:hover {
  background-color: #2563eb;
}

.size-info {
  margin: 15px 0;
  text-align: center;
}

.size-text {
  color: #6c757d;
  font-size: 14px;
}

/* Crop Overlay */
.crop-overlay {
  position: absolute;
  border: 2px solid #1e90ff;
  background-color: rgba(30, 144, 255, 0.1);
  z-index: 10;
  cursor: move;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.75);
}

.crop-handle {
  position: absolute;
  width: 10px;
  height: 10px;
  background-color: #1e90ff;
  border: 2px solid white;
  border-radius: 50%;
  z-index: 11;
}

.crop-handles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.crop-handle {
  position: absolute;
  width: 14px;
  height: 14px;
  background-color: white;
  border: 2px solid #3b82f6;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  z-index: 11;
}

.crop-handle.tl {
  top: -7px;
  left: -7px;
  cursor: nwse-resize;
}


/* Specifications Section */
.specifications-section {
  padding: 60px 0;
  background-color: #eef2f6;
  margin-top: 40px;
}

.specs-title {
  text-align: center;
  margin-bottom: 40px;
  color: #333;
  position: relative;
}

.specs-title:after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background-color: #3b82f6;
  margin: 15px auto 0;
  border-radius: 2px;
}

.specs-container {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin: 0 auto;
  max-width: 1200px;
  flex-direction: row;
  flex-wrap: wrap;
}

.specs-card {
  flex: 1;
  width: calc(33.33% - 14px);
  min-width: 250px;
  max-width: 350px;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
  cursor: pointer;
  background-color: white;
}

.specs-card.selected {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.photo-specs.selected {
  background-color: #e6f0ff;
  border: 2px solid #1e63e0;
}

.signature-specs.selected {
  background-color: #e6ffe6;
  border: 2px solid #17a160;
}

.document-specs.selected {
  background-color: #ffe6e6;
  border: 2px solid #cc3f3f;
}

.photo-specs.selected {
  background-color: #e6f0ff;
  border: 2px solid #1e63e0;
}

.signature-specs.selected {
  background-color: #e6ffe6;
  border: 2px solid #17a160;
}

.document-specs.selected {
  background-color: #ffe6e6;
  border: 2px solid #cc3f3f;
}

.specs-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.specs-header {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.specs-header i {
  font-size: 24px;
  margin-right: 15px;
}

.specs-header h3 {
  font-size: 20px;
  font-weight: 600;
  margin: 0;
}

.specs-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.specs-list li {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  font-size: 16px;
}

.specs-list li:last-child {
  margin-bottom: 0;
}

.specs-list li i {
  margin-right: 10px;
  font-size: 14px;
}

/* Photo Specifications Card - Light Blue */
.photo-specs {
  background-color: #f0f5ff;
  border: 1px solid #e1e9ff;
}

.photo-specs .specs-header i,
.photo-specs .specs-list li i {
  color: #1e63e0;
}

/* Signature Specifications Card - Light Green */
.signature-specs {
  background-color: #f0fff5;
  border: 1px solid #e1ffd9;
}

.signature-specs .specs-header i,
.signature-specs .specs-list li i {
  color: #17a160;
}

/* Document Requirements Card - Light Red */
.document-specs {
  background-color: #fff5f5;
  border: 1px solid #ffe1e1;
}

.document-specs .specs-header i,
.document-specs .specs-list li i {
  color: #cc3f3f;
}

/* Responsive adjustments for specifications section */
@media (max-width: 900px) {
  .specs-container {
    flex-direction: column;
    align-items: center;
  }

  .specs-card {
    width: 100%;
    max-width: 500px;
  }
}

@media (max-width: 480px) {
  .specs-header h3 {
    font-size: 18px;
  }

  .specs-list li {
    font-size: 14px;
  }
}

/* Key Features Section */
.key-features-section {
  padding: 60px 0;
  background-color: #ffffff;
}

.features-title {
  text-align: center;
  margin-bottom: 15px;
  color: #333;
  position: relative;
}

.features-description {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 40px;
  color: #666;
  font-size: 18px;
}

.features-container {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
}

.feature-card {
  background-color: #ffffff;
  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  padding: 25px;
  flex: 1;
  min-width: 280px;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.feature-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

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

.feature-content h3 {
  font-size: 22px;
  margin-bottom: 20px;
  color: #333;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.feature-list li {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  color: #555;
}

.feature-list li i {
  color: #4cd471;
  margin-right: 10px;
  font-size: 14px;
}

@media (max-width: 900px) {
  .features-container {
    flex-direction: column;
    align-items: center;
  }

  .feature-card {
    width: 100%;
    max-width: 500px;
  }
}

@media (max-width: 480px) {
  .features-description {
    font-size: 16px;
    padding: 0 15px;
  }

  .feature-content h3 {
    font-size: 20px;
  }

  .feature-list li {
    font-size: 14px;
  }
}

/* How to Use Section Responsive */
@media (max-width: 768px) {
  .how-to-steps {
    padding: 20px !important;
    margin: 20px auto !important;
  }

  .step-item {
    margin-bottom: 15px !important;
  }

  .step-item p {
    font-size: 14px !important;
  }
}

.crop-handle.tr {
  top: -7px;
  right: -7px;
  cursor: nesw-resize;
}

.crop-handle.bl {
  bottom: -7px;
  left: -7px;
  cursor: nesw-resize;
}

.crop-handle.br {
  bottom: -7px;
  right: -7px;
  cursor: nwse-resize;
}

.crop-handle.tc {
  top: -7px;
  left: 50%;
  transform: translateX(-50%);
  cursor: ns-resize;
}

.crop-handle.rc {
  top: 50%;
  right: -7px;
  transform: translateY(-50%);
  cursor: ew-resize;
}

.crop-handle.bc {
  bottom: -7px;
  left: 50%;
  transform: translateX(-50%);
  cursor: ns-resize;
}

.crop-handle.lc {
  top: 50%;
  left: -7px;
  transform: translateY(-50%);
  cursor: ew-resize;
}

.crop-info {
  color: #333;
  font-size: 14px;
  margin-bottom: 5px;
}

.crop-dimensions {
  color: #1e90ff;
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 10px;
}

.crop-preview-container {
  background-color: #f8f9fa;
  padding: 10px;
  border-radius: 5px;
  margin-top: 15px;
}

.crop-preview-title {
  font-size: 14px;
  color: #333;
  margin-bottom: 10px;
}

.crop-preview-image-container {
  display: flex;
  justify-content: center;
  background-color: #fff;
  padding: 5px;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.crop-preview-image {
  max-width: 100%;
  max-height: 200px;
  object-fit: contain;
}

/* Preview Overlay */
.preview-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 20px;
}

.preview-container {
  background-color: white;
  width: 90%;
  max-width: 600px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  overflow: hidden;
  position: relative;
}

.preview-header {
  padding: 15px 20px;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.preview-header h3 {
  margin: 0;
  font-size: 18px;
  color: #212529;
}

.preview-close-btn {
  position: absolute;
  left: 16px;
  top: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #1e88e5;
  border: none;
  color: white;
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  z-index: 10;
  padding: 0;
}

.preview-close-btn:hover {
  background-color: #1976d2;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transform: scale(1.05);
}

.preview-close-btn:focus-visible {
  outline: 3px solid #90caf9;
  outline-offset: 2px;
}

.preview-close-btn:active {
  background-color: #1565c0;
  transform: scale(0.95);
}

/* Mobile: Larger touch target */
@media (max-width: 768px) {
  .preview-close-btn {
    width: 44px;
    height: 44px;
    font-size: 26px;
    left: 12px;
    top: 12px;
  }
}

.preview-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-y: auto;
}

.preview-image {
  max-width: 100%;
  max-height: 50vh;
  margin-bottom: 20px;
  border: 1px solid #e0e0e0;
  background-color: #f9f9f9;
}

.preview-file-info {
  width: 100%;
  margin-bottom: 20px;
  color: #6c757d;
  font-size: 14px;
  text-align: center;
}

.preview-file-info p {
  margin: 5px 0;
}

.preview-download-btn {
  background-color: #3b82f6;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.preview-download-btn:hover {
  background-color: #2563eb;
}

/* Responsive */
/* Base Mobile First Styles */
@media (max-width: 480px) {
  .resizer-card {
    padding: 15px 10px;
  }

  h2 {
    font-size: 20px;
  }

  .description {
    font-size: 14px;
  }

  .upload-box {
    padding: 20px 10px;
  }

  .upload-icon-modern {
    width: 80px;
    height: 80px;
  }
  
  .upload-icon-modern img {
    width: 100%;
    height: 100%;
  }

  .quick-links {
    gap: 10px;
  }

  .quick-links a {
    font-size: 13px;
  }

  .preview-container {
    width: 95%;
    padding: 15px;
  }

  .editor-controls {
    padding: 10px;
  }

  .control-btn {
    font-size: 13px;
    padding: 6px 12px;
  }

  .type-card {
    width: 100px;
    height: 80px;
  }

  .features-container {
    gap: 15px;
  }

  .feature-card {
    padding: 15px;
  }
}

/* Tablet Styles */
@media (min-width: 481px) and (max-width: 768px) {
  .resizer-card {
    padding: 20px 15px;
  }

  h2 {
    font-size: 24px;
  }

  .upload-box {
    padding: 30px 15px;
  }
  
  .type-card {
    width: 130px;
    height: 100px;
  }

  .editor-controls {
    padding: 15px;
  }

  .feature-card {
    min-width: 220px;
  }
}

/* Small Desktop Styles */
@media (min-width: 769px) and (max-width: 1024px) {
  .container {
    padding: 0 20px;
  }

  .type-card {
    width: 150px;
  }

  .feature-card {
    min-width: 250px;
  }
}

/* Touch Device Optimizations */
@media (hover: none) {
  .edit-symbol:hover {
    transform: none;
  }

  .type-card:hover {
    transform: none;
  }

  .control-btn:hover {
    background-color: #f0f0f0;
  }
}

/* High DPI Screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .upload-icon-modern img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
  
  .feature-icon i {
    font-weight: 300;
  }
}

/* Safe Area for Modern iOS Devices */
@supports (padding: max(0px)) {
  .header {
    padding-left: max(15px, env(safe-area-inset-left));
    padding-right: max(15px, env(safe-area-inset-right));
  }

  .footer {
    padding-bottom: max(30px, env(safe-area-inset-bottom));
  }
}

/* Improved focus styles for accessibility */
button:focus-visible, 
a:focus-visible, 
input:focus-visible, 
select:focus-visible, 
textarea:focus-visible, 
[tabindex]:focus-visible {
  outline: 3px solid #1e88e5;
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.4);
  transition: outline 0.2s ease, box-shadow 0.2s ease;
}

/* High contrast mode support */
@media (forced-colors: active) {
  button:focus-visible, 
  a:focus-visible {
    outline: 2px solid CanvasText;
  }
}



.control-btn:focus,
.download-btn:focus,
.preview-btn:focus,
.back-btn:focus,
.share-button:focus {
  outline: 3px solid #1e88e5;
  outline-offset: 2px;
}

@media (max-width: 480px) {
  h2 {
    font-size: 20px;
  }

  .description {
    font-size: 14px;
  }

  .upload-icon-modern {
    width: 90px;
    height: 90px;
  }
  
  .upload-icon-modern img {
    width: 100%;
    height: 100%;
  }

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

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

  .choose-file-btn, .reset-btn, .next-btn, .back-btn {
    font-size: 14px;
    padding: 8px 16px;
  }

  .type-card {
    width: 110px;
    height: 90px;
  }

  .type-card i {
    font-size: 24px;
  }

  .type-card span {
    font-size: 14px;
  }
}

/* Signature Selection Overlay */
.signature-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  pointer-events: none;
}

.signature-overlay-area {
  position: absolute;
  width: 288px;
  height: 128px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(255, 255, 255, 0.15);
  border: 2px solid white;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.6);
  z-index: 6;
}
/* Privacy Policy Section */
.privacy-section {
  padding: 60px 0;
  background-color: #f5f7f8;
}

.privacy-content {
  max-width: 800px;
  margin: 40px auto;
}

.privacy-card {
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.privacy-card h5 {
  color: #333;
  font-size: 20px;
  margin-bottom: 15px;
}

.privacy-card p {
  color: #666;
  margin-bottom: 20px;
}

.privacy-card ul {
  list-style: none;
  padding: 0;
}

.privacy-card ul li {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  color: #555;
}

.privacy-card ul li i {
  color: #4cd471;
  margin-right: 10px;
}

/* Footer Styles */
.footer {
  background-color: #1e88e5;
  padding: 30px 0;
  color: white;
}

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

.quick-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.quick-links a {
  color: white;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.quick-links a:hover {
  opacity: 0.8;
}

.copyright {
  margin: 0;
  text-align: center;
  opacity: 0.8;
}

@media (max-width: 768px) {
  .quick-links {
    gap: 15px;
  }

  .quick-links a {
    font-size: 14px;
  }
  
  .how-to-steps {
    padding: 20px !important;
    margin: 20px auto !important;
  }

  .step-item {
    margin-bottom: 15px !important;
  }

  .step-item p {
    font-size: 14px !important;
  }
}

/* Preset Resizer Sections */
.preset-resizer-section {
  margin: 40px 0 !important;
  scroll-margin-top: 80px;
  width: 100%;
  display: block;
}

.preset-card {
  background: #ffffff !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 12px !important;
  padding: 18px !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin-bottom: 0;
  width: 100%;
  display: block;
  box-sizing: border-box;
}

.preset-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.preset-title {
  font-size: 28px !important;
  font-weight: 700 !important;
  margin-bottom: 12px !important;
  margin-top: 0 !important;
  display: flex;
  align-items: center;
  color: #333 !important;
}

.nsdl-color {
  color: #6366f1 !important;
}

.uti-color {
  color: #8b5cf6 !important;
}

.custom-color {
  color: #10b981 !important;
}

.preset-description {
  color: #6b7280 !important;
  font-size: 15px !important;
  line-height: 1.6 !important;
  margin-bottom: 12px !important;
  margin-top: 0 !important;
}

.preset-single-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.upload-label {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 12px;
  display: block;
  text-align: center;
}

.preset-upload {
  border: 2px dashed #d1d5db;
  border-radius: 12px;
  padding: 50px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #f9fafb;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 180px;
}

.preset-upload.has-image {
  height: 400px;
  padding: 20px;
  cursor: default;
}

.upload-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.preset-upload.has-image .upload-content {
  display: none;
}

.preview-canvas {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  object-fit: cover;
  pointer-events: none;
  display: none;
}

/* New Info Bar Styling */
.preset-info-bar {
  display: none;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 12px;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.preset-info-bar.is-visible {
  display: flex;
}

.preset-info-bar .info-display {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
  flex: 1;
  min-width: 200px;
}

.preset-info-bar .dimension-text,
.preset-info-bar .size-text {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  padding: 6px 12px;
  background: #f3f4f6;
  border-radius: 6px;
  white-space: nowrap;
}

.preset-info-bar .download-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  flex: 1;
  min-width: 250px;
}

.preset-info-bar .filename-input {
  flex: 1;
  padding: 8px 12px;
  border: 2px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  color: #1f2937;
  background: #ffffff;
  transition: border-color 0.2s ease;
  min-width: 150px;
}

.preset-info-bar .filename-input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.preset-info-bar .filename-input::placeholder {
  color: #9ca3af;
}

.preset-info-bar .download-btn-preset {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  height: 38px;
}

.preset-info-bar .download-btn-preset:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

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

.preset-info-bar .download-btn-preset i {
  font-size: 14px;
}

/* Mobile responsiveness for info bar */
@media (max-width: 768px) {
  .preset-info-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  
  .preset-info-bar .info-display {
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
  }
  
  .preset-info-bar .download-controls {
    flex-direction: column;
    width: 100%;
  }
  
  .preset-info-bar .filename-input,
  .preset-info-bar .download-btn-preset {
    width: 100%;
  }
}

.preset-upload:hover {
  border-color: #9ca3af;
  background: #f3f4f6;
}

.preset-upload.has-image:hover {
  background: #f9fafb;
}

.preset-upload.drag-over {
  border-color: #6366f1;
  background: #eef2ff;
}

.upload-icon {
  width: 56px;
  height: 56px;
  color: #9ca3af;
  margin: 0 auto 15px;
}

.upload-hint {
  color: #6b7280;
  font-size: 14px;
  margin-bottom: 6px;
}

.upload-file-info {
  color: #9ca3af;
  font-size: 12px;
  margin-top: 6px;
  font-weight: 500;
}

.browse-text {
  color: #6366f1;
  font-weight: 600;
  text-decoration: underline;
}

.file-input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  cursor: pointer;
  z-index: 10;
}

.preset-controls {
  background: #f9fafb !important;
  border-radius: 12px !important;
  padding: 12px !important;
  border: 1px solid #e5e7eb !important;
  display: flex !important;
  flex-direction: row !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 12px !important;
}

.dpi-control {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.dpi-control label {
  font-weight: 600;
  color: #374151;
  font-size: 14px;
}

.dpi-input {
  width: 120px;
  padding: 10px 16px;
  border: 2px solid #d1d5db;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
  background: #fff;
}

.dpi-input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.dpi-input:read-only {
  background: #e5e7eb;
  cursor: not-allowed;
  color: #6b7280;
}

.calculated-info {
  background: #ffffff !important;
  padding: 10px 12px !important;
  border-radius: 8px !important;
  border: 1px solid #e5e7eb !important;
  flex: 1 !important;
  min-width: 0 !important;
}

.calculated-info span {
  display: block;
  font-size: 13px;
  color: #4b5563;
  line-height: 1.4;
}

.calculated-info strong {
  color: #6366f1;
  font-weight: 600;
  font-size: 16px;
}

@media (max-width: 768px) {
  .preset-controls {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Resized Image Info Container - Single container, no double nesting */
.resized-meta {
  display: none !important;
  margin: 16px 0 !important;
}

.resized-meta[style*="display: block"] {
  display: block !important;
}

.resized-meta .filename-input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #a5d6a7;
  border-radius: 10px;
  font-size: 14px;
  transition: all 0.3s ease;
  outline: none;
  background: #e8f5e9;
  color: #2e7d32;
}

.resized-meta .filename-input::placeholder {
  color: #66bb6a;
  font-weight: 500;
}

.resized-meta .filename-input:focus {
  border-color: #4caf50;
  background: #f1f8e9;
  box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.15);
}

.preset-actions {
  display: flex;
  gap: 12px;
}

.resize-btn,
.download-btn-preset {
  flex: 1;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.resize-btn:hover,
.download-btn-preset:hover {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

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

.reset-btn-preset {
  flex: 1;
  background: #e5e7eb;
  color: #374151;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.reset-btn-preset:hover {
  background: #d1d5db;
}

.preview-container {
  background: #f9fafb;
  border: 2px dashed #d1d5db;
  border-radius: 12px;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.preview-placeholder {
  text-align: center;
  color: #9ca3af;
  font-size: 18px;
  font-weight: 600;
}

.preview-placeholder span {
  display: block;
  font-size: 13px;
  font-weight: 400;
  margin-top: 8px;
  color: #6b7280;
}

.preview-container canvas {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
}

.preset-download-btn {
  margin-top: 15px;
  width: calc(100% - 40px);
  max-width: 300px;
  background: #10b981;
  color: #fff;
  border: none;
  padding: 12px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s ease;
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

.preset-download-btn:hover {
  background: #059669;
}

.preset-download-btn i {
  font-size: 16px;
}

@media (max-width: 992px) {
  .preset-card {
    padding: 20px;
  }
  
  .preset-title {
    font-size: 24px;
  }
}

@media (max-width: 768px) {
  .preset-title {
    font-size: 22px;
  }
  
  .preset-description {
    font-size: 14px;
  }
}

/* Ensure upload box children don't block clicks */
.preset-upload > * {
  pointer-events: none;
}

.preset-upload input[type="file"] {
  pointer-events: auto;
}

/* Custom Centimeter Resizer Styles */
.custom-color {
  color: #14b8a6;
}

.custom-info-box {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 25px;
  font-size: 14px;
  line-height: 1.6;
  color: #374151;
}

.custom-info-box p {
  margin-bottom: 10px;
}

.custom-info-box p:last-child {
  margin-bottom: 0;
}

.custom-info-box strong {
  color: #111827;
  font-weight: 600;
}

.formula-text {
  color: #dc2626;
  font-weight: 600;
  font-family: 'Courier New', monospace;
  margin: 8px 0;
}

.custom-input-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 25px;
}

.custom-input-group {
  display: flex;
  flex-direction: column;
}

.input-with-label {
  position: relative;
  width: 100%;
}

.custom-input {
  width: 100%;
  padding: 10px 14px;
  padding-right: 140px;
  border: 2px solid #d1d5db;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  color: #1f2937;
  background: #ffffff;
  transition: all 0.2s ease;
}

.custom-input:focus {
  outline: none;
  border-color: #14b8a6;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
}

.input-label-inside {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  font-weight: 600;
  color: #9ca3af;
  pointer-events: none;
  user-select: none;
}

.custom-upload {
  border-color: #14b8a6 !important;
}

.custom-upload:hover {
  border-color: #0d9488 !important;
  background: #f0fdfa !important;
}

.custom-icon {
  color: #14b8a6 !important;
}

.custom-browse {
  color: #14b8a6 !important;
}

.custom-resize-btn {
  background: linear-gradient(135deg, #14b8a6, #0d9488) !important;
}

.custom-resize-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #0d9488, #0f766e) !important;
}

@media (max-width: 768px) {
  .custom-input-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
}
