/* ==============================================
   ESTILOS MODERNOS PARA MÓVILES - NUEVA PALETA
   ============================================== */

/* Variables de colores modernos */
:root {
  --primary-color: #00c853;      /* Verde moderno */
  --primary-dark: #009624;       /* Verde oscuro */
  --primary-light: #5efc82;      /* Verde claro */
  --secondary-color: #2962ff;    /* Azul moderno */
  --secondary-dark: #0039cb;     /* Azul oscuro */
  --secondary-light: #768fff;    /* Azul claro */
  --background-dark: #121212;    /* Fondo oscuro */
  --surface-dark: #1e1e1e;       /* Superficie oscura */
  --surface-light: #2d2d2d;      /* Superficie clara */
  --text-primary: #ffffff;       /* Texto principal */
  --text-secondary: #b0b0b0;     /* Texto secundario */
  --text-accent: #00c853;        /* Texto acento */
  --error-color: #ff5252;        /* Color de error */
  --success-color: #4caf50;      /* Color de éxito */
  --border-radius: 12px;         /* Radio de borde */
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.15);
}

/* Reset y estilos base */
* { 
  box-sizing: border-box; 
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', 'Roboto', sans-serif;
  background: linear-gradient(135deg, var(--background-dark) 0%, #1a1a2e 100%);
  color: var(--text-primary);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Header moderno */
.modern-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  background: rgba(30, 30, 30, 0.9);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-container h1 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 1px;
  margin: 0;
}

.logo-text {
  color: var(--primary-color);
}

.menu-icon {
  cursor: pointer;
  font-size: 24px;
  color: var(--text-primary);
  padding: 8px;
  border-radius: 50%;
  transition: background-color 0.3s;
}

.menu-icon:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Earnings Display */
.earnings-display {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 30px;
  padding: 8px 15px;
  border: 1px solid rgba(0, 200, 83, 0.3);
  transition: all 0.3s ease;
  cursor: default;
}

.earnings-display:hover {
  background: rgba(0, 200, 83, 0.1);
  border-color: rgba(0, 200, 83, 0.6);
}

.earnings-icon {
  font-size: 1.2rem;
  color: var(--primary-color);
}

.earnings-amount {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.earnings-amount .label {
  font-size: 0.55rem;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.earnings-amount .amount {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 2px;
  font-family: 'Courier New', monospace;
  letter-spacing: 0.5px;
}

/* Menú desplegable */
.menu {
  display: none;
  position: absolute;
  top: 70px;
  right: 15px;
  background-color: var(--surface-dark);
  box-shadow: var(--shadow);
  border-radius: var(--border-radius);
  z-index: 1000;
  width: 220px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.menu-content {
  padding: 10px 0;
}

.menu-content a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: var(--text-primary);
  text-decoration: none;
  transition: background-color 0.3s;
  font-size: 0.95rem;
}

.menu-content a:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.menu-content a i {
  width: 20px;
  text-align: center;
  color: var(--primary-color);
}

/* Contenedor principal */
.container {
  width: 100%;
  max-width: 500px;
  padding: 20px;
  margin: 0 auto;
}

.app-card {
  background: var(--surface-dark);
  border-radius: var(--border-radius);
  padding: 25px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.app-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 25px;
  text-align: center;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Secciones de entrada */
.input-section {
  margin-bottom: 25px;
}

.input-label {
  display: block;
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.currency-input-group {
  display: flex;
  gap: 10px;
  align-items: center;
}

.currency-input-group input {
  flex: 1;
  padding: 15px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius);
  background: var(--surface-light);
  color: var(--text-primary);
  font-size: 1.1rem;
  transition: all 0.3s;
}

.currency-input-group input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 200, 83, 0.2);
}

.currency-select {
  padding: 15px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius);
  background: var(--surface-light);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.3s;
  min-width: 140px;
}

.currency-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 200, 83, 0.2);
}

/* Banner promocional */
.promo-banner {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary-color) 100%);
  border-radius: var(--border-radius);
  padding: 20px;
  margin-bottom: 25px;
  text-align: center;
  box-shadow: var(--shadow-light);
  position: relative;
  overflow: hidden;
}

.promo-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transform: rotate(45deg);
  animation: shine 3s infinite;
}

@keyframes shine {
  0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
  100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.promo-icon {
  font-size: 2rem;
  margin-bottom: 10px;
  color: white;
}

.promo-banner p {
  color: white;
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.exchange-rate {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
}

/* Sección de total */
.total-section {
  background: var(--surface-light);
  border-radius: var(--border-radius);
  padding: 20px;
  margin-bottom: 25px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.total-label {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.total {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
  margin: 0;
}

/* Botón de WhatsApp */
.whatsapp-button {
  width: 100%;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  padding: 18px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: var(--shadow-light);
  margin-bottom: 20px;
}

.whatsapp-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.whatsapp-button:active {
  transform: translateY(0);
}

/* Texto de pie de página */
.footer-text {
  color: var(--text-secondary);
  font-size: 0.85rem;
  text-align: center;
  margin-top: 15px;
}

/* Mensajes */
.message-container {
  margin-top: 20px;
}

.message {
  padding: 12px 15px;
  border-radius: var(--border-radius);
  font-weight: 500;
  text-align: center;
}

.message.error {
  background-color: rgba(255, 82, 82, 0.1);
  color: var(--error-color);
  border: 1px solid rgba(255, 82, 82, 0.3);
}

.message.success {
  background-color: rgba(76, 175, 80, 0.1);
  color: var(--success-color);
  border: 1px solid rgba(76, 175, 80, 0.3);
}

/* Loader y overlay */
#overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 999;
  display: none;
}

.loader {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--primary-color);
  animation: rot1 1.2s linear infinite;
  z-index: 1000;
  display: none;
}

@keyframes rot1 {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Animaciones de actualización */
@keyframes highlight {
  0% { color: var(--text-primary); }
  50% { color: var(--primary-color); }
  100% { color: var(--text-primary); }
}

.amount-updated {
  animation: highlight 1.5s;
}

/* Responsive para tablets y pantallas más grandes */
@media (min-width: 768px) {
  .container {
    padding: 30px 20px;
  }
  
  .app-card {
    padding: 30px;
  }
  
  .app-title {
    font-size: 2.2rem;
  }
  
  .currency-input-group input,
  .currency-select {
    padding: 18px;
  }
  
  .whatsapp-button {
    padding: 20px;
    font-size: 1.2rem;
  }
}

/* Responsive para pantallas muy pequeñas */
@media (max-width: 360px) {
  .modern-header {
    padding: 12px 15px;
  }
  
  .container {
    padding: 15px;
  }
  
  .app-card {
    padding: 20px;
  }
  
  .currency-input-group {
    flex-direction: column;
  }
  
  .currency-select {
    min-width: 100%;
  }
}