/* =====================================================
   SPORTMATCH UNIVERSE – APP UI
   100% ALLINEATO AL SITO UFFICIALE
===================================================== */

/* ===== VARIABILI BRAND (DAL SITO) ===== */
:root {
  --brand: #0bb3b5;
  --brand-dark: #089a9c;
  --accent: #ff7a29;

  --ink: #0b1220;
  --bg: #ffffff;
  --card: #f8f9fa;
  --dark: #0b1220;

  --white: #ffffff;
  --text-primary: #0b1220;
  --text-secondary: #495057;
  --muted: #6c757d;
  --muted-light: #adb5bd;

  --border-soft: rgba(0,0,0,.08);
  --border-medium: rgba(0,0,0,.15);
  
  /* Contrasti migliorati per accessibilità */
  --success: #28a745;
  --danger: #dc3545;
  --warning: #ffc107;
  --info: #17a2b8;
}

/* ===== ANIMAZIONI GRADIENTI ===== */
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes shine {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* ===== RESET ===== */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: #ffffff;
  color: var(--text-primary);
  font-family: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  min-height: 100vh;
  min-height: 100svh; /* For mobile browsers */
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

/* iOS safe area support */
@supports (padding: env(safe-area-inset-top)) {
  body {
    padding-top: env(safe-area-inset-top);
    padding-bottom: calc(80px + env(safe-area-inset-bottom));
  }
}

body::before {
  content: '';
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 70%;
  max-width: 700px;
  height: auto;
  aspect-ratio: 5/3;
  background-image: url('logo-watermark.svg');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  pointer-events: none;
  z-index: 0;
  opacity: 0.15;
}

body {
  align-items: center;
  justify-content: flex-start;
  padding-bottom: 0;
  max-width: 100vw;
  position: relative;
  z-index: 1;
}

body > * {
  position: relative;
  z-index: 1;
}

/* ===== LOGO ===== */
.app-logo {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
  overflow: hidden;
}

.app-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  background: rgba(255, 255, 255, 0.95);
  border-top: none;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  height: var(--navbar-height, 48px);
  z-index: 1000;
  padding: 0;
  box-shadow: 0 -2px 10px rgba(0, 35, 102, 0.1);
  border-radius: 0;
  margin: 0;
}

.navbar a,
.navbar button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  flex: 1;
  min-width: 0;
  max-width: none;
  height: 100%;
  text-decoration: none;
  color: #002366;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0;
  transition: all 0.2s ease;
  border-radius: 0;
  position: relative;
  padding: 0;
  text-transform: none;
  margin: 0;
  overflow: hidden;
}

.navbar a:hover,
.navbar button:hover {
  color: #002366;
  background: rgba(0, 35, 102, 0.08);
}

.navbar a.active,
.navbar button.active {
  color: #002366;
  font-weight: 600;
}

.navbar a.active::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  border-radius: 0 0 3px 3px;
}

.navbar span {
  font-size: var(--navbar-icon-size, 1.3rem);
  display: block;
  line-height: 1;
  margin: 0;
}

.navbar span:last-child {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  font-size: var(--navbar-text-size, 0.7rem);
}

/* ===== ADJUST BODY FOR NAVBAR ===== */
.app-header {
  width: 100%;
  flex-shrink: 0;
}

.app-container {
  width: 100%;
  max-width: 100%;
  padding-bottom: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ===== HEADER APP ===== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: saturate(140%) blur(6px);
  padding: var(--header-padding, 8px) 16px;
  border-bottom: 1px solid rgba(0, 35, 102, 0.1);
  display: flex;
  justify-content: center;
  align-items: center;
  border-bottom: 1px solid var(--border-soft);
  width: 100%;
  box-shadow: 0 4px 20px rgba(0, 35, 102, 0.15);
  position: relative;
  margin: 0;
  /* iOS safe area per notch */
  padding-top: calc(var(--header-padding, 8px) + env(safe-area-inset-top));
}

.app-header h1 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  color: #002366;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  max-width: calc(100% - 140px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-header-left {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  position: relative;
  z-index: 1;
}

.app-header-left .app-logo {
  pointer-events: auto;
}

.app-header-right {
  position: absolute;
  right: 12px;
  display: flex;
  gap: 8px;
  align-items: center;
  z-index: 10;
  pointer-events: auto;
}

/* ===== CONTAINER ===== */
.app-container {
  padding: 20px 16px 100px;
  width: 100%;
  max-width: 540px;
  box-sizing: border-box;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  overflow: visible; /* Previeni contenuto nascosto */
  min-height: auto; /* Evita altezze fisse su mobile */
}

/* iOS safe area support */
@supports (padding: env(safe-area-inset-bottom)) {
  .app-container {
    padding-bottom: calc(100px + env(safe-area-inset-bottom));
  }
}

/* Center content on desktop */
@media (min-width: 768px) {
  .app-container {
    max-width: 540px;
  }
}

/* ===== TITOLI ===== */
h1, h2, h3 {
  margin: 0 0 12px;
  font-weight: 600;
  color: #0b1220;
}

p {
  margin: 6px 0;
  color: #495057;
}

/* ===== AZIONI HOME ===== */
.actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 26px;
  margin-top: 24px;
}

.action {
  flex: 1;
  padding: 14px;
  border-radius: 14px;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s ease;
}

/* primary = brand */
.action.primary {
  background: linear-gradient(90deg, var(--brand), var(--accent));
  color: #fff;
}

.action.primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

/* secondary = soft */
.action.secondary {
  background: rgba(11, 179, 181, 0.08);
  color: var(--text-primary);
  border: 2px solid var(--brand);
}

.action.secondary:hover {
  background: rgba(11, 179, 181, 0.15);
  transform: translateY(-1px);
}

/* ===== CARD / SEZIONI ===== */
.card,
.search,
.match-card,
.filters-section {
  background: #ffffff;
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 18px;
  border: 2px solid rgba(11, 179, 181, 0.2);
  width: 100%;
  max-width: 540px;
  box-sizing: border-box;
  margin-left: auto;
  margin-right: auto;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  overflow: hidden; /* Previeni overflow */
}

.card.centered {
  text-align: center;
}

/* Ensure all card content respects boundaries */
.card > * {
  max-width: 100%;
  box-sizing: border-box;
}

.filters-section h3 {
  margin-bottom: 16px;
  font-size: 1.1rem;
}

/* ===== MATCHES LIST ===== */
#matchesList {
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
  box-sizing: border-box;
}

