:root {
  --primary: #4f46e5;
  --primary-light: #6366f1;
  --primary-dark: #4338ca;
  --success: #22c55e;
  --success-dark: #16a34a;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  line-height: 1.5;
  color: var(--gray-800);
  min-height: 100vh;
}

.container {
  background: linear-gradient(135deg, #eff6ff, #eef2ff);
  width: auto;
  margin: 0 auto;
  padding: 2rem;
  /* Remove fixed height and use min-height */
  min-height: 100vh;
  /* Add transition for smooth height changes */
  transition: min-height 0.3s ease;
}

/* Add a class for when image is uploaded */
.container.with-image {
  min-height: 1500px; /* Or whatever height you prefer */
}
header {
  text-align: center;
  margin-bottom: 3rem;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.logo .icon {
  color: var(--primary);
}

.title {
  font-size: 2.5rem;
  color: var(--primary);
}

header p {
  color: var(--gray-600);
}

main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

@media (max-width: 768px) {
  main {
    grid-template-columns: 1fr;
  }
}

.editor, .controls {
  background: white;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.dropzone {
  border: 2px dashed var(--gray-300);
  border-radius: 0.75rem;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dropzone:hover, .dropzone.drag-active {
  border-color: var(--primary);
  background-color: var(--gray-50);
}

.upload-icon {
  color: var(--gray-400);
  margin-bottom: 1rem;
}

.dropzone p {
  color: var(--gray-600);
}

.image-container {
  margin-top: 1.5rem;
}

.image-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.icon-button {
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  border-radius: 0.5rem;
  color: var(--gray-600);
  transition: all 0.2s ease;
}

.icon-button:hover {
  background-color: var(--gray-100);
  color: var(--gray-900);
}

.comparison-slider {
  position: relative;
  width: 100%;
  height: 400px;
  overflow: hidden;
  border-radius: 0.75rem;
  background-color: var(--gray-100);
}

.preview-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.slider-divider {
  position: absolute;
  top: 0;
  left: 50%;
  width: 3px;
  height: 100%;
  background-color: rgb(16, 16, 16);
  transform: translateX(-50%);
  cursor: ew-resize;
}

.slider-divider::before,
.slider-divider::after {
  content: '';
  position: absolute;
  left: 50%;
  width: 24px;
  height: 24px;
  background-color: rgb(16, 16, 16);
  border-radius: 50%;
  transform: translateX(-50%);
}

.slider-divider::before {
  top: 10px;
}

.slider-divider::after {
  bottom: 10px;
}

.image-info {
  margin-top: 1rem;
  color: var(--gray-600);
  font-size: 0.875rem;
}

.controls-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.controls-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.controls-title .icon {
  color: var(--primary);
}

.tab-buttons {
  display: flex;
  gap: 0.5rem;
}

.tab-button {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 0.5rem;
  background: var(--gray-100);
  color: var(--gray-600);
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-button.active {
  background: var(--primary);
  color: white;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.setting-group {
  margin-bottom: 1.5rem;
}

.setting-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--gray-700);
  font-weight: 500;
}

input[type="range"] {
  width: 100%;
  height: 6px;
  background: var(--gray-200);
  border-radius: 3px;
  outline: none;
  -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  background: var(--primary);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

.format-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.format-button {
  padding: 0.5rem;
  border: 1px solid var(--gray-300);
  border-radius: 0.5rem;
  background: white;
  color: var(--gray-700);
  cursor: pointer;
  transition: all 0.2s ease;
}

.format-button:hover {
  border-color: var(--primary);
}

.format-button.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.dimensions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.dimension-input input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--gray-300);
  border-radius: 0.5rem;
  outline: none;
  transition: all 0.2s ease;
}

.dimension-input input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-light);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

input[type="checkbox"] {
  width: 16px;
  height: 16px;
  border: 1px solid var(--gray-300);
  border-radius: 4px;
  cursor: pointer;
}

.compress-button {
  width: 100%;
  padding: 0.75rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.compress-button:hover {
  background: var(--primary-dark);
}

.compress-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.compression-results {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gray-200);
}

.results-info {
  margin: 1rem 0;
  font-size: 0.875rem;
  color: var(--gray-600);
}

.savings {
  color: var(--success);
  font-weight: 500;
}

.download-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem;
  background: var(--success);
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.download-button:hover {
  background: var(--success-dark);
}

.fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.406);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fullscreen .comparison-slider {
  width: 90%;
  height: 90vh;
  max-width: 1600px;
}
.back-btn {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 100;
  background-color: #000000aa;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.back-btn:hover {
  background-color: #222;
}

.back-btn.hidden {
  display: none;
}
.file-size {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.5rem 0;
}

.file-size input,
.file-size select {
  padding: 0.5rem;
  border: 1px solid var(--gray-300);
  border-radius: 0.5rem;
  outline: none;
  transition: all 0.2s ease;
  font-size: 1rem;
  width: 100%;
  max-width: 120px;
}

.file-size input:focus,
.file-size select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-light);
}

