/* ========================================================
   Golf Settlement Pro — Premium App-Store Grade CSS
   ======================================================== */

:root {
  /* Color System */
  --green-900: #052e16;
  --green-800: #0a3d23;
  --green-700: #14532d;
  --green-600: #166534;
  --green-500: #16a34a;
  --green-400: #4ade80;
  --green-300: #86efac;
  --gold: #fbbf24;
  --gold-light: #fde68a;
  --gold-dark: #d97706;
  --red-400: #f87171;
  --red-500: #ef4444;
  --blue-400: #60a5fa;
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  /* Glass */
  --glass-white: rgba(255,255,255,0.08);
  --glass-white-2: rgba(255,255,255,0.12);
  --glass-white-3: rgba(255,255,255,0.18);
  --glass-border: rgba(255,255,255,0.12);
  --glass-border-2: rgba(255,255,255,0.2);

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.25);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.35);
  --shadow-xl: 0 16px 48px rgba(0,0,0,0.4);
  --shadow-gold: 0 4px 20px rgba(251,191,36,0.3);
  --shadow-green: 0 4px 20px rgba(22,163,74,0.3);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Safe areas for mobile */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* Reset */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(165deg, #052e16 0%, #0a3d23 30%, #14532d 60%, #0a3d23 100%);
  color: var(--white);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  padding-top: var(--safe-top);
  padding-bottom: var(--safe-bottom);
}

/* Background Ambient Effect */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 30% 20%, rgba(22,163,74,0.12) 0%, transparent 50%),
              radial-gradient(ellipse at 70% 80%, rgba(251,191,36,0.06) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
  animation: ambientFloat 20s ease-in-out infinite alternate;
}

@keyframes ambientFloat {
  0% { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(-30px, -20px) rotate(3deg); }
}

/* ========== ANIMATIONS ========== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); max-height: 0; }
  to { opacity: 1; transform: translateY(0); max-height: 2000px; }
}

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

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes badgeBounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

@keyframes progressFill {
  from { width: 0; }
}

/* ========== LAYOUT ========== */
.app-container {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 16px;
  padding-bottom: calc(16px + var(--safe-bottom));
}

@media (min-width: 768px) {
  .app-container { padding: 24px; }
}

/* ========== GLASS CARD ========== */
.glass-card {
  background: var(--glass-white);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-md);
  animation: fadeInUp 0.5s var(--ease) both;
}

.glass-card-accent {
  background: linear-gradient(135deg, rgba(251,191,36,0.12) 0%, rgba(251,191,36,0.04) 100%);
  border: 1px solid rgba(251,191,36,0.25);
}

/* ========== HEADER ========== */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.app-logo {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: var(--shadow-gold);
}

.logo-text h1 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.2;
  background: linear-gradient(135deg, var(--white) 0%, var(--gray-300) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-text p {
  font-size: 12px;
  color: var(--gray-400);
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-top: 2px;
}

/* Settings Button */
.btn-settings {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border-2);
  background: var(--glass-white-2);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s var(--ease);
}

.btn-settings:hover {
  background: var(--glass-white-3);
  transform: rotate(30deg);
}

.btn-settings:active { transform: rotate(30deg) scale(0.95); }

/* ========== SETTINGS PANEL ========== */
.settings-panel {
  animation: slideDown 0.35s var(--ease);
  overflow: hidden;
}

.settings-section {
  background: var(--glass-white);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
}

.settings-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-300);
  margin-bottom: 10px;
}

.settings-label svg {
  width: 18px;
  height: 18px;
  color: var(--gold);
}

/* Input Fields */
.input-field {
  width: 100%;
  padding: 12px 16px;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--glass-border-2);
  background: var(--glass-white);
  color: var(--white);
  transition: all 0.25s var(--ease);
  outline: none;
  -webkit-appearance: none;
}

.input-field:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(251,191,36,0.15);
}

.input-field::placeholder { color: var(--gray-500); }

.input-small {
  width: 68px;
  padding: 8px;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
}

/* Player name input */
.input-player-name {
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  background: var(--glass-white-2);
  border: 1.5px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--white);
  outline: none;
  transition: all 0.25s var(--ease);
  width: 100%;
  min-width: 0;
  font-family: inherit;
}

.input-player-name:focus {
  border-color: var(--green-400);
  box-shadow: 0 0 0 3px rgba(74,222,128,0.12);
}