#resultsCount {
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
  box-sizing: border-box;
}

/* ===== FORM ===== */
input,
select,
textarea {
  width: 100%;
  padding: 14px 16px;
  margin-bottom: 14px;
  border-radius: 12px;
  border: 2px solid rgba(11, 179, 181, 0.3);
  background: #f8f9fa;
  color: #0b1220;
  font-size: 1rem;
  font-family: 'Poppins', sans-serif;
  transition: all 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(11, 179, 181, 0.15);
}

input::placeholder,
textarea::placeholder {
  color: #6c757d;
}

/* ===== DATE AND TIME INPUT STYLING ===== */
/* Force light color scheme for date/time inputs */
input[type="date"],
input[type="time"],
input[type="datetime-local"] {
  color-scheme: light;
  color: #0b1220 !important;
  background: #f8f9fa !important;
  position: relative !important;
  z-index: 1 !important;
}

/* Fix per modal dei date picker su Android/iOS */
input[type="date"]::-webkit-datetime-edit,
input[type="time"]::-webkit-datetime-edit,
input[type="datetime-local"]::-webkit-datetime-edit {
  position: relative;
  z-index: 1;
}

/* Webkit date/time picker icons */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  filter: invert(0.5);
  opacity: 0.8;
  position: relative;
  z-index: 2;
}

/* Webkit inner spin buttons */
input[type="date"]::-webkit-inner-spin-button,
input[type="time"]::-webkit-inner-spin-button {
  display: none;
}

/* Date/time input focus state */
input[type="date"]:focus,
input[type="time"]:focus,
input[type="datetime-local"]:focus {
  background: #ffffff !important;
  color: #0b1220 !important;
  position: relative !important;
  z-index: 10 !important;
}

/* ===== SELECT DROPDOWN STYLING ===== */
select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: #f8f9fa;
  background-image: none;
  padding-right: 44px;
  cursor: pointer;
  font-weight: 500;
  position: relative;
}

/* Chevron icon using pseudo-element */
select {
  background-image: linear-gradient(45deg, transparent 50%, var(--brand) 50%),
                    linear-gradient(135deg, var(--brand) 50%, transparent 50%);
  background-position: calc(100% - 20px) calc(1em + 2px),
                       calc(100% - 15px) calc(1em + 2px);
  background-size: 5px 5px,
                   5px 5px;
  background-repeat: no-repeat;
}

select:hover {
  border-color: rgba(11, 179, 181, 0.5);
  background-color: #ffffff;
}

select:focus {
  border-color: var(--brand);
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(11, 179, 181, 0.1);
}

select option {
  background: #ffffff !important;
  color: #0b1220;
  padding: 12px;
  font-weight: 500;
}

select option::before,
select option::after {
  display: none !important;
  content: none !important;
}

select option:checked,
select option:hover {
  background: rgba(11, 179, 181, 0.15) !important;
  color: var(--brand);
}

/* Select disabled state */
select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' 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");
}

/* Select full width variant */
select.full {
  width: 100%;
}

/* ===== LABELS ===== */
label {
  display: block;
  color: #495057;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 6px;
  margin-top: 6px;
}

label.required::after {
  content: ' *';
  color: var(--accent);
}

/* ===== CARD SECTIONS ===== */
.card, section.card {
  background: #fff;
  border-radius: 22px;
  padding: 22px 18px;
  margin-bottom: 22px;
  border: 2.5px solid var(--brand);
  box-shadow: 0 2px 16px rgba(11,179,181,0.08);
  width: 100%;
  max-width: 540px;
  box-sizing: border-box;
  margin-left: auto;
  margin-right: auto;
}

.card h3, section.card h3 {
  margin: 0 0 12px 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Form group */
.form-group {
  background: #fff;
  border-radius: 22px;
  padding: 22px 18px 18px 18px;
  margin-bottom: 22px;
  border: 2.5px solid var(--brand);
  box-shadow: 0 2px 16px rgba(11,179,181,0.08);
  width: 100%;
  max-width: 540px;
  box-sizing: border-box;
  margin-left: auto;
  margin-right: auto;
}

.sport-select-card {
  background: linear-gradient(90deg, #e9f7fa 60%, #f8f9fa 100%);
  border: 2px solid var(--brand);
  border-radius: 16px;
  margin-bottom: 18px;
  padding: 18px 16px 12px 16px;
  box-shadow: 0 2px 8px rgba(11,179,181,0.07);
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.sport-select-card:hover, .sport-select-card:focus-within {
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(255,122,41,0.10);
}
.sport-select-header {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--brand);
  margin-bottom: 8px;
}
.sport-select-header svg {
  color: var(--brand);
  margin-right: 6px;
}
.sport-checkbox {
  accent-color: var(--brand);
  width: 22px;
  height: 22px;
  margin-right: 10px;
  box-shadow: 0 2px 6px rgba(11,179,181,0.10);
}
.skill-select {
  margin-top: 8px;
  margin-bottom: 8px;
  box-shadow: 0 2px 8px rgba(11,179,181,0.07);
  border-radius: 10px;
  border: 1.5px solid var(--brand);
  background: #f8f9fa;
  color: #0b1220;
  font-size: 1rem;
}
.skill-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255,122,41,0.10);
}
.roles-label {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 6px;
  font-weight: 500;
}
.roles-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.role-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(90deg, #e9f7fa 60%, #f8f9fa 100%);
  border: 1.5px solid var(--brand);
  border-radius: 22px;
  padding: 7px 16px;
  font-size: 0.92rem;
  color: #0b1220;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.role-pill input[type="checkbox"] {
  accent-color: var(--accent);
  margin-right: 6px;
}
.role-pill:hover, .role-pill:has(input:checked) {
  background: linear-gradient(90deg, var(--brand) 60%, var(--accent) 100%);
  color: #fff;
  border-color: var(--accent);
}

/* ===== BOTTONI ===== */
/* NOTA: Gli stili base dei pulsanti sono ora in unified-buttons.css
   Qui manteniamo solo gli stili specifici per classi custom dell'app 
   
   IMPORTANT: Le classi .primary, .register-action-btn, .add-photo-btn, .full
   sono ora completamente gestite da unified-buttons.css */

