/* ============================================================
   Padel All'Americana — Storm Reply Design System
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800;900&display=swap');

:root {
  --teal:          #0E9B8A;
  --teal-dark:     #00626A;
  --teal-darker:   #004D57;
  --teal-light:    #DFFAF6;
  --teal-pale:     #F0FAF9;
  --gold:          #F9A825;
  --gold-dark:     #E65100;
  --silver:        #78909C;
  --bronze:        #8D6E63;
  --text-main:     #1A2E2D;
}

/* ── Base ──────────────────────────────────────────────────── */

body {
  background: var(--teal-pale);
  font-family: 'Poppins', system-ui, sans-serif;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container.py-4,
.container-fluid.px-4.py-4 {
  flex: 1;
}

h1, h2, h3, h4, h5,
.card-header-custom,
.navbar-brand,
.section-header h2,
.winner-names,
.winner-display-names {
  font-family: 'Poppins', system-ui, sans-serif;
  letter-spacing: 0.3px;
}

/* ── Navbar ────────────────────────────────────────────────── */

.navbar {
  background: linear-gradient(135deg, var(--teal-dark) 0%, var(--teal-darker) 100%) !important;
  box-shadow: 0 2px 12px rgba(0, 98, 106, 0.35);
}
.navbar-brand { font-size: 1.3rem; letter-spacing: 0.5px; }
.navbar-logo  { height: 32px; object-fit: contain; }

@media (max-width: 576px) {
  .navbar-logo  { height: 26px; }
  .navbar-brand { font-size: 1.05rem; }
}

/* ── Cards ─────────────────────────────────────────────────── */

.card {
  border-radius: 14px;
  transition: box-shadow 0.2s;
}
.card-hover:hover {
  box-shadow: 0 6px 20px rgba(14, 155, 138, 0.15) !important;
  transform: translateY(-2px);
  transition: all 0.2s;
}

.card-header-custom {
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-dark) 100%);
  color: white;
  padding: 0.85rem 1.25rem;
  border-radius: 14px 14px 0 0 !important;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.5px;
}

/* ── Breadcrumb ─────────────────────────────────────────────── */

.breadcrumb { font-size: 0.85rem; }

/* ── Ranking table ──────────────────────────────────────────── */

.ranking-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--teal-dark);
  background: var(--teal-light);
  border-bottom: 2px solid rgba(14,155,138,0.2);
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
}
.ranking-table td { vertical-align: middle; }

