/* styles.css */

:root {
  --bg: #121212;
  --bg-alt: #1e1e1e;
  --bg-card: #1c1c1c;
  --text: #f1f1f1;
  --text-muted: #aaa;
  --accent: #5865F2;
  --accent-hover: #4752c4;
  --accent-light: rgba(88, 101, 242, 0.1);
  --border: #333;
  --success: #3ba55c;
  --danger: #d32f2f;
  --shadow: rgba(88, 101, 242, 0.2);
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  transition: var(--transition);
}

html,
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  scroll-behavior: smooth;
}

a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

header {
  padding: 5rem 1rem 4rem;
  text-align: center;
  background: linear-gradient(145deg, #0a0a0a, #1a1a1a);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
}

header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(88, 101, 242, 0.05) 0%, transparent 70%);
  animation: rotate 20s linear infinite;
  z-index: 0;
}

header h1 {
  font-size: 2.8rem;
  color: var(--accent);
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.8s ease-out;
  font-weight: 700;
  text-shadow: 0 2px 10px rgba(88, 101, 242, 0.3);
}

header p {
  font-size: 1.2rem;
  max-width: 650px;
  margin: 0 auto 2.5rem;
  color: var(--text-muted);
  animation: fadeInUp 1s ease-out;
  line-height: 1.7;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--accent);
  color: white;
  padding: 0.9rem 1.8rem;
  border-radius: 8px;
  font-weight: 600;
  transition: var(--transition);
  box-shadow: 0 4px 15px var(--shadow);
  border: none;
  cursor: pointer;
  font-size: 1rem;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
  opacity: 0;
  transition: var(--transition);
}

.btn:hover {
  background: var(--accent-hover);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px var(--shadow);
}

.btn:hover::after {
  opacity: 1;
}

.btn:active {
  transform: translateY(0);
}

.btn i {
  font-size: 0.9em;
}

.section {
  padding: 5rem 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.section-title {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
  display: inline-block;
  width: 100%;
}

.section-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background: var(--accent);
  margin: 1rem auto 0;
  border-radius: 2px;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
  margin-top: 3rem;
}

.feature {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease forwards;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.feature:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.feature::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--accent);
}

.feature-icon {
  font-size: 2.5rem;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.feature h3 {
  margin-bottom: 1rem;
  color: var(--accent);
  font-size: 1.3rem;
}

.feature p {
  color: var(--text-muted);
  font-size: 1rem;
}

.feature:nth-child(1) {
  animation-delay: 0.2s;
}

.feature:nth-child(2) {
  animation-delay: 0.4s;
}

.feature:nth-child(3) {
  animation-delay: 0.6s;
}

.demo {
  background: var(--bg-card);
  padding: 2.5rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-top: 2rem;
  animation: fadeInUp 0.6s ease;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.demo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  font-weight: 600;
  margin: 0 0 0.8rem;
  color: var(--text);
  font-size: 0.95rem;
}

input,
select {
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #222;
  color: white;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  transition: var(--transition);
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.output {
  margin-top: 1rem;
  padding: 1.2rem;
  background: #222;
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  font-family: 'Fira Code', monospace, 'Courier New', Courier;
  font-size: 0.95rem;
  line-height: 1.5;
  min-height: 60px;
  display: flex;
  align-items: center;
}

.copy-container {
  display: flex;
  gap: 0.8rem;
  margin-top: 1rem;
}

.copy-container input {
  flex-grow: 1;
  padding-right: 3rem;
}

footer {
  text-align: center;
  padding: 3rem 1rem;
  font-size: 0.9rem;
  color: #666;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
  background: var(--bg-alt);
}

footer strong {
  font-weight: 600;
  color: var(--text-muted);
}

/* Reloj flotante */
.floating-clock {
  position: fixed;
  bottom: 25px;
  right: 25px;
  font-size: 0.95rem;
  font-family: 'Fira Code', monospace, 'Courier New', Courier;
  color: var(--accent);
  background: rgba(25, 25, 25, 0.95);
  padding: 10px 16px;
  border-radius: 20px;
  border: 1px solid rgba(88, 101, 242, 0.3);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  z-index: 100;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.floating-clock:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.tooltip {
  position: relative;
  cursor: pointer;
}

.tooltip .tooltiptext {
  visibility: hidden;
  width: 180px;
  background-color: var(--success);
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 8px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  opacity: 0;
  transition: var(--transition);
  font-size: 0.85rem;
}

.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--bg-card);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  border-left: 4px solid var(--accent);
}

.toast.success {
  border-color: var(--success);
}

.toast.error {
  border-color: var(--danger);
}

.toast i {
  font-size: 1.2rem;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* Efecto ripple */
.ripple {
  position: relative;
  overflow: hidden;
}

.ripple-effect {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transform: scale(0);
  animation: ripple 0.6s linear;
  pointer-events: none;
}

@keyframes ripple {
  to {
    transform: scale(2.5);
    opacity: 0;
  }
}

@media (max-width: 768px) {
  .demo-grid {
    grid-template-columns: 1fr;
  }
}