/* ===== LINK ===== */
.link {
  background: none;
  border: none;
  color: var(--brand);
  font-size: .9rem;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.link:hover {
  opacity: 0.8;
}

.link-container {
  margin-top: 12px;
  text-align: center;
}

/* ===== CHECKBOX GROUP ===== */
.checkbox-group {
  margin: 16px 0;
}

.checkbox-group h3 {
  font-size: 0.95rem;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  margin-bottom: 8px;
  background: #f8f9fa;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-primary);
}

.checkbox-label:hover {
  background: #ffffff;
  border-color: var(--brand);
}

.checkbox-label input[type="checkbox"] {
  width: auto;
  margin: 0;
  cursor: pointer;
  accent-color: var(--brand);
}

/* ===== MATCH CARD ===== */
.match-card {
  transition: all 0.2s ease;
  cursor: pointer;
}

.match-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand);
  box-shadow: 0 4px 12px rgba(11, 179, 181, 0.15);
}

.match-card strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 6px;
  color: #0b1220;
}


/* Rimosso: checkbox-group e checkbox-label per sport/ruoli, ora pill-style e card */
.match-card span {
  display: block;
  margin: 8px 0 12px;
  color: #495057;
  font-size: 0.9rem;
}


/* ===== RESPONSIVE ===== */

/* Mobile-first design - ottimizzato per schermi piccoli */
@media (max-width: 374px) {
  body {
    font-size: 14px;
  }
  
  .app-header h1 {
    font-size: 0.85rem;
    max-width: calc(100% - 120px);
  }
  
  .app-header-left {
    gap: 6px;
  }
  
  .app-logo {
    width: 40px;
    height: 40px;
  }
  
  .notification-btn {
    padding: 6px;
  }
  
  .notification-icon {
    font-size: 1.3rem;
  }
  
  .container {
    padding: 12px;
    max-width: 100%;
  }
  
  h1 {
    font-size: 1.5rem;
  }
  
  h2 {
    font-size: 1.2rem;
  }
  
  .btn, button, input, select {
    min-height: 44px;
    font-size: 0.95rem;
  }
  
  .navbar a, .navbar button {
    font-size: 0.65rem;
    padding: 4px 2px;
    gap: 2px;
  }
  
  .navbar span:first-child {
    font-size: 1.1rem;
    margin-bottom: 2px;
  }
  
  .navbar span:last-child {
    font-size: 0.6rem;
  }
}

/* Small phones */
@media (min-width: 375px) and (max-width: 424px) {
  .app-header h1 {
    font-size: 0.9rem;
    max-width: calc(100% - 130px);
  }
  
  .container {
    padding: 16px;
  }

  .navbar a, .navbar button {
    font-size: 0.7rem;
  }
  
  .navbar span:first-child {
    font-size: 1.2rem;
  }
  
  .navbar span:last-child {
    font-size: 0.65rem;
  }
}

/* Standard phones and up */
@media (min-width: 425px) and (max-width: 767px) {
  .app-header h1 {
    font-size: 1rem;
    max-width: calc(100% - 140px);
  }
  
  .container {
    padding: 20px;
  }

  .navbar span:first-child {
    font-size: 1.3rem;
  }
  
  .navbar span:last-child {
    font-size: 0.7rem;
  }
}

/* Tablets and larger */
@media (min-width: 768px) {
  .app-header h1 {
    font-size: 1.1rem;
    max-width: calc(100% - 160px);
  }
  
  .app-container {
    max-width: 520px;
    margin: 0 auto;
    padding-bottom: 120px;
  }
  
  .container {
    max-width: 520px;
  }
  
  .navbar {
    max-width: 540px;
    border-radius: 16px 16px 0 0;
    left: 50% !important;
    transform: translateX(-50%) !important;
  }
  
  .navbar a, .navbar button {
    font-size: 0.75rem;
    padding: 6px 8px;
  }
  
  .navbar span:first-child {
    font-size: 1.4rem;
  }
  
  .navbar span:last-child {
    font-size: 0.75rem;
  }

  .navbar span {
    font-size: 1.05rem;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .app-container, .container {
    max-width: 600px;
  }
  
  body {
    font-size: 16px;
  }
}

/* Success animation */
@keyframes successPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* ===== NOTIFICATIONS ===== */
.notification-btn {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s;
  z-index: 100;
  pointer-events: auto;
}

.notification-btn:hover {
  background: rgba(11, 179, 181, 0.1);
}

.notification-icon {
  font-size: 1.5rem;
  display: block;
  pointer-events: none;
}

.notification-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: #ff7a29;
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  border: 2px solid white;
  box-shadow: 0 2px 8px rgba(255, 122, 41, 0.4);
}

.notifications-dropdown {
  position: fixed;
  top: 72px;
  right: 16px;
  width: calc(100% - 32px);
  max-width: 400px;
  max-height: 500px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 35, 102, 0.2);
  border: 2px solid rgba(11, 179, 181, 0.3);
  z-index: 1000;
  overflow: hidden;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.notifications-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 2px solid #dee2e6;
  background: #f8f9fa;
}

.notifications-header h3 {
  margin: 0;
  color: #002366;
  font-size: 1.1rem;
  font-weight: 700;
}

.mark-read-btn {
  background: none;
  border: none;
  color: #0bb3b5;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.3s;
}

.mark-read-btn:hover {
  background: rgba(11, 179, 181, 0.1);
}

.notifications-list {
  max-height: 420px;
  overflow-y: auto;
}

.notification-item {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid #dee2e6;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
}

.notification-item:hover {
  background: #f8f9fa;
}

.notification-item.unread {
  background: rgba(11, 179, 181, 0.05);
  border-left: 4px solid #0bb3b5;
}

.notification-item.unread::before {
  content: '';
  position: absolute;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  background: #0bb3b5;
  border-radius: 50%;
}

.notification-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.notification-icon-box.match {
  background: rgba(11, 179, 181, 0.15);
}

.notification-icon-box.payment {
  background: rgba(255, 122, 41, 0.15);
}

.notification-icon-box.info {
  background: rgba(0, 123, 255, 0.15);
}

.notification-icon-box.player {
  background: rgba(108, 117, 125, 0.15);
}

.notification-icon-box.cancellation {
  background: rgba(220, 53, 69, 0.15);
}

.notification-icon-box.change {
  background: rgba(255, 193, 7, 0.15);
}

.notification-icon-box.full {
  background: rgba(255, 122, 41, 0.15);
}

.notification-icon-box.reminder {
  background: rgba(0, 123, 255, 0.15);
}

.notification-icon-box.achievement {
  background: rgba(255, 215, 0, 0.15);
}

