/* ===================================================================
   MY MANGBOX - ESTILOS MODERNOS 2025
   Sistema de pagos separados con diseño profesional
   =================================================================== */

/* Variables CSS */
:root {
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --dark-bg: #1a1a2e;
  --card-bg: #ffffff;
  --text-primary: #2d3436;
  --text-secondary: #636e72;
  --accent-color: #667eea;
  --success-color: #00b894;
  --border-color: #e1e8ed;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.20);
  --border-radius: 16px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Helvetica Neue', sans-serif;
  color: var(--text-primary);
  line-height: 1.6;
  background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
  min-height: 100vh;
}

/* Header */
header {
  background: var(--primary-gradient);
  color: #fff;
  padding: 60px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.1)" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,112C672,96,768,96,864,112C960,128,1056,160,1152,160C1248,160,1344,128,1392,112L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') bottom center no-repeat;
  background-size: cover;
  opacity: 0.3;
}

h1 {
  margin: 0 0 12px 0;
  font-size: 3rem;
  font-weight: 800;
  position: relative;
  z-index: 1;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

h2 {
  font-size: 1.25rem;
  font-weight: 400;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  opacity: 0.95;
  max-width: 600px;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.container > p:first-child {
  font-size: 1.125rem;
  color: var(--text-secondary);
  text-align: center;
  max-width: 800px;
  margin: 0 auto 50px;
  line-height: 1.8;
}

/* Platform Notice */
.platform-notice {
  background: linear-gradient(135deg, #0078d4 0%, #00bcf2 100%);
  color: white;
  padding: 20px 32px;
  border-radius: 12px;
  text-align: center;
  max-width: 600px;
  margin: 30px auto;
  box-shadow: var(--shadow-md);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.platform-notice .windows-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 8px;
}

.platform-notice strong {
  font-size: 1.25rem;
  display: block;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.platform-notice p {
  margin: 0;
  font-size: 0.95rem;
  opacity: 0.95;
}

/* Features */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin: 50px 0;
}

.feature {
  background: var(--card-bg);
  padding: 32px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

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

.feature:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.feature:hover::before {
  transform: scaleX(1);
}

.feature h3 {
  margin: 0 0 12px 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.feature p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Price Section */
.price-section {
  text-align: center;
  margin: 60px auto;
  max-width: 700px;
  background: var(--card-bg);
  padding: 48px 32px;
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
}

.unique-price {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent-color);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.price {
  font-size: 4rem;
  font-weight: 900;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 8px 0;
  line-height: 1;
}

.single-payment {
  font-size: 1rem;
  color: var(--text-secondary);
  margin: 8px 0 40px 0;
}

/* Payment Selector */
.payment-selector {
  margin: 32px 0;
  padding: 32px;
  background: linear-gradient(135deg, #f5f7fa 0%, #f1f3f6 100%);
  border-radius: 20px;
  border: 2px solid var(--border-color);
}

.payment-selector h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 24px;
  text-align: center;
}

.payment-methods-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.payment-method-card {
  background: white;
  padding: 24px;
  border-radius: 16px;
  border: 3px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  text-align: center;
  overflow: hidden;
}

.payment-method-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--primary-gradient);
  opacity: 0;
  transition: var(--transition);
  z-index: 0;
}

.payment-method-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-color);
}

.payment-method-card.active {
  border-color: var(--accent-color);
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: var(--shadow-lg);
}

.payment-method-card > * {
  position: relative;
  z-index: 1;
}

.method-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.method-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.method-description {
  font-size: 0.9rem;
  opacity: 0.8;
  line-height: 1.4;
}

.check-indicator {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  background: var(--success-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  opacity: 0;
  transform: scale(0);
  transition: var(--transition);
}

.payment-method-card.active .check-indicator {
  opacity: 1;
  transform: scale(1);
}

/* Payment Sections */
.payment-section {
  display: none;
  margin-top: 32px;
  padding: 32px;
  background: white;
  border-radius: 20px;
  border: 2px solid var(--border-color);
  animation: slideIn 0.4s ease-out;
}

.payment-section.active {
  display: block;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.payment-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--border-color);
}

.payment-icon {
  font-size: 2.5rem;
  flex-shrink: 0;
}

.payment-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 8px 0;
}

