html,
body {
  height: 100%;
  overflow-x: hidden;
}

body {
  display: -ms-flexbox;
  display: flex;
  -ms-flex-align: center;
  align-items: center;
  padding-top: 40px;
  padding-bottom: 40px;
  background: linear-gradient(180deg, #B8C9D9 0%, #E8C99B 25%, #D4A574 45%, #C4783A 65%, #8B4513 85%, #5C3317 100%);
  background-size: 100% 400%;
  animation: autumnGradient 18s ease infinite;
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

@keyframes autumnGradient {
  0% { background-position: 0% 0%; }
  50% { background-position: 0% 100%; }
  100% { background-position: 0% 0%; }
}

/* Contenedor otoñal */
#autumn-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

/* Sol otoñal (más bajo y dorado) */
#autumn-sun {
  position: absolute;
  top: 18%;
  right: 12%;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, #FFE082 0%, #FF9800 55%, rgba(255, 152, 0, 0.5) 100%);
  border-radius: 50%;
  box-shadow: 0 0 35px rgba(255, 167, 38, 0.7),
              0 0 70px rgba(230, 126, 34, 0.45);
  animation: autumnSunPulse 8s ease-in-out infinite;
  z-index: 2;
}

@keyframes autumnSunPulse {
  0%, 100% { transform: scale(1); opacity: 0.95; }
  50% { transform: scale(1.06); opacity: 1; }
}

/* Nubes otoñales */
.cloud {
  position: absolute;
  background: rgba(255, 248, 240, 0.75);
  border-radius: 50px;
  opacity: 0.65;
  animation: cloudMove linear infinite;
  z-index: 2;
}

.cloud:before,
.cloud:after {
  content: '';
  position: absolute;
  background: rgba(255, 248, 240, 0.75);
  border-radius: 50px;
}

.cloud-1 {
  width: 100px;
  height: 40px;
  top: 12%;
  left: -100px;
  animation-duration: 35s;
}

.cloud-1:before {
  width: 50px;
  height: 50px;
  top: -25px;
  left: 10px;
}

.cloud-1:after {
  width: 60px;
  height: 40px;
  top: -15px;
  right: 10px;
}

.cloud-2 {
  width: 80px;
  height: 35px;
  top: 22%;
  left: -80px;
  animation-duration: 45s;
  animation-delay: 6s;
}

.cloud-2:before {
  width: 45px;
  height: 45px;
  top: -20px;
  left: 8px;
}

.cloud-2:after {
  width: 55px;
  height: 35px;
  top: -12px;
  right: 8px;
}

.cloud-3 {
  width: 90px;
  height: 38px;
  top: 8%;
  left: -90px;
  animation-duration: 40s;
  animation-delay: 12s;
}

.cloud-3:before {
  width: 48px;
  height: 48px;
  top: -22px;
  left: 9px;
}

.cloud-3:after {
  width: 58px;
  height: 38px;
  top: -14px;
  right: 9px;
}

@keyframes cloudMove {
  0% { transform: translateX(0); }
  100% { transform: translateX(calc(100vw + 150px)); }
}

/* Colinas y suelo */
#ground-container {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 35%;
  z-index: 3;
}

.hill {
  position: absolute;
  bottom: 0;
  border-radius: 50% 50% 0 0;
}