.notification-content {
  flex: 1;
}

.notification-title {
  color: #0b1220;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.notification-message {
  color: #495057;
  font-size: 0.85rem;
  line-height: 1.4;
  margin-bottom: 6px;
}

.notification-time {
  color: #6c757d;
  font-size: 0.75rem;
  font-weight: 500;
}

.notifications-empty {
  padding: 40px 20px;
  text-align: center;
  color: #6c757d;
}

.notifications-empty-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  opacity: 0.5;
}

.notifications-empty-text {
  font-size: 0.95rem;
}

/* Notification Detail Modal */
.notification-detail-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  padding-top: max(20px, env(safe-area-inset-top));
  padding-bottom: max(20px, env(safe-area-inset-bottom));
  backdrop-filter: blur(8px);
  animation: fadeIn 0.3s ease-out;
  overflow-y: auto;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.notification-detail-content {
  background: #ffffff;
  border-radius: 20px;
  padding: 32px 28px;
  max-width: 480px;
  width: 100%;
  max-height: calc(100vh - 40px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 35, 102, 0.3);
  border: 2px solid #dee2e6;
  position: relative;
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.notification-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #f8f9fa;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #495057;
  font-size: 1.3rem;
  font-weight: 400;
  transition: all 0.3s;
  z-index: 10;
}

.notification-close-btn:hover {
  background: #dee2e6;
  color: #0b1220;
}

.notification-detail-icon {
  font-size: 4rem;
  text-align: center;
  margin-bottom: 20px;
}

.notification-detail-title {
  color: #002366;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 16px 0;
  text-align: center;
}

.notification-detail-message {
  color: #495057;
  font-size: 1rem;
  line-height: 1.6;
  margin: 0 0 20px 0;
  text-align: center;
}

.notification-detail-time {
  color: #6c757d;
  font-size: 0.85rem;
  text-align: center;
  margin-bottom: 28px;
  font-weight: 500;
}

.notification-detail-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.notification-action-btn {
  padding: 14px 24px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s;
  border: none;
}

.notification-action-btn.primary {
  background: linear-gradient(135deg, #0bb3b5, #089a9c);
  color: white;
  box-shadow: 0 4px 16px rgba(11, 179, 181, 0.3);
}

.notification-action-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(11, 179, 181, 0.4);
}

.notification-action-btn.secondary {
  background: #ffffff;
  color: #495057;
  border: 2px solid #dee2e6;
}

.notification-action-btn.secondary:hover {
  background: #f8f9fa;
  border-color: #0bb3b5;
  color: #0bb3b5;
}

/* ===== PAYMENT MODAL ===== */
.payment-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 10000;
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 20px;
  padding-top: max(20px, env(safe-area-inset-top));
  padding-bottom: max(20px, env(safe-area-inset-bottom));
}

.payment-modal-content {
  position: relative;
  background: #ffffff;
  border-radius: 20px;
  padding: 32px;
  max-width: 500px;
  width: 100%;
  max-height: calc(100vh - 40px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  overflow-y: auto;
  margin: auto;
  box-shadow: 0 20px 60px rgba(0, 35, 102, 0.3);
  border: 2px solid #dee2e6;
  animation: slideUp 0.3s ease-out;
}

.close-modal-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #f8f9fa;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  color: #495057;
  z-index: 1;
}

