/**
 * 🎨 CHECKOUT PREMIUM - DESIGN PERSONALIZADO
 * 
 * Design exclusivo e profissional com gradientes, glassmorphism e animações
 */

/* ===== RESET E GLOBAL ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Paleta Premium */
  --primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --primary-solid: #667eea;
  --secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --success: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --success-solid: #00d4aa;
  --warning: #ffb74d;
  --danger: #ff5252;
  
  /* Cores de Texto */
  --text-dark: #1a1a2e;
  --text-medium: #495057;
  --text-light: #6c757d;
  --text-white: #ffffff;
  
  /* Backgrounds */
  --bg-light: #f8f9fa;
  --bg-card: rgba(255, 255, 255, 0.95);
  --bg-glass: rgba(255, 255, 255, 0.1);
  --bg-overlay: rgba(0, 0, 0, 0.5);
  
  /* Borders & Shadows */
  --border-radius: 16px;
  --border-radius-sm: 8px;
  --border-radius-lg: 24px;
  --border-color: rgba(255, 255, 255, 0.2);
  
  --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(31, 38, 135, 0.37);
  --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 40px rgba(102, 126, 234, 0.6);
  
  /* Transitions */
  --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes shimmer {
  0% { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  min-height: 100vh;
  padding: 20px;
  color: var(--text-dark);
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Efeito de partículas no fundo */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  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,122.7C672,117,768,139,864,154.7C960,171,1056,181,1152,165.3C1248,149,1344,107,1392,85.3L1440,64L1440,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>') no-repeat bottom;
  background-size: cover;
  pointer-events: none;
  z-index: 0;
}

/* ===== CONTAINER ===== */
.container {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  animation: fadeIn 0.6s ease-out;
}

/* ===== HEADER PREMIUM ===== */
.header {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 50px 40px;
  border-radius: var(--border-radius-lg);
  text-align: center;
  margin-bottom: 40px;
  box-shadow: var(--shadow-xl);
  border: 1px solid rgba(255, 255, 255, 0.3);
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.8s ease-out;
}

.header::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 200%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 3s infinite;
}

.header-content {
  position: relative;
  z-index: 1;
}

.header-content h1 {
  background: var(--primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 2.8rem;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -1px;
  text-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.header-subtitle {
  color: var(--text-medium);
  font-size: 1.1rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.header-subtitle::before {
  content: '🔐';
  font-size: 1.3rem;
  animation: pulse 2s ease-in-out infinite;
}

/* ===== SECURITY INFO - GLASSMORPHISM ===== */
.security-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-bottom: 40px;
}

.info-card {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 30px;
  border-radius: var(--border-radius);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: var(--shadow-lg);
  transition: var(--transition-smooth);
  animation: fadeInUp 0.8s ease-out;
  animation-fill-mode: both;
  position: relative;
  overflow: hidden;
}

.info-card:nth-child(1) { animation-delay: 0.1s; }
.info-card:nth-child(2) { animation-delay: 0.2s; }
.info-card:nth-child(3) { animation-delay: 0.3s; }

.info-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--primary);
}

.info-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-glow);
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.4);
}

.info-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 15px;
  animation: float 3s ease-in-out infinite;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.info-card h3 {
  color: var(--text-white);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.info-card p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
  line-height: 1.6;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* ===== CARDS PREMIUM ===== */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 35px;
  border-radius: var(--border-radius-lg);
  margin-bottom: 30px;
  box-shadow: var(--shadow-xl);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: var(--transition-smooth);
  animation: fadeInUp 1s ease-out;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--primary);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
  border-color: rgba(255, 255, 255, 0.5);
}

.section-title {
  color: var(--text-dark);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 10px;
  padding-bottom: 15px;
  border-bottom: 2px solid rgba(102, 126, 234, 0.2);
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 30px;
  background: var(--primary);
  border-radius: 3px;
}

.section-subtitle {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 25px;
  font-weight: 400;
  font-style: italic;
}

/* ===== FORM STYLES PREMIUM ===== */
.form-group {
  margin-bottom: 24px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.form-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-weight: 600;
  color: var(--text-dark);
  font-size: 0.95rem;
}

.form-input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid rgba(102, 126, 234, 0.2);
  border-radius: var(--border-radius-sm);
  font-size: 0.95rem;
  color: var(--text-dark);
  background: rgba(255, 255, 255, 0.9);
  transition: var(--transition-fast);
  font-family: inherit;
  font-weight: 500;
}