/* ========== RULES BOX ========== */
.rules-box {
  background: linear-gradient(135deg, rgba(251,191,36,0.1) 0%, rgba(251,191,36,0.03) 100%);
  border: 1px solid rgba(251,191,36,0.2);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.rules-box h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.rules-box ul {
  list-style: none;
  padding: 0;
}

.rules-box li {
  font-size: 13px;
  color: var(--gray-300);
  padding: 4px 0;
  padding-left: 20px;
  position: relative;
  line-height: 1.6;
}

.rules-box li::before {
  content: '•';
  position: absolute;
  left: 6px;
  color: var(--gold);
  font-weight: bold;
}

/* ========== MODE TABS ========== */
.mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 20px;
}

.mode-tab {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--glass-border-2);
  background: var(--glass-white);
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.mode-tab:hover { background: var(--glass-white-2); }

.mode-tab.active {
  background: linear-gradient(135deg, rgba(251,191,36,0.2) 0%, rgba(251,191,36,0.08) 100%);
  border-color: var(--gold);
  color: var(--gold);
  box-shadow: var(--shadow-gold);
}

.mode-tab svg { width: 20px; height: 20px; }

/* ========== UPLOAD AREA ========== */
.upload-area {
  text-align: center;
  padding: 40px 20px;
}

.upload-icon-wrapper {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--glass-white-2);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--glass-border-2);
  transition: all 0.3s var(--ease);
}

.upload-area:hover .upload-icon-wrapper {
  border-color: var(--gold);
  background: rgba(251,191,36,0.08);
}

.upload-icon-wrapper svg {
  width: 36px;
  height: 36px;
  color: var(--gray-400);
}

.upload-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.upload-desc {
  font-size: 14px;
  color: var(--gray-400);
  margin-bottom: 24px;
  line-height: 1.6;
}

.upload-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(74,222,128,0.1);
  border: 1px solid rgba(74,222,128,0.25);
  color: var(--green-400);
  font-size: 12px;
  font-weight: 600;
  margin-top: 16px;
}

/* ========== PRIMARY BUTTON ========== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 32px;
  border-radius: var(--radius-md);
  border: none;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: var(--green-900);
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  box-shadow: var(--shadow-gold);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(251,191,36,0.4);
}

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

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  border: 1.5px solid rgba(239,68,68,0.4);
  background: rgba(239,68,68,0.12);
  color: var(--red-400);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.25s var(--ease);
}

.btn-secondary:hover {
  background: rgba(239,68,68,0.2);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--glass-border-2);
  background: var(--glass-white);
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.25s var(--ease);
}

.btn-outline:hover {
  background: var(--glass-white-2);
  border-color: var(--gold);
  color: var(--gold);
}

.btn-toggle-details {
  padding: 10px 20px;
  border-radius: var(--radius-full);
  border: 1.5px solid rgba(251,191,36,0.3);
  background: rgba(251,191,36,0.08);
  color: var(--gold);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.25s var(--ease);
}

.btn-toggle-details:hover {
  background: rgba(251,191,36,0.15);
}

/* ========== OCR PROGRESS ========== */
.ocr-progress-bar {
  width: 100%;
  height: 6px;
  background: var(--glass-white);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin: 16px 0;
}

.ocr-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green-500), var(--gold));
  border-radius: var(--radius-full);
  transition: width 0.5s var(--ease);
  animation: progressFill 0.3s var(--ease);
}

.ocr-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-radius: var(--radius-lg);
}

.ocr-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--glass-white-3);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.ocr-status-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--gold);
  background: rgba(0,0,0,0.7);
  padding: 8px 16px;
  border-radius: var(--radius-full);
}

/* OCR Result */
.ocr-result-box {
  background: rgba(22,163,74,0.1);
  border: 1px solid rgba(74,222,128,0.3);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: left;
  margin-bottom: 20px;
  animation: fadeInUp 0.4s var(--ease);
}

.ocr-result-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--green-400);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ocr-result-row {
  font-size: 14px;
  color: var(--gray-300);
  padding: 4px 0;
  line-height: 1.6;
}

.ocr-result-row strong { color: var(--white); }

.ocr-issue-text { color: var(--red-400); }

/* Image preview */
.preview-image-wrapper {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: var(--shadow-lg);
}

.preview-image-wrapper img {
  width: 100%;
  height: auto;
  display: block;
  transition: opacity 0.3s;
}

.preview-image-wrapper img.processing { opacity: 0.4; }

/* ========== SCORE TABLE ========== */
.score-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: -4px;
  padding: 4px;
}

.score-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 640px;
}