.close-modal-btn:hover {
  background: #e9ecef;
  transform: rotate(90deg);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* ===== RESPONSIVE MODAL ADJUSTMENTS ===== */

/* Subscription Cards Responsive */
@media screen and (max-width: 480px) {
  /* Price display in cards */
  .card > div[style*="text-align: center"] > div[style*="font-size: 2.5rem"] {
    font-size: 2rem !important;
  }
  
  /* Feature lists */
  .card > div > div[style*="display: flex"][style*="gap: 12px"] {
    gap: 8px !important;
  }
  
  .card > div > div[style*="display: flex"] > div > div:first-child {
    font-size: 0.9rem !important;
  }
  
  .card > div > div[style*="display: flex"] > div > div:last-child {
    font-size: 0.8rem !important;
  }
  
  /* Button text */
  .card button.primary,
  .card button.full {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* Small screens - reduce padding and font sizes */
@media screen and (max-width: 480px) {
  .notification-detail-content,
  .payment-modal-content {
    padding: 20px 16px !important;
    border-radius: 16px !important;
  }
  
  .notification-detail-title {
    font-size: 1.3rem !important;
  }
  
  .notification-detail-message {
    font-size: 0.9rem !important;
  }
  
  .notification-action-btn {
    padding: 12px 20px !important;
    font-size: 0.9rem !important;
  }
  
  .notification-close-btn,
  .close-modal-btn {
    top: 12px !important;
    right: 12px !important;
    width: 32px !important;
    height: 32px !important;
  }
}

/* Very small screens - make buttons stack vertically */
@media screen and (max-width: 360px) {
  .notification-detail-actions {
    flex-direction: column !important;
  }
  
  .notification-action-btn {
    width: 100% !important;
  }
}

/* ===== PLAN SELECTION CARDS RESPONSIVE ===== */

/* Plan cards clickable area */
.plan-card {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
  user-select: none;
  -webkit-user-select: none;
}

.plan-card:active {
  opacity: 0.9;
}

/* Mobile - Stack plan cards vertically and center */
@media screen and (max-width: 768px) {
  #planSelection {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    max-width: 400px;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  
  .plan-card {
    padding: 20px !important;
  }
  
  .plan-card ul {
    font-size: 0.85rem !important;
    line-height: 1.8 !important;
  }
  
  /* Adjust modal content width on mobile */
  #upgradeModal .payment-modal-content {
    max-width: 100% !important;
    padding: 24px 16px !important;
  }
}

/* Small mobile screens */
@media screen and (max-width: 480px) {
  .plan-card {
    padding: 16px !important;
  }
  
  .plan-card h3 {
    font-size: 1.3rem !important;
  }
  
  .plan-card ul {
    font-size: 0.8rem !important;
    padding-left: 16px !important;
  }
  
  /* Price display */
  .plan-card > div[style*="text-align: center"] > div[style*="font-size: 2.5rem"] {
    font-size: 2rem !important;
  }
}

/* ===== PROFILE PLAYER CARD RESPONSIVE ===== */

/* General player card fixes for all screen sizes */
.card[style*="background: linear-gradient(135deg, #1a2332"],
.card[style*="background: linear-gradient(135deg, #002366"] {
  overflow: hidden !important;
}

.card[style*="background: linear-gradient(135deg, #1a2332"] > div,
.card[style*="background: linear-gradient(135deg, #002366"] > div {
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.card[style*="background: linear-gradient(135deg, #1a2332"] h2,
.card[style*="background: linear-gradient(135deg, #1a2332"] h3,
.card[style*="background: linear-gradient(135deg, #002366"] h2,
.card[style*="background: linear-gradient(135deg, #002366"] h3 {
  overflow-wrap: break-word !important;
  word-wrap: break-word !important;
  hyphens: auto !important;
}

/* Tablet and below - adjust player card layout */
@media screen and (max-width: 768px) {
  /* Reduce padding on player card */
  .card[style*="background: linear-gradient(135deg, #1a2332"] > div[style*="position: relative; padding: 24px"],
  .card[style*="background: linear-gradient(135deg, #002366"] > div[style*="position: relative; padding: 24px"] {
    padding: 16px !important;
  }
  
  /* Make card header responsive */
  .card[style*="background: linear-gradient(135deg, #1a2332"] > div > div[style*="display: flex; gap: 20px"],
  .card[style*="background: linear-gradient(135deg, #002366"] > div > div[style*="display: flex; gap: 20px"] {
    gap: 12px !important;
    flex-wrap: wrap !important;
  }
  
  /* Reduce profile photo size */
  #profilePhotoCard {
    width: 90px !important;
    height: 90px !important;
  }
  
  #profilePhotoCard span {
    font-size: 2.5rem !important;
  }
  
  /* Reduce rating box size */
  .card[style*="background: linear-gradient(135deg, #1a2332"] > div > div > div[style*="background: linear-gradient(135deg, var(--brand)"],
  .card[style*="background: linear-gradient(135deg, #002366"] > div > div > div[style*="background: linear-gradient(135deg, var(--brand)"] {
    min-width: 80px !important;
    padding: 12px 16px !important;
  }
  
  .card[style*="background: linear-gradient(135deg, #1a2332"] #overallRating,
  .card[style*="background: linear-gradient(135deg, #002366"] #overallRating {
    font-size: 2rem !important;
  }
  
  /* Reduce player name size */
  #userName {
    font-size: 1.4rem !important;
    word-break: break-word !important;
  }
  
  #preferredSport {
    font-size: 0.85rem !important;
  }
  
  /* Adjust stats display */
  .card[style*="background: linear-gradient(135deg, #1a2332"] > div > div > div[style*="display: flex; gap: 16px"],
  .card[style*="background: linear-gradient(135deg, #002366"] > div > div > div[style*="display: flex; gap: 16px"] {
    gap: 12px !important;
    flex-wrap: wrap !important;
  }
  
  .card[style*="background: linear-gradient(135deg, #1a2332"] > div > div > div > div > div[style*="font-size: 1.3rem"],
  .card[style*="background: linear-gradient(135deg, #002366"] > div > div > div > div > div[style*="font-size: 1.3rem"] {
    font-size: 1.1rem !important;
  }
  
  /* Reduce attributes grid gap */
  #playerAttributes {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  
  /* Share button */
  .card[style*="background: linear-gradient(135deg, #1a2332"] button[onclick*="shareProfile"],
  .card[style*="background: linear-gradient(135deg, #002366"] button[onclick*="shareProfile"] {
    font-size: 0.85rem !important;
    padding: 8px 16px !important;
  }
}

/* Mobile - Stack player card vertically */
@media screen and (max-width: 480px) {
  /* Stack header elements vertically */
  .card[style*="background: linear-gradient(135deg, #1a2332"] > div > div[style*="display: flex; gap: 20px"]:first-child,
  .card[style*="background: linear-gradient(135deg, #002366"] > div > div[style*="display: flex; gap: 20px"]:first-child {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
  }
  
  /* Center profile photo and rating */
  .card[style*="background: linear-gradient(135deg, #1a2332"] > div > div > div[style*="position: relative"],
  .card[style*="background: linear-gradient(135deg, #002366"] > div > div > div[style*="position: relative"] {
    margin: 0 auto !important;
  }
  
  /* Rating box full width on mobile */
  .card[style*="background: linear-gradient(135deg, #1a2332"] > div > div > div[style*="background: linear-gradient(135deg, var(--brand)"],
  .card[style*="background: linear-gradient(135deg, #002366"] > div > div > div[style*="background: linear-gradient(135deg, var(--brand)"] {
    width: 100% !important;
    max-width: 200px !important;
  }
  
  /* Player info full width */
  .card[style*="background: linear-gradient(135deg, #1a2332"] > div > div > div[style*="flex: 1"],
  .card[style*="background: linear-gradient(135deg, #002366"] > div > div > div[style*="flex: 1"] {
    flex: none !important;
    width: 100% !important;
  }
  
  /* Center stats row */
  .card[style*="background: linear-gradient(135deg, #1a2332"] > div > div > div[style*="display: flex; gap: 16px"],
  .card[style*="background: linear-gradient(135deg, #002366"] > div > div > div[style*="display: flex; gap: 16px"] {
    justify-content: center !important;
    flex-wrap: wrap !important;
  }
  
  /* Reduce padding further */
  .card[style*="background: linear-gradient(135deg, #1a2332"] > div[style*="position: relative; padding: 24px"],
  .card[style*="background: linear-gradient(135deg, #002366"] > div[style*="position: relative; padding: 24px"] {
    padding: 12px !important;
  }
  
  /* Reduce profile photo size more */
  #profilePhotoCard {
    width: 80px !important;
    height: 80px !important;
    border-width: 3px !important;
  }
  
  #profilePhotoCard span {
    font-size: 2rem !important;
  }
  
  /* Player name smaller */
  #userName {
    font-size: 1.2rem !important;
    word-break: break-word !important;
  }
  
  /* Stats section padding */
  .card[style*="background: linear-gradient(135deg, #1a2332"] > div > div[style*="background: rgba(0,0,0,0.2)"],
  .card[style*="background: linear-gradient(135deg, #002366"] > div > div[style*="background: rgba(0,0,0,0.2)"] {
    padding: 12px !important;
  }
  
  /* Attributes grid responsive */
  #playerAttributes {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }
  
  /* Performance badge responsive */
  .card[style*="background: linear-gradient(135deg, #1a2332"] > div > div[style*="margin-top: 16px; display: flex"],
  .card[style*="background: linear-gradient(135deg, #002366"] > div > div[style*="margin-top: 16px; display: flex"] {
    flex-direction: column !important;
    gap: 12px !important;
    text-align: center !important;
  }
  
  .card[style*="background: linear-gradient(135deg, #1a2332"] > div > div > div[style*="text-align: right"],
  .card[style*="background: linear-gradient(135deg, #002366"] > div > div > div[style*="text-align: right"] {
    text-align: center !important;
  }
  
  /* Share button responsive */
  .card[style*="background: linear-gradient(135deg, #1a2332"] button[onclick*="shareProfile"],
  .card[style*="background: linear-gradient(135deg, #002366"] button[onclick*="shareProfile"] {
    width: 100% !important;
    justify-content: center !important;
    padding: 10px 16px !important;
    font-size: 0.85rem !important;
  }
}

