/* Splash Screen Styles */
.splash-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  animation: fadeIn 0.5s ease forwards;
}

.splash-overlay.fade-out {
  opacity: 1;
  animation: fadeOut 0.5s ease forwards;
  pointer-events: none;
}

.splash-content {
  text-align: center;
  padding: 1.5rem;
  max-width: 90%;
  width: 360px;
}

.element-container {
  position: relative;
  width: 180px;
  height: 180px;
  margin: 0 auto 1.5rem;
  animation: containerEntrance 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.cf-element {
  width: 100%;
  height: 100%;
  background: white;
  position: relative;
  border: 5px solid;
  border-image: linear-gradient(90deg, 
    #ff4242,  /* Red - Energy */
    #42ff63,  /* Green - Agriculture */
    #4251ff,  /* Blue - Metals */
    #ff4242   /* Back to red */
  ) 1;
  background-size: 200% 100%;
  animation: borderFlow 2s linear infinite, elementPulse 2s ease-in-out infinite;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.1);
  overflow: visible;
}

.cf-element::before {
  content: '';
  position: absolute;
  inset: -7px;
  background: linear-gradient(90deg, 
    #ff4242,  /* Red */
    #42ff63,  /* Green */
    #4251ff,  /* Blue */
    #ff4242   /* Back to red */
  );
  background-size: 200% 100%;
  filter: blur(10px);
  animation: borderFlow 2s linear infinite, glowPulse 3s ease-in-out infinite;
  z-index: -1;
  opacity: 0.4;
  border-radius: 2px;
  clip-path: polygon(
    0 0, 100% 0, 100% 100%, 0 100%,
    0 0,
    7px 7px, 7px calc(100% - 7px), calc(100% - 7px) calc(100% - 7px),
    calc(100% - 7px) 7px, 7px 7px
  );
}

.cf-element::after {
  content: '';
  position: absolute;
  inset: -3px;
  background: white;
  z-index: -2;
}

.element-content {
  position: absolute;
  inset: 0;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.9);
  animation: contentFadeIn 0.5s ease forwards 0.5s;
  z-index: 3;
  padding: 20px;
}

.cf-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  animation: fadeIn 0.5s ease forwards 0.3s;
}

.newsletter-form {
  margin-top: 3rem;
  text-align: center;
  opacity: 0;
  transform: translateY(40px);
  animation: slideUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards 1.2s;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.splash-message {
  margin-bottom: 2rem;
  animation: slideUp 0.5s ease forwards 1.2s;
  opacity: 0;
  transform: translateY(20px);
}

.splash-message h2 {
  color: white;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
  line-height: 1.2;
}

.splash-message p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.4;
  max-width: 420px;
  margin: 0 auto;
}

.signup-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1rem;
}

.email-input {
  padding: 0.75rem 1rem;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: white;
  font-size: 1rem;
  transition: all 0.2s ease;
  width: 100%;
}

.email-input:focus {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  outline: none;
}

.email-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.submit-btn {
  background: white;
  color: #000;
  padding: 0.6rem 1.25rem;
  border-radius: 4px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  font-size: 0.9rem;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.splash-skip {
  color: rgba(255, 255, 255, 0.6);
  background: none;
  border: none;
  padding: 0.6rem;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s ease;
  margin-top: 0.5rem;
}

.splash-skip:hover {
  color: white;
}

.success-message {
  color: white;
  background: rgba(66, 255, 99, 0.1);
  border: 2px solid rgba(66, 255, 99, 0.2);
  padding: 1rem;
  border-radius: 4px;
  font-weight: 500;
  animation: fadeIn 0.3s ease forwards;
}

@keyframes scaleIn {
  0% {
    transform: scale(0);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes contentFadeIn {
  0% {
    opacity: 0;
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes borderFlow {
  0% {
    background-position: 0% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

@keyframes containerEntrance {
  0% {
    transform: scale(0.3) translateY(100px);
    opacity: 0;
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

@keyframes elementPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.02);
  }
}

@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes fadeOut {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes glowPulse {
  0%, 100% {
    filter: blur(10px);
  }
  50% {
    filter: blur(15px);
  }
}