.form-input:hover {
  border-color: rgba(102, 126, 234, 0.4);
  background: white;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-solid);
  background: white;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
  transform: translateY(-2px);
}

.form-input::placeholder {
  color: var(--text-light);
  opacity: 0.7;
}

.form-input:disabled {
  background: rgba(200, 200, 200, 0.3);
  color: var(--text-light);
  cursor: not-allowed;
}

.helper-text {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 6px;
  font-style: italic;
}

.helper-text::before {
  content: 'ℹ️';
  font-size: 0.9rem;
}

.tooltip-icon {
  cursor: help;
  font-size: 1rem;
  opacity: 0.7;
  transition: var(--transition-fast);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.tooltip-icon:hover {
  opacity: 1;
  transform: scale(1.2);
}

/* ===== CARD NOTICE - DESTAQUE ===== */
.card-notice {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
  border-left: 4px solid var(--primary-solid);
  padding: 18px;
  border-radius: var(--border-radius-sm);
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  gap: 15px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
}

.lock-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
  animation: pulse 2s ease-in-out infinite;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.card-notice p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-medium);
  line-height: 1.5;
}

.card-notice strong {
  color: var(--text-dark);
  font-weight: 700;
}

/* ===== PAYMENT CONTAINER ===== */
.payment-container {
  margin-bottom: 20px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: var(--border-radius-sm);
  border: 2px dashed rgba(102, 126, 234, 0.3);
}

/* ===== ACTION SECTION - BOTÃO DESTAQUE ===== */
.action-section {
  text-align: center;
  margin: 40px 0;
  animation: fadeInUp 1.2s ease-out;
}

.btn-primary {
  width: 100%;
  padding: 18px 32px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-xl);
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before {
  width: 400px;
  height: 400px;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(-2px);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  filter: grayscale(50%);
}

.btn-large {
  padding: 20px 40px;
  font-size: 1.2rem;
}

.terms-text {
  margin-top: 18px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.9);
  font-style: italic;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* ===== LOADING PREMIUM ===== */
.loading {
  text-align: center;
  padding: 80px 30px;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-xl);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.spinner {
  border: 5px solid rgba(255, 255, 255, 0.2);
  border-top: 5px solid var(--primary-solid);
  border-radius: 50%;
  width: 70px;
  height: 70px;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 25px;
  box-shadow: 0 0 20px rgba(102, 126, 234, 0.5);
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading p {
  color: var(--text-dark);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.loading-subtitle {
  color: var(--text-medium);
  font-size: 0.95rem;
  margin: 0;
  font-style: italic;
}

/* ===== RESULT / ALERTS PREMIUM ===== */
.result {
  margin-top: 30px;
  animation: fadeInUp 0.6s ease-out;
}

.alert {
  padding: 25px;
  border-radius: var(--border-radius);
  margin-bottom: 25px;
  border-left: 5px solid;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(10px);
  animation: fadeInUp 0.5s ease-out;
}

.alert-success {
  background: linear-gradient(135deg, rgba(0, 212, 170, 0.15) 0%, rgba(79, 172, 254, 0.15) 100%);
  border-left-color: var(--success-solid);
  color: #1b5e20;
}

.alert-success h3,
.alert-success strong {
  color: #1b5e20;
  font-weight: 700;
}

.alert-error {
  background: linear-gradient(135deg, rgba(255, 82, 82, 0.15) 0%, rgba(255, 107, 107, 0.15) 100%);
  border-left-color: var(--danger);
  color: #b71c1c;
}

.alert-error h3,
.alert-error strong {
  color: #b71c1c;
  font-weight: 700;
}

.alert-warning {
  background: linear-gradient(135deg, rgba(255, 183, 77, 0.15) 0%, rgba(255, 152, 0, 0.15) 100%);
  border-left-color: var(--warning);
  color: #e65100;
}

.alert h3 {
  margin-bottom: 15px;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert p {
  margin-bottom: 10px;
  font-size: 0.95rem;
  line-height: 1.6;
}

.order-details {
  background: rgba(0, 0, 0, 0.05);
  padding: 18px;
  border-radius: var(--border-radius-sm);
  margin: 18px 0;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  border: 1px dashed rgba(0, 0, 0, 0.2);
}

.order-details p {
  margin-bottom: 8px;
  word-break: break-word;
}

/* ===== BADGES SECTION PREMIUM ===== */
.badges-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  padding: 35px;
  border-radius: var(--border-radius-lg);
  margin: 40px 0;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.25);
  animation: fadeInUp 1.4s ease-out;
}

.badge {
  text-align: center;
  padding: 25px 20px;
  border-radius: var(--border-radius-sm);
  background: rgba(255, 255, 255, 0.2);
  transition: var(--transition-smooth);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.badge:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-6px) scale(1.05);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
}