/* Very small screens */
@media screen and (max-width: 360px) {
  /* Further reduce sizes */
  #profilePhotoCard {
    width: 70px !important;
    height: 70px !important;
  }
  
  #profilePhotoCard span {
    font-size: 1.8rem !important;
  }
  
  #userName {
    font-size: 1.1rem !important;
  }
  
  .card[style*="background: linear-gradient(135deg, #1a2332"] > div > div > div[style*="display: flex; gap: 16px"],
  .card[style*="background: linear-gradient(135deg, #002366"] > div > div > div[style*="display: flex; gap: 16px"] {
    gap: 8px !important;
  }
  
  .card[style*="background: linear-gradient(135deg, #1a2332"] > div > div > div > div > div[style*="font-size: 1.3rem"],
  .card[style*="background: linear-gradient(135deg, #002366"] > div > div > div > div > div[style*="font-size: 1.3rem"] {
    font-size: 1rem !important;
  }
  
  /* Rating box smaller */
  .card[style*="background: linear-gradient(135deg, #1a2332"] > div > div > div[style*="background: linear-gradient(135deg, var(--brand)"],
  .card[style*="background: linear-gradient(135deg, #002366"] > div > div > div[style*="background: linear-gradient(135deg, var(--brand)"] {
    padding: 10px 12px !important;
    max-width: 180px !important;
  }
  
  .card[style*="background: linear-gradient(135deg, #1a2332"] #overallRating,
  .card[style*="background: linear-gradient(135deg, #002366"] #overallRating {
    font-size: 1.8rem !important;
  }
}

/* ===== SETTINGS PAGE RESPONSIVE ===== */

/* Settings Payment Methods Responsive */
@media screen and (max-width: 600px) {
  /* Payment method cards - stack buttons */
  #savedPaymentMethods > div > div[style*="display: flex; gap: 8px"] {
    flex-direction: column !important;
  }
  
  #savedPaymentMethods button {
    width: 100% !important;
  }
  
  /* Payment history - stack buttons */
  #paymentHistory > div > div[style*="display: flex; gap: 8px"] {
    flex-direction: column !important;
  }
  
  #paymentHistory button {
    width: 100% !important;
  }
}

/* Settings Subscription Badge */
@media screen and (max-width: 480px) {
  /* Subscription header responsive */
  .card > div[style*="display: flex; justify-content: space-between; align-items: start"] {
    flex-direction: column !important;
    gap: 12px !important;
  }
  
  #subscriptionBadge {
    align-self: flex-start !important;
  }
  
  /* Logo in modals */
  img[src*="assets/logo.png"][style*="width: 350px"] {
    width: 100% !important;
    max-width: 280px !important;
    height: auto !important;
  }
}

/* Very small screens - further adjustments */
@media screen and (max-width: 360px) {
  img[src*="assets/logo.png"][style*="width: 350px"] {
    max-width: 220px !important;
  }
}

/* ===== HOME SUBSCRIPTION BANNER RESPONSIVE ===== */

/* Tablet - adjust subscription banners */
@media screen and (max-width: 768px) {
  /* Free and Premium banners */
  #subscriptionBanner .card > div[style*="display: flex; align-items: center"] {
    gap: 12px !important;
  }
  
  #subscriptionBanner .card > div > div[style*="font-size: 3rem"] {
    font-size: 2.5rem !important;
  }
  
  #subscriptionBanner .card h3 {
    font-size: 1rem !important;
  }
  
  #subscriptionBanner .card p {
    font-size: 0.85rem !important;
  }
  
  #subscriptionBanner .card a[class*="primary"] {
    font-size: 0.85rem !important;
    padding: 8px 16px !important;
  }
  
  /* Platinum banner specific */
  #subscriptionBanner .card[style*="background: linear-gradient(135deg, #1e293b"] > div[style*="display: flex; align-items: center"] {
    gap: 16px !important;
  }
  
  #subscriptionBanner .card[style*="background: linear-gradient(135deg, #1e293b"] > div > div[style*="font-size: 4rem"] {
    font-size: 3rem !important;
  }
  
  #subscriptionBanner .card[style*="background: linear-gradient(135deg, #1e293b"] h3 {
    font-size: 1.2rem !important;
  }
  
  #subscriptionBanner .card[style*="background: linear-gradient(135deg, #1e293b"] > div > div > div[style*="display: grid"] {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)) !important;
    gap: 6px !important;
  }
}

/* Mobile - stack subscription banner elements */
@media screen and (max-width: 480px) {
  /* Free and Premium banners - stack vertically */
  #subscriptionBanner .card > div[style*="display: flex; align-items: center"] {
    flex-direction: column !important;
    text-align: center !important;
    gap: 12px !important;
  }
  
  #subscriptionBanner .card > div > div[style*="flex: 1"] {
    flex: none !important;
    width: 100% !important;
  }
  
  #subscriptionBanner .card a[class*="primary"] {
    width: 100% !important;
    white-space: normal !important;
    text-align: center !important;
  }
  
  /* Platinum banner - stack and center */
  #subscriptionBanner .card[style*="background: linear-gradient(135deg, #1e293b"] > div[style*="display: flex; align-items: center"] {
    flex-direction: column !important;
    text-align: center !important;
    padding: 16px !important;
  }
  
  #subscriptionBanner .card[style*="background: linear-gradient(135deg, #1e293b"] > div > div[style*="font-size: 4rem"] {
    font-size: 2.5rem !important;
  }
  
  #subscriptionBanner .card[style*="background: linear-gradient(135deg, #1e293b"] h3 {
    font-size: 1.1rem !important;
  }
  
  #subscriptionBanner .card[style*="background: linear-gradient(135deg, #1e293b"] > div > div > div[style*="display: flex; align-items: center; gap: 12px"] {
    flex-wrap: wrap !important;
    justify-content: center !important;
  }
  
  #subscriptionBanner .card[style*="background: linear-gradient(135deg, #1e293b"] > div > div > div[style*="display: grid"] {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }
  
  #subscriptionBanner .card[style*="background: linear-gradient(135deg, #1e293b"] > div > div > div > div {
    font-size: 0.8rem !important;
  }
  
  #subscriptionBanner .card[style*="background: linear-gradient(135deg, #1e293b"] a[href="profile.html"] {
    width: 100% !important;
    white-space: normal !important;
    text-align: center !important;
  }
}