.file-size label {
  font-weight: 500;
  color: var(--gray-800);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.left-content{
  text-align: left;

}
.right-content{
  text-align: right;

}
.right-content h2{
  font-size: 2.5em;
  color: var(--primary);
  margin-top: 100px;
}
.right-content p{
  font-size: 1.5em;
  line-height: 1.75;
  margin: 1em 0 .5em;
}
.left-content h2{
  color: var(--primary);
  font-size: 2.5em;
  
}
.left-content p{
  font-size: 1.5em;
  line-height: 1.75;
  margin: 1em 0 .5em;
}

.Content {
  
  justify-content: space-between;
  align-items: flex-start;
  max-width: 1200px; 
  background: white;
  margin: 0 auto;
  margin-top: 100px;
  padding: 20px;
  gap: 40px;
}

/* Image Styles */
.tool-image-right {
width: 100%;
height: 300px;
max-width: 500px; 
float: left;
margin-top: 10px;
border-radius: 10px; 
object-fit: cover; 
}
.tool-image-left {
width: 100%;
height: auto;
max-width: 400px; 
float: right;
border-radius: 10px; 
object-fit: cover; 
}

/* Responsive Styles */
@media (max-width: 768px) {
.Content {
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* Keep text left-aligned */
}

.left-content,
.right-content {
  text-align: left !important; /* Force left text */
  width: 100%;
}

.tool-image-left,
.tool-image-right {
  float: none; /* Disable float on mobile */
  width: 100%;
  max-width: 100%;
  height: 200px;
  margin: 20px 0 0;
}

.right-content h2{
  font-size:2em;
   color: var(--primary);
  margin-top: 100px;
}
.right-content p{
  font-size: 1.2em;
  line-height: 1.75;
  margin: 1em 0 .5em;
}
.left-content h2{
  font-size: 2em;
  color: var(--primary);
  
}
.left-content p{
  font-size: 1.2em;
  line-height: 1.75;
  margin: 1em 0 .5em;
}

}
/* Medium screens (tablets, landscape phones) */
@media (max-width: 768px) {
 .container {
      min-height: 100vh;
    }
    
 .container:has(.image-container img) {
      min-height: 1500px;
    }


header {
  margin-bottom: 2rem;
}

.title {
  font-size: 2rem;
}

.editor,
.controls {
  padding: 1rem;
}

.comparison-slider {
  height: 300px;
}

.tab-buttons {
  flex-wrap: wrap;
  justify-content: center;
}

.tab-button {
  flex: 1 1 auto;
  min-width: 100px;
}

.format-buttons {
  grid-template-columns: repeat(2, 1fr);
}

.dimensions {
  grid-template-columns: 1fr;
}

.fullscreen .comparison-slider {
  width: 95%;
  height: 80vh;
}
}

/* Small screens (mobiles) */
@media (max-width: 480px) {
.container {
  padding: 1rem;
}

.title {
  font-size: 1.5rem;
}

.logo {

  display: flex;
  align-items: center;
  gap: 10px;
}

main {
  grid-template-columns: 1fr;
  gap: 1rem;
}

.image-controls {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.comparison-slider {
  height: 250px;
}

.tab-buttons {
  flex-direction: column;
  align-items: stretch;
}

.tab-button {
  width: 100%;
}

.format-buttons {
  grid-template-columns: 1fr;
}

.compress-button,
.download-button {
  padding: 0.65rem;
  font-size: 0.95rem;
}

.back-btn {
  font-size: 12px;
  padding: 0.4rem 0.75rem;
}

.fullscreen .comparison-slider {
  width: 100%;
  height: 75vh;
}
}

.logo-container {
display: flex;
align-items: center;
gap: 10px; /* Adjust spacing between icon and text */
}

.logo-footer{
margin: 0;
font-size: 1.8rem;
}

.footer {
background: linear-gradient(135deg, #eff6ff, #eef2ff);
  color: var(--primary);
  padding: 40px 0;
  margin-top: 190px;
  text-align: center;
  border-top: 1px solid #e0e0e0;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

/* Brand Section */
.footer-section.brand .logo {
  font-size: 1.8em;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 10px;
}

.footer-section.brand .tagline {
  font-size: 0.9em;
  color: var(--primary);;
  margin: 0;
}

/* Social Links */
.footer-section.social {
  display: flex;
  gap: 20px;
}

.footer-section.social .social-link {
color: var(--primary);
  font-size: 1.6em;
  text-decoration: none;
  transition: color 0.3s ease, transform 0.3s ease;
}

.footer-section.social .social-link:hover {
color: var(--primary-dark);
  transform: translateY(-3px);
}

/* Copyright Section */
.footer-section.copyright {
  font-size: 0.9em;
  color: var(--primary);
  margin-top: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
.footer{
  margin-top: 50px;
}
  .footer-content {
      flex-direction: column;
      gap: 15px;
  }

  .footer-section.social {
      gap: 15px;
  }
}