.score-table thead th {
  position: sticky;
  top: 0;
  background: rgba(5,46,22,0.95);
  backdrop-filter: blur(10px);
  padding: 12px 8px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-400);
  border-bottom: 1px solid var(--glass-border);
  z-index: 10;
  white-space: nowrap;
}

.score-table thead th.th-player {
  color: var(--white);
  font-size: 13px;
}

.score-table tbody tr {
  transition: background 0.2s var(--ease);
}

.score-table tbody tr:hover {
  background: var(--glass-white);
}

.score-table tbody tr.row-double {
  background: rgba(251,191,36,0.06);
}

.score-table tbody tr.row-double:hover {
  background: rgba(251,191,36,0.1);
}

.score-table tbody td {
  padding: 8px 6px;
  text-align: center;
  vertical-align: middle;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 14px;
}

.hole-number {
  font-weight: 700;
  font-size: 15px;
  color: var(--white);
}

.par-number {
  font-weight: 600;
  color: var(--gray-400);
  font-size: 13px;
}

/* Half separator */
.score-table tbody tr.half-separator td {
  border-bottom: 2px solid rgba(251,191,36,0.25);
  padding-bottom: 12px;
}

.score-table tbody tr.half-separator + tr td {
  padding-top: 12px;
}

/* Score input in table */
.score-input-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.score-input {
  width: 52px;
  height: 38px;
  padding: 0;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  border-radius: var(--radius-sm);
  border: 1.5px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  color: var(--white);
  outline: none;
  transition: all 0.2s var(--ease);
  -webkit-appearance: none;
  -moz-appearance: textfield;
}

.score-input::-webkit-inner-spin-button,
.score-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.score-input:focus {
  border-color: var(--green-400);
  background: rgba(74,222,128,0.08);
  box-shadow: 0 0 0 3px rgba(74,222,128,0.1);
}

.score-input.score-birdie { color: var(--blue-400); border-color: rgba(96,165,250,0.4); background: rgba(96,165,250,0.08); }
.score-input.score-eagle { color: #c084fc; border-color: rgba(192,132,252,0.4); background: rgba(192,132,252,0.08); }
.score-input.score-bogey { color: var(--gold); border-color: rgba(251,191,36,0.3); background: rgba(251,191,36,0.05); }
.score-input.score-double-plus { color: var(--red-400); border-color: rgba(248,113,113,0.3); background: rgba(248,113,113,0.05); }

/* Nearest button */
.btn-nearest {
  padding: 3px 10px;
  font-size: 10px;
  font-weight: 700;
  font-family: inherit;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255,255,255,0.15);
  background: transparent;
  color: var(--gray-400);
  cursor: pointer;
  transition: all 0.2s var(--ease);
  letter-spacing: 0.3px;
}

.btn-nearest:hover { border-color: var(--gold); color: var(--gold); }

.btn-nearest.active {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  border-color: var(--gold);
  color: var(--green-900);
  box-shadow: 0 2px 8px rgba(251,191,36,0.3);
  animation: badgeBounce 0.4s var(--ease-bounce);
}

/* Double badge */
.badge-double {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: var(--green-900);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.3px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(251,191,36,0.35);
}

/* ========== SETTLEMENT RESULTS ========== */
.settlement-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 768px) {
  .settlement-grid { grid-template-columns: repeat(4, 1fr); }
}

.settlement-card {
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  text-align: center;
  border: 1px solid;
  animation: scaleIn 0.4s var(--ease) both;
  transition: transform 0.3s var(--ease);
}

.settlement-card:hover { transform: translateY(-2px); }

.settlement-card:nth-child(1) { animation-delay: 0.05s; }
.settlement-card:nth-child(2) { animation-delay: 0.1s; }
.settlement-card:nth-child(3) { animation-delay: 0.15s; }
.settlement-card:nth-child(4) { animation-delay: 0.2s; }

.settlement-card.positive {
  background: linear-gradient(135deg, rgba(22,163,74,0.15) 0%, rgba(22,163,74,0.05) 100%);
  border-color: rgba(74,222,128,0.25);
}

.settlement-card.negative {
  background: linear-gradient(135deg, rgba(239,68,68,0.15) 0%, rgba(239,68,68,0.05) 100%);
  border-color: rgba(248,113,113,0.25);
}

.settlement-rank {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 8px;
  color: var(--gray-400);
}

.settlement-card.positive .settlement-rank { color: var(--green-400); }
.settlement-card.negative .settlement-rank { color: var(--red-400); }

