/* Cyberpunk/Neon Theme for Devise Pages */

.devise-body {
  background: linear-gradient(135deg, #0a0a1a 0%, #1a0a2e 50%, #0a0a1a 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  position: relative;
  overflow-x: hidden;
}

/* Animated grid background */
.devise-body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    linear-gradient(rgba(0, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: gridMove 20s linear infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes gridMove {
  0% {
    transform: translateY(0) translateX(0);
  }
  100% {
    transform: translateY(50px) translateX(50px);
  }
}

/* Container */
.devise-container {
  width: 100%;
  max-width: 1200px;
  padding: 2rem;
  position: relative;
  z-index: 1;
}

.devise-content {
  display: flex;
  gap: 3rem;
  align-items: flex-start;
  justify-content: center;
  flex-wrap: wrap;
}

/* Logo styling */
.devise-logo {
  flex: 1;
  min-width: 300px;
  max-width: 500px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 2rem;
}

.logo-image {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 0 20px rgba(0, 255, 255, 0.5))
          drop-shadow(0 0 40px rgba(255, 0, 255, 0.3));
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

/* Form wrapper */
.devise-form-wrapper {
  flex: 1;
  min-width: 320px;
  max-width: 500px;
}

.devise-form {
  background: rgba(10, 10, 30, 0.8);
  border: 2px solid rgba(0, 255, 255, 0.3);
  border-radius: 12px;
  padding: 2.5rem;
  backdrop-filter: blur(10px);
  box-shadow:
    0 0 20px rgba(0, 255, 255, 0.2),
    0 0 40px rgba(255, 0, 255, 0.1),
    inset 0 0 60px rgba(0, 0, 0, 0.5);
}

/* Typography */
.devise-form h2 {
  color: #00ffff;
  font-size: 2rem;
  margin: 0 0 1.5rem 0;
  text-shadow:
    0 0 10px rgba(0, 255, 255, 0.8),
    0 0 20px rgba(0, 255, 255, 0.5),
    0 0 30px rgba(0, 255, 255, 0.3);
  letter-spacing: 0.05em;
  font-weight: 700;
}

/* Form fields */
.devise-form .field {
  margin-bottom: 1.5rem;
}

.devise-form label {
  display: block;
  color: #00ffff;
  margin-bottom: 0.5rem;
  font-weight: 500;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
}

.devise-form label em {
  color: #ff00ff;
  font-style: normal;
  font-size: 0.75rem;
  text-transform: none;
  opacity: 0.8;
}

.devise-form input[type="email"],
.devise-form input[type="text"],
.devise-form input[type="tel"],
.devise-form input[type="password"] {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(0, 255, 255, 0.3);
  border-radius: 6px;
  color: #ffffff;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.devise-form input[type="email"]:focus,
.devise-form input[type="text"]:focus,
.devise-form input[type="tel"]:focus,
.devise-form input[type="password"]:focus {
  outline: none;
  border-color: #00ffff;
  box-shadow:
    0 0 10px rgba(0, 255, 255, 0.4),
    inset 0 0 10px rgba(0, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.7);
}

.devise-form input[type="email"]::placeholder,
.devise-form input[type="text"]::placeholder,
.devise-form input[type="tel"]::placeholder,
.devise-form input[type="password"]::placeholder {
  color: rgba(0, 255, 255, 0.3);
}

/* Checkbox */
.devise-form input[type="checkbox"] {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(0, 255, 255, 0.5);
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.5);
  cursor: pointer;
  position: relative;
  vertical-align: middle;
  margin-right: 0.5rem;
  transition: all 0.2s ease;
}

.devise-form input[type="checkbox"]:checked {
  background: #00ffff;
  border-color: #00ffff;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.6);
}

.devise-form input[type="checkbox"]:checked::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #0a0a1a;
  font-size: 14px;
  font-weight: bold;
}

.devise-form input[type="checkbox"] + label {
  display: inline;
  margin-left: 0;
  text-transform: none;
  font-size: 0.9rem;
  cursor: pointer;
}

/* Submit button */
.devise-form .actions {
  margin-top: 2rem;
}

.devise-form input[type="submit"] {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(135deg, #00ffff 0%, #ff00ff 100%);
  border: none;
  border-radius: 6px;
  color: #0a0a1a;
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow:
    0 4px 15px rgba(0, 255, 255, 0.4),
    0 0 20px rgba(255, 0, 255, 0.3);
  position: relative;
  overflow: hidden;
}

.devise-form input[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow:
    0 6px 20px rgba(0, 255, 255, 0.6),
    0 0 30px rgba(255, 0, 255, 0.5);
}

.devise-form input[type="submit"]:active {
  transform: translateY(0);
}

.devise-form input[type="submit"]::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.devise-form input[type="submit"]:hover::before {
  width: 300px;
  height: 300px;
}

/* Links */
.devise-form a {
  color: #ff00ff;
  text-decoration: none;
  transition: all 0.2s ease;
  text-shadow: 0 0 5px rgba(255, 0, 255, 0.3);
}

.devise-form a:hover {
  color: #00ffff;
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.6);
}

/* Error messages */
.devise-form #error_explanation {
  background: rgba(255, 0, 100, 0.1);
  border: 1px solid rgba(255, 0, 100, 0.5);
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.devise-form #error_explanation h2 {
  color: #ff0064;
  font-size: 1rem;
  margin: 0 0 0.5rem 0;
  text-shadow: 0 0 10px rgba(255, 0, 100, 0.5);
}

.devise-form #error_explanation ul {
  margin: 0;
  padding-left: 1.5rem;
  color: #ff6b9d;
}

/* Flash messages */
.devise-form-wrapper .flash {
  padding: 1rem;
  border-radius: 6px;
  margin-bottom: 1.5rem;
  font-weight: 500;
  text-align: center;
}

.devise-form-wrapper .flash.notice {
  background: rgba(0, 255, 255, 0.1);
  border: 1px solid rgba(0, 255, 255, 0.5);
  color: #00ffff;
  text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
}

.devise-form-wrapper .flash.alert {
  background: rgba(255, 0, 100, 0.1);
  border: 1px solid rgba(255, 0, 100, 0.5);
  color: #ff6b9d;
  text-shadow: 0 0 5px rgba(255, 0, 100, 0.5);
}

/* Responsive design */
@media (max-width: 768px) {
  .devise-content {
    flex-direction: column;
    gap: 2rem;
  }

  .devise-logo {
    max-width: 300px;
    order: -1;
  }

  .devise-form {
    padding: 2rem 1.5rem;
  }

  .devise-form h2 {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .devise-container {
    padding: 1rem;
  }

  .devise-form {
    padding: 1.5rem 1rem;
  }

  .logo-image {
    max-width: 250px;
  }
}