.badge-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 12px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
  animation: float 3s ease-in-out infinite;
}

.badge p {
  font-size: 0.85rem;
  color: var(--text-white);
  font-weight: 700;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ===== FOOTER PREMIUM ===== */
.footer {
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(10px);
  text-align: center;
  padding: 50px 30px;
  color: white;
  margin-top: 50px;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.2);
  animation: fadeInUp 1.6s ease-out;
}

.footer-content {
  max-width: 800px;
  margin: 0 auto;
}

.footer-link {
  margin-bottom: 25px;
}

.footer-link a {
  color: white;
  text-decoration: none;
  font-weight: 700;
  padding: 12px 24px;
  border: 2px solid white;
  border-radius: var(--border-radius-sm);
  transition: var(--transition-smooth);
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.9rem;
}

.footer-link a:hover {
  background: white;
  color: var(--primary-solid);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(255, 255, 255, 0.3);
}

.footer-text {
  font-size: 0.95rem;
  margin-bottom: 12px;
  opacity: 0.95;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.footer-copyright {
  font-size: 0.8rem;
  opacity: 0.8;
  margin-bottom: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* ===== UTILITIES ===== */
.text-center {
  text-align: center;
}

.text-success {
  color: var(--success-solid);
  font-weight: 700;
}

.text-error {
  color: var(--danger);
  font-weight: 700;
}

.text-warning {
  color: var(--warning);
  font-weight: 700;
}

.text-muted {
  color: var(--text-light);
  font-size: 0.9rem;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .header {
    padding: 35px 25px;
    margin-bottom: 30px;
  }
  
  .header-content h1 {
    font-size: 2.2rem;
  }
  
  .header-subtitle {
    font-size: 0.95rem;
  }
  
  .security-info {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .card {
    padding: 25px;
    margin-bottom: 25px;
  }
  
  .section-title {
    font-size: 1.3rem;
  }
  
  .badges-section {
    grid-template-columns: repeat(2, 1fr);
    padding: 25px;
    gap: 15px;
  }
  
  .footer {
    padding: 35px 20px;
  }
  
  .btn-primary {
    padding: 16px 28px;
    font-size: 1.05rem;
  }
}

@media (max-width: 480px) {
  body {
    padding: 10px;
  }
  
  .header {
    padding: 25px 15px;
    margin-bottom: 20px;
  }
  
  .header-content h1 {
    font-size: 1.8rem;
  }
  
  .header-subtitle {
    font-size: 0.9rem;
  }
  
  .card {
    padding: 20px;
    margin-bottom: 20px;
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  
  .badges-section {
    grid-template-columns: 1fr;
    padding: 20px;
  }
  
  .btn-primary {
    padding: 14px 24px;
    font-size: 1rem;
  }
  
  .loading {
    padding: 50px 20px;
  }
  
  .spinner {
    width: 50px;
    height: 50px;
  }
  
  .info-card {
    padding: 20px;
  }
  
  .info-icon {
    font-size: 2.5rem;
  }
}

/* ===== PRINT STYLES ===== */
@media print {
  body {
    background: white;
  }
  
  .btn-primary,
  .footer,
  .loading,
  .security-info {
    display: none;
  }
  
  .card {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}

/* ===== PAINEL ADMIN (Mantido para compatibilidade) ===== */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--bg-card);
  padding: 20px;
  border-radius: var(--border-radius);
  text-align: center;
  box-shadow: var(--shadow-md);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: bold;
  background: var(--primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ===== SCROLLBAR PERSONALIZADA ===== */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* ===== SELECTION COLORS ===== */
::selection {
  background: rgba(102, 126, 234, 0.3);
  color: var(--text-dark);
}

::-moz-selection {
  background: rgba(102, 126, 234, 0.3);
  color: var(--text-dark);
}
