/* ⛳ GolfSegreteriaAI - Glassmorphism Premium Dark Theme */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;600;700;800&display=swap');

:root {
  --bg-main: #0a110e;
  --bg-card: rgba(18, 28, 23, 0.75);
  --bg-card-hover: rgba(26, 42, 34, 0.85);
  --border-glow: rgba(46, 204, 113, 0.25);
  --border-gold: rgba(241, 196, 15, 0.35);
  
  --accent-emerald: #2ecc71;
  --accent-gold: #f1c40f;
  --accent-gold-dark: #b7950b;
  --accent-cyan: #00f2fe;
  --danger-red: #e74c3c;
  --warning-amber: #f39c12;
  
  --text-main: #f0f4f2;
  --text-muted: #95a5a6;
  --text-dark: #1e272e;

  --glass-border: 1px solid rgba(255, 255, 255, 0.08);
  --shadow-glow: 0 8px 32px 0 rgba(0, 0, 0, 0.45);
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: radial-gradient(circle at 50% -20%, #173e2d 0%, #0a110e 70%);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.6;
}

/* Header */
.app-header {
  background: rgba(10, 17, 14, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: var(--glass-border);
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-brand {
  font-family: 'Outfit', sans-serif;
  font-size: 1.7rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.logo-brand span {
  color: var(--accent-emerald);
}

.logo-title p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  border-radius: 50px;
  background: rgba(46, 204, 113, 0.1);
  border: 1px solid rgba(46, 204, 113, 0.3);
  font-size: 0.85rem;
  color: var(--accent-emerald);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 10px var(--accent-emerald);
}

/* App Layout & Tabs */
.main-container {
  max-width: 1400px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

.nav-tabs {
  display: flex;
  gap: 0.8rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.8rem;
  overflow-x: auto;
}

.tab-btn {
  background: rgba(255, 255, 255, 0.04);
  border: var(--glass-border);
  color: var(--text-muted);
  padding: 0.75rem 1.4rem;
  border-radius: 12px;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.tab-btn:hover {
  background: rgba(46, 204, 113, 0.15);
  color: var(--text-main);
  border-color: rgba(46, 204, 113, 0.4);
}

.tab-btn.active {
  background: linear-gradient(135deg, rgba(46, 204, 113, 0.25), rgba(241, 196, 15, 0.15));
  color: #ffffff;
  border-color: var(--accent-emerald);
  box-shadow: 0 4px 20px rgba(46, 204, 113, 0.2);
}

.tab-content {
  display: none;
  animation: fadeIn 0.4s ease-in-out;
}

.tab-content.active {
  display: block;
}

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

/* Glass Card Component */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: var(--glass-border);
  border-radius: 16px;
  padding: 1.8rem;
  box-shadow: var(--shadow-glow);
  margin-bottom: 1.5rem;
  transition: var(--transition);
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.8rem;
}

.card-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* Scanner Layout */
.scanner-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 1.5rem;
  transition: all 0.3s ease;
}

.scanner-grid.single-column {
  grid-template-columns: 1fr !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 1.5rem;
}

.scanner-grid.single-column .preview-container {
  max-height: 700px;
}

.scanner-grid.single-column .preview-container img {
  max-height: 650px;
  width: 100%;
  object-fit: contain;
}

.btn-secondary.active {
  background: var(--accent-emerald) !important;
  color: #ffffff !important;
  border-color: var(--accent-emerald) !important;
  box-shadow: 0 0 10px rgba(46, 204, 113, 0.4) !important;
}

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

.upload-area {
  border: 2px dashed rgba(46, 204, 113, 0.4);
  border-radius: 14px;
  padding: 2.5rem 1.5rem;
  text-align: center;
  background: rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.upload-area:hover, .upload-area.dragover {
  border-color: var(--accent-emerald);
  background: rgba(46, 204, 113, 0.08);
  transform: scale(1.01);
}

.upload-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--accent-emerald);
}

.preview-container {
  margin-top: 1rem;
  max-height: 550px;
  overflow: auto;
  border-radius: 12px;
  border: 1px solid var(--accent-emerald);
  display: none;
  background: #0f1c15;
  transition: transform 0.2s, box-shadow 0.2s;
}

.preview-container:hover {
  box-shadow: 0 0 15px rgba(46,204,113,0.3);
}

.preview-container img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  cursor: zoom-in;
}

/* Scorecard Verification Table */
.hole-grid {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.hole-box {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.5rem 0.2rem;
  text-align: center;
}

.hole-box.uncertain {
  border-color: var(--warning-amber);
  background: rgba(243, 156, 18, 0.15);
}

.hole-box label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

.hole-box input {
  width: 100%;
  background: transparent;
  border: none;
  color: #ffffff;
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  text-align: center;
  outline: none;
}

.hole-box .sub-info {
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* Warnings Box */
.warnings-box {
  background: rgba(231, 76, 60, 0.12);
  border: 1px solid rgba(231, 76, 60, 0.4);
  border-radius: 12px;
  padding: 1rem;
  margin-top: 1rem;
  display: none;
}

.warnings-box.show {
  display: block;
}

.warning-item {
  color: #ff7675;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Leaderboard Styling */
.filter-bar {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.btn-filter {
  background: rgba(255, 255, 255, 0.05);
  border: var(--glass-border);
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  transition: var(--transition);
}

.btn-filter:hover, .btn-filter.active {
  background: var(--accent-emerald);
  color: #000;
}

/* Export Dropdown Glass Menu */
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.55rem 1rem;
  text-decoration: none;
  color: var(--text-main);
  transition: all 0.2s ease;
  cursor: pointer;
}
.dropdown-item:hover {
  background: rgba(46, 204, 113, 0.14);
  transform: translateX(4px);
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
}

.leaderboard-table th {
  background: rgba(15, 56, 44, 0.6);
  color: var(--accent-emerald);
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  text-align: left;
  padding: 1rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid rgba(46, 204, 113, 0.3);
}

.leaderboard-table td {
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.95rem;
}

.leaderboard-table tr:hover {
  background: rgba(46, 204, 113, 0.05);
}

.rank-badge {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 0.95rem;
}

.rank-1 { background: linear-gradient(135deg, #ffeaa7, #fdcb6e); color: #d35400; box-shadow: 0 0 12px rgba(253, 203, 110, 0.5); }
.rank-2 { background: linear-gradient(135deg, #dfe6e9, #b2bec3); color: #2d3436; }
.rank-3 { background: linear-gradient(135deg, #fab1a0, #e17055); color: #636e72; }
.rank-other { background: rgba(255, 255, 255, 0.08); color: var(--text-muted); }

/* Form Controls & Buttons */
.btn-primary {
  background: linear-gradient(135deg, var(--accent-emerald), #27ae60);
  color: #ffffff;
  border: none;
  padding: 0.75rem 1.6rem;
  border-radius: 10px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(46, 204, 113, 0.45);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border: var(--glass-border);
  padding: 0.75rem 1.4rem;
  border-radius: 10px;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn-gold {
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-dark));
  color: #111111;
  border: none;
  padding: 0.75rem 1.6rem;
  border-radius: 10px;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 15px rgba(241, 196, 15, 0.3);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(241, 196, 15, 0.5);
}

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

.form-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  font-weight: 600;
}

.form-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 0.7rem 1rem;
  color: #ffffff;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
}

.form-input:focus {
  border-color: var(--accent-emerald);
  box-shadow: 0 0 10px rgba(46, 204, 113, 0.3);
}

/* Ceremony Cards */
.prize-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.prize-card {
  background: linear-gradient(135deg, rgba(241, 196, 15, 0.08), rgba(18, 28, 23, 0.8));
  border: 1px solid var(--border-gold);
  border-radius: 14px;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.prize-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-gold);
}

.prize-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.5rem;
}

.prize-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-gold);
  margin-bottom: 0.5rem;
}

.prize-winner {
  font-size: 1.2rem;
  font-weight: 800;
  color: #ffffff;
}

.prize-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Camera Modal overlay */
.camera-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  padding-bottom: 0.8rem;
  box-sizing: border-box;
  animation: fadeIn 0.3s ease;
}

.camera-box {
  background: var(--bg-card);
  border: var(--glass-border);
  border-radius: 16px;
  padding: 1rem 1.3rem;
  max-width: 680px;
  width: 95%;
  text-align: center;
  box-shadow: var(--shadow-glow);
  margin-bottom: 0.4rem;
}

.camera-box video {
  width: 100%;
  max-height: 400px;
  border-radius: 12px;
  border: 1px solid rgba(46, 204, 113, 0.4);
  background: #000;
  object-fit: cover;
}

/* ===================================================
   AI SCANNER LOADING ANIMATION (RADAR + PROGRESS BAR)
   =================================================== */
.ai-scan-loader-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.5rem;
  text-align: center;
  animation: fadeIn 0.3s ease;
}

.ai-scan-ring-wrapper {
  position: relative;
  width: 90px;
  height: 90px;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-scan-ring-outer {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: var(--accent-emerald);
  border-right-color: rgba(46, 204, 113, 0.5);
  animation: spin 1.2s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
}

.ai-scan-ring-inner {
  position: absolute;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 2px dashed rgba(241, 196, 15, 0.7);
  animation: spinReverse 2s linear infinite;
}

.ai-scan-icon {
  font-size: 2.2rem;
  animation: pulseGlow 1.5s ease-in-out infinite alternate;
  z-index: 2;
}

.ai-progress-track {
  width: 100%;
  max-width: 360px;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  overflow: hidden;
  margin: 1.2rem auto 0.6rem auto;
  border: 1px solid rgba(255, 255, 255, 0.12);
  position: relative;
}

.ai-progress-fill {
  height: 100%;
  width: 20%;
  background: linear-gradient(90deg, #2ecc71 0%, #f1c40f 100%);
  border-radius: 20px;
  box-shadow: 0 0 14px rgba(46, 204, 113, 0.7);
  transition: width 0.3s ease;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes spinReverse {
  0% { transform: rotate(360deg); }
  100% { transform: rotate(0deg); }
}

@keyframes pulseGlow {
  0% { transform: scale(0.95); opacity: 0.85; filter: drop-shadow(0 0 4px rgba(46, 204, 113, 0.4)); }
  100% { transform: scale(1.12); opacity: 1; filter: drop-shadow(0 0 16px rgba(46, 204, 113, 0.9)); }
}

/* ==========================================
   GLASSMORPHISM TOAST NOTIFICATION SYSTEM
   ========================================== */
#toast-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  pointer-events: none;
}

.toast-notification {
  pointer-events: auto;
  background: rgba(18, 30, 22, 0.96);
  border: 1px solid rgba(46, 204, 113, 0.45);
  color: #ffffff;
  padding: 0.9rem 1.4rem;
  border-radius: 14px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.7), 0 0 20px rgba(46, 204, 113, 0.25);
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.92rem;
  font-weight: 600;
  animation: slideInToast 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: all 0.3s ease;
  max-width: 420px;
}

.toast-notification.error {
  border-color: rgba(231, 76, 60, 0.7);
  background: rgba(38, 16, 16, 0.96);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.7), 0 0 20px rgba(231, 76, 60, 0.3);
}

.toast-notification.warning {
  border-color: rgba(241, 196, 15, 0.7);
  background: rgba(38, 30, 12, 0.96);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.7), 0 0 20px rgba(241, 196, 15, 0.3);
}

.toast-notification.fade-out {
  opacity: 0;
  transform: translateY(-15px) scale(0.95);
}

@keyframes slideInToast {
  from { opacity: 0; transform: translateY(-20px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ===================================================
   APP FOOTER (MINIMAL & ESSENTIAL SAAS STYLE)
   =================================================== */
.app-footer {
  margin-top: 3rem;
  padding: 1.2rem 1.5rem;
  background: rgba(10, 18, 13, 0.7);
  border-top: 1px solid rgba(46, 204, 113, 0.15);
  backdrop-filter: blur(10px);
  color: var(--text-muted, #94a3b8);
  font-size: 0.82rem;
}

.footer-minimal-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.footer-brand {
  color: #ffffff;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  letter-spacing: -0.2px;
}

.footer-brand .accent {
  color: var(--accent-emerald, #2ecc71);
}

.footer-sep {
  color: rgba(255, 255, 255, 0.2);
  font-size: 0.75rem;
}

.footer-vaai-link {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.2s ease;
}

.footer-vaai-link strong {
  color: var(--accent-gold, #f1c40f);
  font-weight: 600;
}

.footer-vaai-link:hover {
  color: #ffffff;
  text-decoration: underline;
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.footer-right a {
  color: var(--text-muted, #94a3b8);
  text-decoration: none;
  font-size: 0.8rem;
  transition: color 0.2s ease;
}

.footer-right a:hover {
  color: var(--accent-emerald, #2ecc71);
}

.footer-copy {
  color: rgba(148, 163, 184, 0.6);
  font-size: 0.78rem;
}

@media (max-width: 768px) {
  .footer-minimal-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.6rem;
  }
}

/* WhatsApp & QR Share Modal Styles */
.btn-whatsapp {
  background: linear-gradient(135deg, #25D366, #128C7E) !important;
  color: #ffffff !important;
  border: none !important;
  font-weight: 700 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.4rem !important;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.3) !important;
  transition: all 0.2s ease !important;
  text-decoration: none !important;
  cursor: pointer !important;
}

.btn-whatsapp:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45) !important;
  filter: brightness(1.08) !important;
}

.qr-card-box {
  background: #ffffff;
  padding: 1.2rem;
  border-radius: 16px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  margin: 1rem 0;
}


