:root {
  --bg-back: url('https://source.unsplash.com/1600x900/?abstract,gradient');
  --bg-front: url('https://source.unsplash.com/1600x900/?light,abstract');
  --card-bg: rgba(255,255,255,0.2);
  --card-border: rgba(255,255,255,0.4);
  --accent: #0a84ff;
  --accent-light: #60efff;
  --text-light: #fff;
  --text-dark: #1d1d1f;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html, body {
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #111;

  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.2) transparent;
}
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.2);
  border-radius: 4px;
  transition: background 0.2s;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.4);
}

.parallax-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-position: center;
  background-size: cover;
  background-attachment: fixed;
  z-index: -2;
}
.parallax-bg.back {
  background-image: var(--bg-back);
  filter: brightness(0.5);
}
.parallax-bg.front {
  background-image: var(--bg-front);
  filter: brightness(0.6) blur(2px);
}

.section {
  scroll-snap-align: start;
  min-height: auto;
  padding: 40px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}


.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.37);
  width: 360px;
  max-width: 90%;
  padding: 40px;
  color: var(--text-light);
}

.card h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  text-align: center;
}
.input-group {
  position: relative;
  margin: 20px 0;
}
.input-group input {
  width: 100%;
  padding: 14px;
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: 8px;
  background: transparent;
  color: var(--text-light);
  transition: border 0.3s;
}
.input-group input:focus {
  border-color: var(--accent);
}
.input-group label {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.7);
  pointer-events: none;
  background: transparent;
  transition: 0.3s ease all;
  padding: 0 4px;
}
.input-group input:focus + label,
.input-group input:not(:placeholder-shown) + label {
  top: -8px;
  left: 10px;
  background: var(--card-bg);
  font-size: 0.75rem;
  color: var(--accent);
}

fieldset {
  margin: 24px 0;
}
fieldset legend {
  color: var(--text-light);
  font-size: 1rem;
  margin-bottom: 8px;
}
fieldset label {
  display: flex;
  align-items: center;
  font-size: 0.875rem;
  margin: 6px 0;
  cursor: pointer;
}
fieldset input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-right: 10px;
  accent-color: var(--accent);
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
  margin: 20px 0;
  font-size: 0.875rem;
}
.checkbox-group input {
  width: auto;
  margin-right: 10px;
  accent-color: var(--accent);
}
.checkbox-group label {
  color: var(--text-light);
}

button {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: var(--text-light);
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s;
}
button::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 20px;
  height: 20px;
  background: rgba(255,255,255,0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  opacity: 1;
  transition: transform 0.5s, opacity 0.5s;
  pointer-events: none;
}
button:active::after {
  transform: translate(-50%, -50%) scale(5);
  opacity: 0;
}
button:hover {
  transform: translateY(-2px);
}

.toggle {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.875rem;
}
.toggle a {
  color: var(--accent);
  text-decoration: underline;
}
.error,
.success {
  text-align: center;
  font-size: 0.875rem;
  margin-bottom: 10px;
}
.error {
  color: #ff6b6b;
}
.success {
  color: #4caf50;
}
.tilt-container {
  width: 400px;
  height: 300px;
  perspective: 1000px;
}
.tilt-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
  transition: transform 0.1s ease-out;
}

.info {
  margin: 16px 0;
  text-align: center;
  color: var(--text-light);
}
.info a {
  color: var(--accent);
}
@media (max-width: 480px) {
  .card {
    width: 90%;
    padding: 20px;
  }
  .tilt-container {
    width: 90%;
    height: auto;
  }
}