.settlement-name {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.settlement-amount {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.settlement-card.positive .settlement-amount { color: var(--green-400); }
.settlement-card.negative .settlement-amount { color: var(--red-400); }

.settlement-label {
  font-size: 12px;
  color: var(--gray-400);
  font-weight: 500;
}

/* ========== SECTION HEADER ========== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-title {
  font-size: 20px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title .emoji { font-size: 24px; }

/* ========== HOLE DETAILS ========== */
.hole-detail-card {
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 12px;
  border: 1px solid;
  animation: fadeInUp 0.3s var(--ease) both;
}

.hole-detail-card.normal {
  background: var(--glass-white);
  border-color: var(--glass-border);
}

.hole-detail-card.double {
  background: linear-gradient(135deg, rgba(251,191,36,0.08) 0%, rgba(251,191,36,0.02) 100%);
  border-color: rgba(251,191,36,0.2);
}

.hole-detail-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.hole-badge {
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
}

.hole-badge-number {
  background: var(--glass-white-3);
  color: var(--white);
}

.hole-badge-par {
  background: rgba(255,255,255,0.08);
  color: var(--gray-400);
  font-weight: 600;
  font-size: 12px;
}

/* Player settlement rows in hole details */
.hole-players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.hole-player-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid;
}

.hole-player-row.positive {
  background: rgba(22,163,74,0.1);
  border-color: rgba(74,222,128,0.2);
}

.hole-player-row.negative {
  background: rgba(239,68,68,0.1);
  border-color: rgba(248,113,113,0.2);
}

.hole-player-row.neutral {
  background: var(--glass-white);
  border-color: var(--glass-border);
}

.hole-player-name {
  font-size: 13px;
  font-weight: 600;
}

.hole-player-score {
  font-size: 12px;
  color: var(--gray-400);
}

.hole-player-amount {
  font-size: 15px;
  font-weight: 700;
}

.hole-player-row.positive .hole-player-amount { color: var(--green-400); }
.hole-player-row.negative .hole-player-amount { color: var(--red-400); }
.hole-player-row.neutral .hole-player-amount { color: var(--gray-400); }

/* Details breakdown */
.hole-breakdown {
  background: rgba(0,0,0,0.2);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 13px;
}

.hole-breakdown-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-400);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hole-breakdown-item {
  padding: 3px 0;
  color: var(--gray-300);
  line-height: 1.6;
  padding-left: 14px;
  position: relative;
}

.hole-breakdown-item::before {
  content: '›';
  position: absolute;
  left: 2px;
  color: var(--gray-500);
}

/* ========== RULES FOOTER ========== */
.rules-footer {
  padding: 24px;
}

.rules-footer h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.rules-list {
  list-style: none;
  padding: 0;
}

.rules-list li {
  font-size: 13px;
  color: var(--gray-300);
  padding: 5px 0;
  padding-left: 22px;
  position: relative;
  line-height: 1.7;
}

.rules-list li::before {
  content: '✦';
  position: absolute;
  left: 2px;
  color: var(--gold);
  font-size: 10px;
  top: 8px;
}

/* ========== TOTALS ROW ========== */
.totals-row {
  background: var(--glass-white-2) !important;
  border-top: 2px solid var(--glass-border-2);
}

.totals-row td {
  font-weight: 700 !important;
  font-size: 15px !important;
  color: var(--gold) !important;
  padding: 14px 6px !important;
}

/* ========== PLAYER NAME HEADER GRID ========== */
.player-names-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

@media (max-width: 640px) {
  .player-names-grid { grid-template-columns: repeat(2, 1fr); }
}

.player-name-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.player-name-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 640px) {
  .app-header { flex-wrap: wrap; gap: 12px; }

  .logo-text h1 { font-size: 18px; }
  .logo-text p { font-size: 10px; }
  .logo-icon { width: 40px; height: 40px; font-size: 20px; }

  .glass-card { padding: 16px; border-radius: var(--radius-lg); }

  .settlement-amount { font-size: 22px; }
  .settlement-name { font-size: 13px; }

  .section-title { font-size: 17px; }

  .mode-tab { font-size: 13px; padding: 12px; }

  .upload-title { font-size: 18px; }

  .hole-players-grid { grid-template-columns: 1fr 1fr; }
}

/* ========== DARK SCROLLBAR ========== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.25); }

/* ========== BUTTON GROUP ========== */
.btn-group {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ========== HIDDEN FILE INPUT ========== */
.hidden { display: none !important; }

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