.rank-gold   { background: #FFF9C4; }
.rank-silver { background: #F5F5F5; }
.rank-bronze { background: #FBE9E7; }
.rank-final  { background: var(--teal-light); }

/* ── Level dots ─────────────────────────────────────────────── */

.level-dots { display: flex; gap: 3px; margin-top: 2px; }
.level-dot  { width: 7px; height: 7px; border-radius: 50%; background: #cde8e5; }
.level-dot.active { background: var(--teal); }

/* ── Round rows ─────────────────────────────────────────────── */

.round-row { padding: 0.75rem 0; border-bottom: 1px solid rgba(14,155,138,0.1); }
.round-row:last-child { border-bottom: none; }

/* ── Match cards ─────────────────────────────────────────────── */

.match-final { border: 2px solid #d32f2f !important; }

.vs-divider {
  text-align: center;
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 3px;
  margin: 4px 0;
  color: var(--teal);
  font-family: 'Poppins', system-ui, sans-serif;
}

.team-names .fw-semibold { font-size: 0.95rem; }

.score-badge {
  font-size: 2rem;
  font-weight: 800;
  min-width: 48px;
  text-align: center;
  line-height: 1;
  font-family: 'Poppins', system-ui, sans-serif;
}
.score-win  { color: var(--teal); }
.score-lose { color: #C62828; }
.score-draw { color: #888; }

.score-form {
  background: var(--teal-light);
  border-radius: 0 0 12px 12px;
  margin: 0 -1rem -1rem;
  padding: 1rem;
}

@media (max-width: 576px) {
  .score-badge { font-size: 1.5rem; }
  .score-form input[type=number] { font-size: 1.1rem; padding: 0.6rem 0.4rem; }
  .score-form .btn { min-height: 44px; min-width: 44px; }
}

/* ── Winner banner ───────────────────────────────────────────── */

.winner-banner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: white;
  border-radius: 16px;
  padding: 1.5rem 2rem;
  box-shadow: 0 4px 24px rgba(249, 168, 37, 0.45);
}
.winner-trophy { font-size: 3rem; line-height: 1; }
.winner-label  { font-size: 0.85rem; opacity: 0.9; text-transform: uppercase; letter-spacing: 1.5px; }
.winner-names  { font-size: 1.7rem; font-weight: 800; }

/* ── Section header ──────────────────────────────────────────── */

.section-header h2 { font-size: 1.7rem; font-weight: 800; }

/* ── Tournament cards in list ────────────────────────────────── */

.tournament-card .card-body { transition: background 0.15s; }
.tournament-card .card-body:hover { background: var(--teal-light); }

/* ── Dashboard backoffice ────────────────────────────────────── */

.dashboard-hero { padding: 1rem 0 0.5rem; }

.dashboard-card {
  display: block;
  background: #fff;
  border: 1px solid rgba(14,155,138,0.18);
  border-radius: 16px;
  padding: 1.5rem 1.25rem;
  color: var(--text-main);
  transition: all 0.2s;
  height: 100%;
}
.dashboard-card:hover {
  box-shadow: 0 6px 24px rgba(14,155,138,0.18);
  transform: translateY(-3px);
  border-color: var(--teal);
  color: var(--teal-darker);
}
.dash-icon  { font-size: 2.5rem; line-height: 1; margin-bottom: 0.75rem; }
.dash-title { font-size: 1.1rem; font-weight: 800; margin-bottom: 0.35rem;
              font-family: 'Poppins', system-ui, sans-serif; letter-spacing: 0.5px; }
.dash-desc  { font-size: 0.83rem; color: #556; line-height: 1.4; }

/* ── Share box ───────────────────────────────────────────────── */

.share-box {
  background: var(--teal-light);
  border: 1px solid rgba(14,155,138,0.3);
  border-radius: 12px;
  padding: 0.9rem 1.1rem;
}

/* ── Display share footer ────────────────────────────────────── */

.display-share {
  border-top: 1px solid rgba(14,155,138,0.15);
  font-size: 0.8rem;
  color: #556;
}
.display-share input { font-size: 0.78rem; }

/* ── Display / Proiettore ────────────────────────────────────── */

.display-table {
  background: rgba(14,155,138,0.04);
  border-radius: 12px;
  overflow: hidden;
}
.display-table table        { color: var(--text-main); }
.display-table thead th     { background: var(--teal-light); color: var(--teal-dark);
                               border: none; font-family: 'Poppins', system-ui, sans-serif;
                               font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; }
.display-table tbody tr     { border-color: rgba(14,155,138,0.1); }
.display-table tbody tr:hover { background: var(--teal-light); }

.rank-display  { font-size: 1.4rem; }
.name-display  { font-size: 1.1rem; font-weight: 700;
                 font-family: 'Poppins', system-ui, sans-serif; letter-spacing: 0.3px; }
.score-display { font-size: 1.2rem; font-weight: 700; color: var(--teal-dark); }

.rank-highlight { background: var(--teal-light) !important; }

.match-display {
  background: #fff;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  border: 1px solid rgba(14,155,138,0.2);
  box-shadow: 0 2px 10px rgba(14,155,138,0.08);
}
.match-display-final {
  border-color: #d32f2f;
  background: #fff8f8;
}
.match-team  { font-size: 0.95rem; font-weight: 700; flex: 1;
               font-family: 'Poppins', system-ui, sans-serif; letter-spacing: 0.3px; }
.match-score { font-size: 2rem; font-weight: 800; padding: 0 1rem;
               text-align: center; white-space: nowrap; color: var(--teal-dark);
               font-family: 'Poppins', system-ui, sans-serif; }

/* ── Winner display ──────────────────────────────────────────── */

.winner-display {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  border-radius: 20px;
  padding: 2rem;
  animation: pulse-glow 2s infinite;
}
.winner-display-names {
  font-size: 2.5rem;
  font-weight: 900;
  color: white;
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 24px rgba(249,168,37,0.4); }
  50%       { box-shadow: 0 0 48px rgba(249,168,37,0.8); }
}

/* ── Player check rows (creation form) ──────────────────────── */

@media (max-width: 576px) {
  .player-check-row { padding: 0.6rem 0.25rem !important; }
  .player-check-row label { font-size: 0.95rem; }
}

/* ── Buttons ─────────────────────────────────────────────────── */

.btn-success,
.btn-primary {
  font-family: 'Poppins', system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: 0.5px;
  font-size: 1rem;
}

.btn-success {
  --bs-btn-bg:                 var(--teal);
  --bs-btn-border-color:       var(--teal);
  --bs-btn-hover-bg:           var(--teal-dark);
  --bs-btn-hover-border-color: var(--teal-dark);
  --bs-btn-active-bg:          var(--teal-darker);
}

/* ── Badges ──────────────────────────────────────────────────── */

.badge.bg-success { background-color: var(--teal) !important; }
.badge.bg-primary { background-color: var(--teal-dark) !important; }

/* ── Footer ──────────────────────────────────────────────────── */

.site-footer {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-top: 3px solid var(--teal);
}
.footer-overlay {
  padding: 1.5rem 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.footer-logo {
  height: 36px;
  object-fit: contain;
}
.footer-center {
  flex: 1 1 0;
  text-align: center;
}
.footer-appname {
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.4px;
}
.footer-tagline {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.7);
  font-style: italic;
}
.footer-copy {
  text-align: right;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.8);
  white-space: nowrap;
}
.footer-copy a {
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  display: block;
}
.footer-copy a:hover { color: #fff; text-decoration: underline; }

@media (max-width: 575px) {
  .footer-inner {
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
  }
  .footer-center,
  .footer-copy { text-align: center; }
  .footer-copy { white-space: normal; }
}

/* ── Landing page (header + series cards) ───────────────────── */

.landing-header {
  background: linear-gradient(135deg, var(--teal-dark) 0%, var(--teal-darker) 100%);
  padding: 1.1rem 1.5rem;
  border-bottom: 3px solid var(--teal);
}
.landing-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.5px;
  font-family: 'Poppins', system-ui, sans-serif;
}
.landing-admin-btn {
  opacity: 0.45;
  font-size: 1.1rem;
  padding: 0.3rem 0.6rem;
}
.landing-admin-btn:hover { opacity: 1; }

.series-card {
  border: none !important;
  border-left: 4px solid var(--teal) !important;
  transition: transform 0.15s, box-shadow 0.15s;
}
.series-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,98,106,0.15) !important;
}
.series-description {
  color: var(--text-main);
  opacity: 0.62;
  font-size: 0.88rem;
  line-height: 1.45;
}

/* ── Landing page (old hero — kept for reference) ────────────── */

.landing-hero {
  background-size: cover;
  background-position: center;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
@media (max-width: 575px) {
  .landing-hero {
    background-position: 80% center; /* mostra la pala su mobile */
  }
}
.landing-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 20, 25, 0.42);
}
.landing-hero-content {
  position: relative;
  text-align: center;
  color: #fff;
  padding: 2rem 1rem;
}
.landing-hero-content .hero-logo {
  height: 72px;
  object-fit: contain;
  margin-bottom: 0.75rem;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
}
.landing-hero-content .hero-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
  margin-bottom: 0.25rem;
}
.landing-hero-content .hero-sub {
  font-size: 1rem;
  opacity: 0.85;
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
.landing-mode-card {
  border: 2px solid var(--teal-light);
  border-radius: 16px;
  background: #fff;
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.15s;
}
.landing-mode-card:hover {
  box-shadow: 0 8px 32px rgba(14,155,138,0.18);
  border-color: var(--teal);
  transform: translateY(-2px);
}
.landing-mode-icon {
  font-size: 3rem;
  color: var(--teal);
  line-height: 1;
}
.landing-mode-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--teal-dark);
}

/* ── Card sovrapposta nell'hero (glassmorphism scuro) ────────── */

.landing-cards-row {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.landing-overlay-card {
  background: rgba(0, 20, 30, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(14, 155, 138, 0.45);
  border-radius: 18px;
  padding: 2rem 2.5rem;
  width: 100%;
  max-width: 360px;
  text-align: center;
  box-shadow: 0 0 32px rgba(14, 155, 138, 0.25);
}
.landing-overlay-card .landing-mode-icon {
  color: #4DD9C8;
}
.landing-overlay-card .landing-mode-title {
  color: #fff;
}
.landing-overlay-desc {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.5;
}
@media (max-width: 575px) {
  .landing-overlay-card { padding: 1.5rem 1.25rem; max-width: 100%; }
  .landing-hero-content { width: 100%; padding: 1.5rem 1rem; }
}