/* Very small screens */
@media screen and (max-width: 360px) {
  #subscriptionBanner .card > div > div[style*="font-size: 3rem"],
  #subscriptionBanner .card > div > div[style*="font-size: 4rem"] {
    font-size: 2rem !important;
  }
  
  #subscriptionBanner .card h3 {
    font-size: 0.95rem !important;
  }
  
  #subscriptionBanner .card p {
    font-size: 0.8rem !important;
  }
  
  /* Platinum grid to single column */
  #subscriptionBanner .card[style*="background: linear-gradient(135deg, #1e293b"] > div > div > div[style*="display: grid"] {
    grid-template-columns: 1fr !important;
  }
}

/* Responsive adjustments for inline modal styles in match-detail.html */
@media screen and (max-width: 480px) {
  /* Payment Modal */
  #paymentModal > div {
    padding: 20px !important;
    margin: 10px auto !important;
  }
  
  #paymentModal h2 {
    font-size: 1.3rem !important;
  }
  
  #paymentModal h3 {
    font-size: 0.95rem !important;
  }
  
  #paymentModal .primary,
  #paymentModal .secondary {
    padding: 12px 16px !important;
    font-size: 0.9rem !important;
  }
  
  /* Confirmation Modal */
  #confirmationModal > div > div:first-child {
    padding: 32px 20px !important;
  }
  
  #confirmationModal > div > div:last-child {
    padding: 24px 20px !important;
  }
  
  #confirmationModal h2 {
    font-size: 1.4rem !important;
  }
  
  #confirmationModal h3 {
    font-size: 1rem !important;
  }
  
  #confirmationModal button {
    padding: 12px 16px !important;
    font-size: 0.9rem !important;
  }
}

@media screen and (max-width: 360px) {
  #paymentModal > div > div:last-child,
  #confirmationModal button.secondary {
    flex-direction: column !important;
  }
  
  #paymentModal button,
  #confirmationModal button {
    width: 100% !important;
  }
}

/* =====================================================
   MATCH DETAIL PAGE - Responsive Components
===================================================== */

/* Match Header */
.match-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.match-header-info {
  flex: 1;
  min-width: 0;
}

