/* Global Styles */
body {
  min-height: 100vh;
  background: #0f172a;
  color: #f8fafc;
  font-family: 'Inter', system-ui, sans-serif;
  overflow-x: hidden;
  animation: fadeInBody 1s ease-out;
}

/* Glassmorphism Header */
h1 {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 800;
  line-height: 1.1;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: var(--shadow-glow);
  margin-bottom: 2rem;
  animation: fadeInHeader 1s ease-out;
}

/* Container for the tool */
.container {
  margin-top: 5rem;
  opacity: 0;
  animation: fadeInContainer 1.5s ease-out forwards;
}

/* Glassmorphism Image Upload Button */
input[type="file"] {
  background: rgba(255, 255, 255, 0.1); /* Glass effect */
  color: white;
  border: var(--border-glass);
  border-radius: 8px;
  padding: 1rem 1.5rem;
  font-size: 1.1rem;
  display: block;
  margin: 2rem auto;
  width: auto;
  backdrop-filter: blur(10px); /* Apply glass effect */
  transition: background 0.3s ease, transform 0.3s ease;
}

input[type="file"]:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.05);
}

/* Glassmorphism Image Preview */
#image-preview {
  max-width: 100%;
  border-radius: 10px;
  box-shadow: var(--shadow-glow);
  display: block;
  margin: 1rem auto;
  backdrop-filter: blur(10px);
  opacity: 0;
  animation: fadeInImage 1s ease-out forwards;
  transition: transform 0.2s ease-in-out;
}

#image-preview:hover {
  transform: scale(1.05);
}

/* Zoom Area - Container for showing the magnified part of the image */
#zoom-area {
  display: none;
  position: absolute;
  border: 3px solid #ccc;
  width: 200px; /* Size of the zoomed-in area */
  height: 200px;
  background-repeat: no-repeat;
  pointer-events: none; /* Prevent interaction */
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  top: 10px;
  left: 10px;
}

/* Glassmorphism Color Display */
#color-display {
  background: rgba(255, 255, 255, 0.1); /* Glass effect */
  border-radius: 10px;
  padding: 2rem;
  box-shadow: var(--shadow-glow);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  animation: fadeInColorDisplay 1.5s ease-out;
}

.color-box {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  border: 2px solid white;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.color-box:hover {
  transform: scale(1.1);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

/* Footer Styles with Glassmorphism */
.footer {
  background: rgba(31, 41, 55, 0.8) !important; /* Semi-transparent dark background */
  backdrop-filter: blur(15px); /* Glass effect */
  border-top: var(--border-glass);
  padding: 4rem 0;
  margin-top: 3rem;
  color: white;
}

.footer .container {
  text-align: center;
}

.footer h6 {
  color: #94a3b8;
  font-size: 1rem;
}

.footer .social-links .btn {
  width: 45px;
  height: 45px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1); /* Transparent background for social buttons */
  border: var(--border-glass);
  color: white;
  transition: all 0.3s ease;
  margin: 0.5rem;
  backdrop-filter: blur(8px); /* Glass effect */
}

.footer .social-links .btn:hover {
  transform: translateY(-5px) rotate(8deg);
  background: rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow-glow);
}

/* Global variable definitions for borders and shadows */
:root {
  --border-glass: 2px solid rgba(255, 255, 255, 0.3);
  --shadow-glow: 0 4px 12px rgba(0, 0, 0, 0.3);
  --gradient-main: linear-gradient(45deg, #3b82f6, #9333ea);
}

/* Animations */
@keyframes fadeInBody {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

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

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

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