/* ==================== VARIABLES CSS ==================== */
:root {
  --primary-color: #2a3548;
  --primary-light: #3a4558;
  --accent-color: #4a90e2;
  --text-dark: #2c3e50;
  --text-light: #6c757d;
  --border-color: #e0e0e0;
  --bg-light: #f8f9fa;
  --transition-speed: 0.3s;
  --header-height: 80px;
  --header-height-scrolled: 60px;
  --premium-color: #7c5cde;
  --success-color: #10b981;
  --warning-color: #f59e0b;
}

/* ==================== RESET & BASE ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background: #ffffff;
  padding-top: var(--header-height);
}

/* ==================== FLOATING INPUTS ==================== */
.floating-input {
  position: relative;
  margin-bottom: 28px;
}

.floating-input__field {
  width: 100%;
  padding: 12px 0 8px;
  border: none;
  border-bottom: 2px solid var(--border-color);
  background: transparent;
  font-size: 16px;
  color: var(--text-dark);
  transition: border-color var(--transition-speed) ease;
  outline: none;
}

.floating-input__field:focus {
  border-bottom-color: var(--accent-color);
}

.floating-input__field:focus + .floating-input__label,
.floating-input__field:not(:placeholder-shown) + .floating-input__label,
.floating-input__field.has-value + .floating-input__label {
  top: -8px;
  font-size: 12px;
  color: var(--accent-color);
}

.floating-input__label {
  position: absolute;
  left: 0;
  top: 12px;
  color: var(--text-light);
  font-size: 16px;
  transition: all var(--transition-speed) ease;
  pointer-events: none;
}

.floating-input__hint {
  font-size: 13px;
  color: var(--text-light);
  margin-top: 6px;
  display: block;
}

/* ==================== BUTTONS ==================== */
.btn-submit {
  padding: 12px 28px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-speed) ease;
  will-change: transform;
}

.btn-submit:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(22, 32, 53, 0.3);
}

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

.primary-btn {
  padding: 12px 32px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-speed) ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  will-change: transform;
}

.primary-btn:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.primary-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
}

.primary-btn__spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: none;
}

.secondary-btn {
  padding: 12px 32px;
  background: white;
  color: var(--text-dark);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-speed) ease;
}

.secondary-btn:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
}

.button-group {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
  .header__logo {
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  .button-group {
    flex-direction: column-reverse;
  }

  .button-group .secondary-btn,
  .button-group .primary-btn {
    width: 100%;
  }
}

/* ==================== PERFORMANCE OPTIMIZATIONS ==================== */
/* Usar will-change solo en elementos que lo necesiten */
.floating-input__field:focus,
.btn-submit:hover,
.primary-btn:hover {
  will-change: transform;
}

/* Reducir repaint en scroll */
.header {
  contain: layout style;
}

/* Optimizar animaciones */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