.match-sport {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.sport-icon {
  font-size: 2.5rem;
  flex-shrink: 0;
}

.sport-name {
  margin: 0;
  font-size: 1.6rem;
  line-height: 1.2;
  color: var(--text-primary);
}

.category-badge {
  display: inline-block;
  background: rgba(11, 179, 181, 0.15);
  color: var(--brand);
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-top: 6px;
}

.match-datetime {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.match-date {
  color: var(--text-primary);
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.match-time {
  color: var(--accent);
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
}

.status-badge {
  background: var(--brand);
  color: white;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Location Box */
.location-box {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 18px;
}

.section-title {
  margin: 0 0 12px 0;
  font-size: 0.9rem;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 600;
}

.location-content {
  display: flex;
  align-items: start;
  gap: 14px;
}

.location-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.location-info {
  flex: 1;
  min-width: 0;
}

.venue-name {
  font-weight: 700;
  color: var(--brand);
  margin-bottom: 4px;
  font-size: 1.1rem;
}

.venue-address {
  color: var(--text-primary);
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.venue-city {
  color: var(--muted);
  font-size: 0.9rem;
}

.venue-distance {
  color: var(--accent);
  font-size: 0.9rem;
  margin-top: 8px;
  font-weight: 600;
}

.map-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: opacity 0.2s;
}

.map-link:hover {
  opacity: 0.8;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.stat-card {
  border-radius: 14px;
  padding: 18px;
  text-align: center;
  border: 1px solid;
}

.stat-brand {
  background: rgba(11, 179, 181, 0.1);
  border-color: var(--brand);
}

.stat-accent {
  background: rgba(255, 122, 41, 0.1);
  border-color: var(--accent);
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
}

.stat-brand .stat-value {
  color: var(--brand);
}

.stat-accent .stat-value {
  color: var(--accent);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 8px;
  font-weight: 500;
}

/* Organizer Info */
.organizer-info {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 16px;
  background: var(--card);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid var(--border-soft);
}

.organizer-info:hover {
  background: rgba(11, 179, 181, 0.05);
  border-color: var(--brand);
}

.organizer-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.organizer-details {
  flex: 1;
  min-width: 0;
}

.organizer-name {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.organizer-meta {
  color: var(--muted);
  font-size: 0.85rem;
}

.chevron {
  color: var(--muted);
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* Roles List */
.roles-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Players List */
.players-list {
  margin-top: 16px;
}

.loading-text {
  text-align: center;
  color: var(--muted);
  padding: 20px;
}

/* Player Card */
.player-card {
  background: #f8f9fa;
  border: 2px solid #dee2e6;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.player-card.organizer {
  border-color: var(--brand);
}

.player-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.subscription-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  color: white;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.subscription-badge.premium {
  background: linear-gradient(135deg, #FFD700, #FFA500);
}

.subscription-badge.platinum {
  background: linear-gradient(135deg, #94a3b8, #64748b);
}

.player-card-content {
  display: flex;
  gap: 16px;
  align-items: start;
}

.player-photo {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 3px solid #dee2e6;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  overflow: hidden;
}

.player-photo.organizer {
  border-color: var(--brand);
}

.player-info {
  flex: 1;
  min-width: 0;
}

.player-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.organizer-crown {
  font-size: 1.2rem;
}

.player-name {
  font-weight: 700;
  color: var(--text);
  font-size: 1.05rem;
}

.player-you-badge {
  background: var(--brand);
  color: white;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
}

.player-role-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.player-type {
  color: var(--muted);
  font-size: 0.85rem;
}

.player-joined {
  color: var(--muted);
  font-size: 0.75rem;
}

.player-role-badge {
  background: rgba(11, 179, 181, 0.1);
  color: var(--brand);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-block;
  margin-bottom: 8px;
}

.player-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}

.player-city {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.8rem;
}

.player-sports {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.sport-badge {
  background: rgba(255, 122, 41, 0.1);
  color: #ff7a29;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
}

.more-sports {
  color: var(--muted);
  font-size: 0.7rem;
}

.player-bio {
  color: var(--muted);
  font-size: 0.8rem;
  font-style: italic;
  line-height: 1.4;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #dee2e6;
}

.player-chevron {
  color: var(--brand);
  font-size: 1.5rem;
  opacity: 0.4;
  align-self: center;
}

/* Action Buttons Container */
.action-buttons-container {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: transparent;
  padding: 16px;
  padding-bottom: calc(16px + 56px + env(safe-area-inset-bottom));
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.action-buttons-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  width: 100%;
  max-width: 508px;
  margin: 0 auto;
}

.action-main-btn {
  min-width: 0;
}

.action-share-btn {
  min-width: 120px;
  white-space: nowrap;
}

.share-text {
  display: inline;
}

/* Override unified-buttons.css for match-detail buttons */
.action-buttons-container .btn-primary,
.action-buttons-container .btn-secondary,
.action-buttons-container .btn-danger {
  border: none;
  border-radius: 14px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 16px 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  animation: none !important;
  background-size: 100% 100% !important;
}

.action-buttons-container .btn-primary {
  background: linear-gradient(135deg, #0bb3b5, #089a9c) !important;
  color: white !important;
}

.action-buttons-container .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(11, 179, 181, 0.35);
  background: linear-gradient(135deg, #0cc4c6, #0aabae) !important;
}

.action-buttons-container .btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(11, 179, 181, 0.25);
}

.action-buttons-container .btn-secondary {
  background: #ffffff !important;
  color: #0bb3b5 !important;
  border: 2px solid #0bb3b5 !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.action-buttons-container .btn-secondary:hover {
  background: #0bb3b5 !important;
  color: white !important;
  border-color: #0bb3b5 !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(11, 179, 181, 0.35);
}

.action-buttons-container .btn-secondary:active {
  transform: translateY(0);
}

.action-buttons-container .btn-danger {
  background: linear-gradient(135deg, #dc3545, #c82333) !important;
  color: white !important;
}

.action-buttons-container .btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(220, 53, 69, 0.35);
  background: linear-gradient(135deg, #e04555, #d73444) !important;
}

.action-buttons-container .btn-danger:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(220, 53, 69, 0.25);
}

.btn-square {
  min-width: 56px;
  padding: 14px;
}

.btn-full {
  width: 100%;
  max-width: 508px;
  margin: 0 auto;
}

.flex-1 {
  flex: 1;
  min-width: 0;
}

/* Responsive Adjustments for Match Detail */
@media screen and (max-width: 640px) {
  .match-header {
    flex-direction: column;
  }
  
  .status-badge {
    align-self: flex-start;
  }
  
  .sport-name {
    font-size: 1.4rem;
  }
  
  .sport-icon {
    font-size: 2rem;
  }
  
  .stat-value {
    font-size: 2rem;
  }
  
  /* Fix action buttons on mobile */
  .action-buttons-container {
    padding: 12px;
    padding-bottom: calc(12px + 56px + env(safe-area-inset-bottom));
  }
  
  .action-buttons-row {
    gap: 8px;
  }
  
  .action-share-btn {
    min-width: 110px;
  }
  
  .action-buttons-container .btn-primary,
  .action-buttons-container .btn-secondary,
  .action-buttons-container .btn-danger {
    font-size: 0.95rem;
    padding: 14px 20px;
  }
}

@media screen and (max-width: 480px) {
  .match-sport {
    gap: 10px;
  }
  
  .sport-icon {
    font-size: 1.8rem;
  }
  
  .sport-name {
    font-size: 1.3rem;
  }
  
  .location-content {
    gap: 12px;
  }
  
  .location-icon {
    font-size: 1.5rem;
  }
  
  .venue-name {
    font-size: 1rem;
  }
  
  .stats-grid {
    gap: 10px;
  }
  
  .stat-card {
    padding: 14px;
  }
  
  .stat-value {
    font-size: 1.8rem;
  }
  
  .stat-label {
    font-size: 0.8rem;
  }
  
  .action-buttons-container {
    padding: 10px;
    padding-bottom: calc(10px + 56px + env(safe-area-inset-bottom));
  }
  
  .action-buttons-row {
    gap: 8px;
    grid-template-columns: 1fr auto;
  }
  
  /* Nascondi testo "Condividi" su schermi piccoli */
  .share-text {
    display: none;
  }
  
  .action-share-btn {
    min-width: 52px;
    padding: 13px 14px !important;
  }
  
  .action-buttons-container .btn-primary,
  .action-buttons-container .btn-secondary,
  .action-buttons-container .btn-danger {
    font-size: 0.9rem;
    padding: 13px 18px;
  }
}

@media screen and (max-width: 360px) {
  .sport-name {
    font-size: 1.2rem;
  }
  
  .match-time {
    font-size: 1rem;
  }
  
  .status-badge {
    padding: 8px 14px;
    font-size: 0.85rem;
  }
  
  /* Nascondi testo "Condividi" */
  .share-text {
    display: none;
  }
  
  .action-share-btn {
    min-width: 48px;
    padding: 12px !important;
  }
  
  .action-buttons-container .btn-primary,
  .action-buttons-container .btn-secondary,
  .action-buttons-container .btn-danger {
    font-size: 0.85rem;
    padding: 12px 16px;
  }
  
  .action-buttons-container {
    padding: 8px;
    padding-bottom: calc(8px + 56px + env(safe-area-inset-bottom));
  }
  
  .stat-value {
    font-size: 1.6rem;
  }
  
  .organizer-avatar {
    width: 42px;
    height: 42px;
    font-size: 1.3rem;
  }
  
  .action-buttons-container {
    width: 100%;
  }
  
  .action-buttons-container .btn-primary,
  .action-buttons-container .btn-secondary,
  .action-buttons-container .btn-danger {
    padding: 12px 16px;
    font-size: 0.85rem;
  }
  
  .action-buttons-container .btn-square {
    min-width: 44px;
    padding: 12px;
  }
}