.payment-description {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

/* PayPal Button Container */
#paypal-button-container {
  margin: 20px 0;
  min-height: 50px;
}

/* Card Form */
.card-form-container {
  background: linear-gradient(135deg, #f8f9fa 0%, #f1f3f6 100%);
  padding: 28px;
  border-radius: 16px;
  margin: 20px 0;
}

.card-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.label-text {
  font-size: 0.95rem;
}

.label-required {
  color: #e74c3c;
  font-size: 1.1rem;
}

.form-group input {
  width: 100%;
  padding: 16px;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  font-size: 1rem;
  transition: var(--transition);
  background: white;
  font-family: inherit;
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.card-field {
  padding: 16px;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  background: white;
  transition: var(--transition);
  min-height: 56px;
  display: flex;
  align-items: center;
}

.card-field:focus-within {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

/* Card Button */
.card-button {
  width: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 14px;
  font-size: 1.1rem;
  font-weight: 700;
  padding: 18px;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: var(--shadow-md);
}

.card-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.card-button:active:not(:disabled) {
  transform: translateY(0);
}

.card-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.button-icon {
  font-size: 1.2rem;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.8s linear infinite;
}

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

/* Payment Security */
.payment-security {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
  padding: 16px;
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #2e7d32;
}

.security-icon {
  font-size: 1.3rem;
}

/* Payment Footer */
.payment-footer {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 2px solid var(--border-color);
  text-align: center;
}

.powered-by {
  font-size: 0.85rem;
  color: #999;
  margin-bottom: 16px;
}

.powered-by span {
  color: #0070BA;
  font-weight: 700;
}

.accepted-cards {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.card-logos {
  font-weight: 600;
  color: var(--text-primary);
}

/* Footer */
footer {
  background: var(--dark-bg);
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
  padding: 32px 20px;
  font-size: 0.875rem;
  margin-top: 60px;
}

/* Responsive Design */
@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1rem;
  }
  
  .price {
    font-size: 3rem;
  }
  
  .features {
    grid-template-columns: 1fr;
  }
  
  .price-section {
    padding: 32px 20px;
  }
  
  .payment-selector {
    padding: 24px 16px;
  }
  
  .payment-methods-grid {
    grid-template-columns: 1fr;
  }
  
  .payment-section {
    padding: 24px 16px;
  }
  
  .card-form-container {
    padding: 20px;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.75rem;
  }
  
  .price {
    font-size: 2.5rem;
  }
  
  .feature {
    padding: 24px;
  }
  
  .payment-selector h3 {
    font-size: 1.1rem;
  }
  
  .method-icon {
    font-size: 2.5rem;
  }
  
  .method-title {
    font-size: 1rem;
  }
  
  .payment-title {
    font-size: 1.2rem;
  }
}

/* ===================================================================
   ESTILOS ADICIONALES PARA FORMULARIO DE TARJETA ALTERNATIVO
   =================================================================== */

/* Mejoras para inputs de formulario */
.card-form input[type="text"],
.card-form select {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 16px;
  font-family: inherit;
  transition: all 0.3s ease;
  background-color: white;
}

.card-form input[type="text"]:focus,
.card-form select:focus {
  outline: none;
  border-color: #0070ba;
  box-shadow: 0 0 0 3px rgba(0, 112, 186, 0.1);
}

.card-form input[type="text"]::placeholder {
  color: #999;
}

/* Estilos para labels */
.form-group label {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
}

.label-text {
  font-size: 14px;
}

.label-required {
  color: #ff0000;
  font-size: 16px;
}

/* Hints de campos */
.field-hint {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  color: #666;
}

/* Form groups */
.form-group {
  margin-bottom: 20px;
}

/* Form row para campos lado a lado */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

/* Select personalizado */
.card-form select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 20px;
  padding-right: 40px;
  cursor: pointer;
}

/* Animación de spinner para el botón */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #ffffff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spinner-rotate 0.8s linear infinite;
  margin-right: 8px;
}

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

/* Responsive para móvil */
@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .card-form input[type="text"],
  .card-form select {
    padding: 12px 14px;
    font-size: 16px; /* Evita zoom en iOS */
  }
}