.hill-1 {
  left: -10%;
  width: 55%;
  height: 120px;
  background: linear-gradient(180deg, #A0522D 0%, #8B4513 100%);
}

.hill-2 {
  right: -5%;
  width: 50%;
  height: 90px;
  background: linear-gradient(180deg, #CD853F 0%, #A0522D 100%);
}

.ground-layer {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background: linear-gradient(180deg, #6B4423 0%, #4A2C0F 100%);
}

/* Árboles otoñales */
.autumn-tree {
  position: absolute;
  bottom: 18%;
  z-index: 4;
}

.autumn-tree:before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 120px;
  background: linear-gradient(180deg, #5D4037 0%, #3E2723 100%);
  border-radius: 8px 8px 0 0;
}

.autumn-tree:after {
  content: '';
  position: absolute;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  width: 140px;
  height: 140px;
  background: radial-gradient(circle at 30% 30%, #FF7043 0%, transparent 55%),
              radial-gradient(circle at 70% 25%, #FF8F00 0%, transparent 50%),
              radial-gradient(circle at 50% 60%, #D84315 0%, transparent 60%),
              radial-gradient(circle at 20% 70%, #BF360C 0%, transparent 45%),
              radial-gradient(circle at 80% 65%, #E65100 0%, transparent 50%);
  border-radius: 50%;
  animation: treeSway 4s ease-in-out infinite;
  transform-origin: center bottom;
}

.autumn-tree-1 {
  left: 8%;
}

.autumn-tree-2 {
  right: 10%;
}

.autumn-tree-2:after {
  background: radial-gradient(circle at 35% 35%, #FFB74D 0%, transparent 55%),
              radial-gradient(circle at 65% 30%, #FF9800 0%, transparent 50%),
              radial-gradient(circle at 50% 65%, #F57C00 0%, transparent 60%),
              radial-gradient(circle at 25% 60%, #E65100 0%, transparent 45%);
}

@keyframes treeSway {
  0%, 100% { transform: translateX(-50%) rotate(-2deg); }
  50% { transform: translateX(-50%) rotate(2deg); }
}

/* Hojas otonales en CSS (sin emojis) */
.leaf-shape {
  display: block;
  width: 16px;
  height: 20px;
  border-radius: 2px 80% 2px 80%;
  box-shadow: 0 2px 4px rgba(62, 39, 35, 0.2);
}

.leaf-orange {
  background: linear-gradient(145deg, #FF9800 0%, #E65100 100%);
}

.leaf-red {
  background: linear-gradient(145deg, #F44336 0%, #B71C1C 100%);
}

.leaf-gold {
  background: linear-gradient(145deg, #FFB300 0%, #F57C00 100%);
}

.leaf-brown {
  background: linear-gradient(145deg, #A1887F 0%, #5D4037 100%);
}

.leaf-shape-sm {
  width: 12px;
  height: 15px;
}

.leaf-shape-lg {
  width: 20px;
  height: 24px;
}

/* Hojas cayendo */
.falling-leaf {
  position: absolute;
  opacity: 0.9;
  z-index: 6;
  pointer-events: none;
  animation: leafFall 7s ease-in infinite;
}

.falling-leaf-1 { left: 8%; animation-delay: 0s; }
.falling-leaf-2 { left: 22%; animation-delay: 0.8s; }
.falling-leaf-3 { left: 38%; animation-delay: 1.6s; }
.falling-leaf-4 { left: 52%; animation-delay: 2.2s; }
.falling-leaf-5 { left: 65%; animation-delay: 0.5s; }
.falling-leaf-6 { left: 78%; animation-delay: 3s; }
.falling-leaf-7 { left: 12%; animation-delay: 3.8s; }
.falling-leaf-8 { left: 45%; animation-delay: 1.2s; }
.falling-leaf-9 { left: 88%; animation-delay: 2.6s; }
.falling-leaf-10 { left: 30%; animation-delay: 4.2s; }
.falling-leaf-11 { left: 58%; animation-delay: 4.8s; }
.falling-leaf-12 { left: 72%; animation-delay: 1.8s; }

@keyframes leafFall {
  0% {
    transform: translateY(-10vh) rotate(0deg) translateX(0);
    opacity: 0;
  }
  10% { opacity: 0.9; }
  50% {
    transform: translateY(45vh) rotate(180deg) translateX(30px);
    opacity: 0.85;
  }
  100% {
    transform: translateY(105vh) rotate(360deg) translateX(-20px);
    opacity: 0.2;
  }
}

/* Contenedor del logo */
.logo-container {
  position: relative;
  display: inline-block;
  margin-bottom: 20px;
}

.logo-img {
  position: relative;
  z-index: 10;
  filter: drop-shadow(0 0 18px rgba(255, 152, 0, 0.45))
          drop-shadow(0 0 35px rgba(211, 84, 0, 0.3));
  animation: logoGlow 2.5s ease-in-out infinite alternate;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.12);
  padding: 10px;
  backdrop-filter: blur(10px);
  border: 2px solid rgba(211, 84, 0, 0.35);
}

@keyframes logoGlow {
  from {
    filter: drop-shadow(0 0 18px rgba(255, 152, 0, 0.45))
            drop-shadow(0 0 35px rgba(211, 84, 0, 0.3));
  }
  to {
    filter: drop-shadow(0 0 26px rgba(255, 152, 0, 0.65))
            drop-shadow(0 0 50px rgba(211, 84, 0, 0.45));
  }
}

.season-icon {
  position: absolute;
  pointer-events: none;
  z-index: 11;
  animation: iconFloat 3s ease-in-out infinite;
}

.season-icon-1 { top: -8px; left: -20px; animation-delay: 0s; }
.season-icon-2 { top: 22%; right: -28px; animation-delay: 0.75s; }
.season-icon-3 { bottom: -10px; left: 48%; animation-delay: 1.5s; }
.season-icon-4 { top: 58%; left: -24px; animation-delay: 2.25s; }

.autumn-title .title-text::before,
.autumn-title .title-text::after {
  content: '';
  display: inline-block;
  width: 12px;
  height: 15px;
  margin: 0 8px;
  vertical-align: middle;
  border-radius: 2px 80% 2px 80%;
  background: linear-gradient(145deg, #FF9800 0%, #E65100 100%);
  box-shadow: 0 1px 3px rgba(62, 39, 35, 0.2);
  animation: iconFloat 3s ease-in-out infinite;
}

.autumn-title .title-text::after {
  background: linear-gradient(145deg, #F44336 0%, #B71C1C 100%);
  animation-delay: 1s;
}

@keyframes iconFloat {
  0%, 100% {
    opacity: 0.85;
    transform: translateY(0) rotate(0deg);
  }
  50% {
    opacity: 1;
    transform: translateY(-10px) rotate(8deg);
  }
}

.form-signin {
  width: 100%;
  max-width: 330px;
  padding: 30px;
  margin: auto;
  background: rgba(255, 252, 247, 0.98);
  border-radius: 20px;
  box-shadow: 0 15px 50px rgba(62, 39, 35, 0.25),
              0 0 30px rgba(139, 69, 19, 0.12);
  position: relative;
  z-index: 10;
  backdrop-filter: blur(10px);
  border: 2px solid rgba(211, 84, 0, 0.3);
  animation: formFloat 4s ease-in-out infinite;
}

@keyframes formFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
}

.form-signin .checkbox {
  font-weight: 400;
}

.form-signin .form-control {
  position: relative;
  box-sizing: border-box;
  height: auto;
  padding: 12px;
  font-size: 16px;
  border-radius: 10px;
  transition: all 0.3s ease;
}

.autumn-input {
  border: 2px solid rgba(211, 84, 0, 0.35);
  background: rgba(255, 255, 255, 0.95);
  color: #333;
  margin-bottom: 15px;
}

.autumn-input::placeholder {
  color: rgba(0, 0, 0, 0.4);
}

.autumn-input:focus {
  z-index: 2;
  border-color: #D35400;
  box-shadow: 0 0 15px rgba(211, 84, 0, 0.35),
              inset 0 0 5px rgba(255, 193, 7, 0.1);
  outline: none;
  transform: scale(1.02);
  background: rgba(255, 255, 255, 1);
  color: #333;
}

.form-signin input[type="text"] {
  margin-bottom: -1px;
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 0;
}

.form-signin input[type="password"] {
  margin-bottom: 10px;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.autumn-title {
  color: #BF360C;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
  font-weight: bold;
  margin-bottom: 25px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  font-size: 1.5rem;
}

.title-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  animation: titlePulse 2s ease-in-out infinite;
  color: #BF360C;
  line-height: 1.2;
}

@keyframes titlePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.autumn-btn {
  background: linear-gradient(135deg, #BF360C 0%, #D35400 45%, #E67E22 100%);
  background-size: 200% 200%;
  border: none;
  color: white;
  font-weight: bold;
  padding: 12px;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(191, 54, 12, 0.4),
              inset 0 0 20px rgba(255, 255, 255, 0.25);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.autumn-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transition: left 0.5s;
}

.autumn-btn:hover::before {
  left: 100%;
}

.autumn-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(191, 54, 12, 0.5),
              inset 0 0 25px rgba(255, 255, 255, 0.35);
  background-position: 100% 50%;
}

.autumn-btn:active {
  transform: translateY(-1px);
}

.btn-text {
  position: relative;
  z-index: 1;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.autumn-footer {
  color: #A04000;
  font-weight: 500;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.08);
}

@media (max-width: 768px) {
  .form-signin {
    padding: 20px;
    max-width: 90%;
  }

  .logo-img {
    width: 150px;
    height: auto;
  }

  .leaf-shape-lg {
    width: 16px;
    height: 20px;
  }

  .autumn-title {
    font-size: 1.2rem;
  }

  #autumn-sun {
    width: 70px;
    height: 70px;
    top: 10%;
    right: 8%;
  }

  .autumn-tree {
    bottom: 22%;
  }
}

@media (max-width: 400px) {
  .autumn-title {
    font-size: 1rem;
  }
}
