:root {
  --zoom: 1.5;
  --zoom-circle-size: 150px;
  --bg: linear-gradient(to right, #f8b195, #f67280, #c06c84);
  --text: #222;
  --glass: rgba(255, 255, 255, 0.15);
  --glass-border: rgba(255, 255, 255, 0.2);
  --shadow: rgba(0, 0, 0, 0.2);
  --zoom-x: 50%;
  --zoom-y: 50%;
}

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

body {
  font-family: 'Segoe UI', sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  transition: all 0.5s ease;
  padding: 20px;
}

.orientation-warning {
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: #0008;
  color: #fff;
  padding: 10px 20px;
  border-radius: 12px;
  font-size: 14px;
  z-index: 999;
  display: none;
}

.container {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  flex-wrap: wrap;
  gap: 30px;
  margin-top: 40px;
  width: 100%;
  max-width: 1200px;
}

.zoom {
  position: relative;
  width: max-content;
  overflow: hidden;
}

.zoom img {
  width: 90vw;
  max-width: 600px;
  border-radius: 20px;
  box-shadow: 0 10px 30px var(--shadow);
  transition: transform 0.3s ease;
}

#imgZoom {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
  opacity: 0;
  border-radius: 50%;
  clip-path: circle(var(--zoom-circle-size) at var(--zoom-x) var(--zoom-y));
  transform: scale(var(--zoom));
  transition: opacity 0.3s ease, transform 0.2s ease;
  will-change: transform;
}

.controls {
  max-width: 240px;
  min-width: 200px;
  padding: 25px;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: inherit;
}

.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
  backdrop-filter: blur(10px);
}

input[type="range"] {
  width: 100%;
  margin-top: 10px;
}

button {
  margin-top: 15px;
  padding: 10px 20px;
  background: #fff3;
  color: inherit;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease;
}

button:hover {
  background: #fff5;
}

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

  .controls {
    margin-top: 20px;
  }

  .orientation-warning {
    display: block;
  }
}

body.dark {
  --bg: linear-gradient(to right, #141e30, #243b55);
  --text: #f0f0f0;
  --glass: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --shadow: rgba(0, 0, 0, 0.8);
}
