


html{
  scroll-behavior:smooth;
}

body{
  margin:0;
  font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
  background:
    radial-gradient(circle at top left, rgba(37,99,235,.06), transparent 28%),
    radial-gradient(circle at top right, rgba(37,99,235,.04), transparent 25%),
    var(--bg);
  color:var(--text);
  transition:background .25s ease,color .25s ease;
}

img{
  max-width:100%;
  display:block;
}

button,
input,
select,
textarea{
  font:inherit;
}

a{
  color:var(--primary);
  text-decoration:none;
}

a:hover{
  color:var(--primary-hover);
}

/* PAGE */
.team-page{
 max-width:900px;margin:auto;
}

.team-page-topbar{
  display:flex;
  justify-content:flex-end;
  margin-bottom:16px;
}

/* THEME TOGGLE */
.theme-toggle-btn{
  border:1px solid var(--border);
  background:var(--surface);
  color:var(--text);
  padding:10px 14px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  gap:10px;
  cursor:pointer;
  box-shadow:var(--shadow-soft);
  transition:all .2s ease;
}

.theme-toggle-btn:hover{
  transform:translateY(-1px);
  background:var(--surface-2);
  border-color:var(--border-strong);
}

.loading-state {
 padding:30px 18px;
      text-align:center;
      color:var(--text-muted);
      background:var(--surface);
      border:1px dashed var(--border-strong);
      border-radius:var(--card-radius);
}

/* Spinner */
.loading-state::after {
  content: "";
  display: block;
  width: 32px;
  height: 32px;
  margin: 12px auto 0;
  border-radius: 50%;
   border:3px solid var(--border);
      border-top-color:var(--primary);
  animation: spin 0.8s linear infinite;
}

/* Animation */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}





/* HERO / CARDS */
.team-hero-section{
  margin-bottom:18px;
}

.sn-card,
.team-hero-card{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--card-radius);
  box-shadow:var(--shadow-soft);
  padding:18px;
  margin-bottom:20px;
  
}

.team-hero-card{
  padding:22px;
  position:relative;
  overflow:hidden;
}

.team-hero-card::before{
   content:"";
      position:absolute;
      inset:0;
      background:radial-gradient(circle at top left,var(--primary-soft),transparent 40%),linear-gradient(180deg,transparent,rgba(0,0,0,.02));
      pointer-events:none;
}

.team-hero-main{
  display:flex;
  align-items:center;
  gap:20px;
  position:relative;
  z-index:1;
}

.team-logo-wrap{
  width:100%;
  height:100px;
  min-width:100px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(180deg, var(--surface-2), var(--surface-3));
  border:1px solid var(--border);
  border-radius:18px;
  box-shadow:var(--shadow-soft);
}
  .image-name{width:100%; padding:10px; display:flex;}
  .found-info{width:100%; height:40px; display:flex;}
.team-logo{
  width:74px;
  height:74px;
  object-fit:contain;
}

.team-hero-copy{
  flex:1;
  min-width:0;
  
}

.team-title{
  margin-left:4px;
  font-size:clamp(1.6rem, 2.2vw, 2.4rem);
  line-height:1.1;
  letter-spacing:-.02em;
  color:var(--text);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}

.team-meta-row{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-bottom:14px;
}

.sn-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:8px ;
  border-radius:999px;
  
  color:var(--text-muted);
  font-size:.9rem;
  font-weight:700;
  border:1px solid transparent;
}

/* FORM STRIP */
.team-form-wrap{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:16px;
  flex-wrap:wrap;
}

.team-form-label{
  font-size:.86rem;
  font-weight:800;
  color:var(--text-muted);
  text-transform:uppercase;
  letter-spacing:.06em;
}

.form-strip{
  display:flex;
  gap:6px;
  align-items:center;
}

.form-pill{
  width:32px;
  height:32px;
  border-radius:8px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:800;
  font-size:.8rem;
  color:#fff;
  box-shadow:var(--shadow-soft);
}

.form-pill.win{
  background:var(--success);
}

.form-pill.draw{
  background:var(--warning);
}

.form-pill.loss{
  background:var(--danger);
}

/* HERO STATS */
.team-stat-strip{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:12px;
}

.stat-pill{
  background:linear-gradient(180deg, var(--surface-2), var(--surface));
  border:1px solid var(--border);
  border-radius:14px;
  padding:14px;
  min-height:78px;
  display:flex;
  flex-direction:column;
  justify-content:center;
}

.stat-pill-label{
  display:block;
  color:var(--text-muted);
  font-size:.84rem;
  margin-bottom:6px;
}

.stat-pill strong{
  font-size:1.1rem;
  color:var(--text);
}

/* TABS */
.team-tabs-wrap{
  margin-bottom:18px;
}

.team-tabs{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  padding:8px;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:16px;
  box-shadow:var(--shadow-soft);
}

.team-tab{
  appearance:none;
  border:none;
  background:var(--tab-bg);
  color:var(--text-soft);
  padding:11px 16px;
  border-radius:var(--btn-radius);
  cursor:pointer;
  font-weight:700;
  transition:all .2s ease;
 
  text-align:center;
  padding:10px 12px;
  font-size:.92rem;
}

.team-tab:hover{
  background:var(--tab-hover);
  color:var(--text);
  transform:translateY(-1px);
}

.team-tab.active{
  background:var(--tab-active);
  color:var(--tab-active-text);
  box-shadow:0 8px 20px rgba(37,99,235,.18);
}

/* PANELS */
.team-content{
  min-height:320px;
}

.tab-panel{
  padding:5px;  
  display:none;
}

.tab-panel.active{
  display:block;
  animation:fadeIn .2s ease;
  background:var(--surface);
      border:1px solid var(--border);
      box-shadow:var(--shadow);
      border-radius:var(--card-radius);
}

@keyframes fadeIn{
  from{opacity:0; transform:translateY(4px);}
  to{opacity:1; transform:translateY(0);}
}

/* GRID */
.team-grid{
  display:grid;
  gap:16px;
  grid-template-columns:repeat(2, minmax(0, 1fr));
}

.team-grid.two-cols{
  grid-template-columns:repeat(2, minmax(0, 1fr));
}

/* OVERVIEW */
.info-list{
  display:grid;
  gap:12px;
}

.info-list div{
  padding:12px 14px;
  border-radius:12px;
  background:var(--surface-2);
  border:1px solid var(--border);
  color:var(--text-soft);
}

.summary-metrics{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:12px;
}

.summary-box{
  background:var(--surface-2);
  border:1px solid var(--border);
  border-radius:12px;
  padding:14px;
  min-height:88px;
  display:flex;
  flex-direction:column;
  justify-content:center;
}

.summary-box span{
  display:block;
  color:var(--text-muted);
  font-size:.84rem;
  margin-bottom:6px;
}

.summary-box strong{
  color:var(--text);
  font-size:1.2rem;
}

/* SQUAD */
.squad-group{
  margin-bottom:16px;
}

.player-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(240px, 1fr));
  gap:12px;
}

.player-card{
  display:flex;
  align-items:center;
  gap:12px;
  padding:12px;
  border:1px solid var(--border);
  background:linear-gradient(180deg, var(--surface-2), var(--surface));
  border-radius:14px;
  transition:transform .2s ease,border-color .2s ease,box-shadow .2s ease;
}

.player-card:hover{
  transform:translateY(-2px);
  border-color:var(--border-strong);
  box-shadow:var(--shadow-soft);
}

.player-card img{
  width:52px;
  height:52px;
  object-fit:cover;
  border-radius:14px;
  flex-shrink:0;
  background:var(--surface-3);
}

.player-card-copy{
  min-width:0;
}

.player-card-copy h4{
  margin:0 0 4px;
  color:var(--text);
  font-size:1rem;
}

.player-card-copy p{
  margin:0 0 3px;
  color:var(--text-soft);
  font-size:.9rem;
}

/* MATCHES */
.match-list{
  display:grid;
  gap:12px;
}

.match-row{
  padding:14px;
  border:1px solid var(--border);
  background:linear-gradient(180deg, var(--surface-2), var(--surface));
  border-radius:14px;
  transition:border-color .2s ease, transform .2s ease;
}

.match-row:hover{
  transform:translateY(-2px);
  border-color:var(--border-strong);
}

.match-row.win{
  border-left:4px solid var(--win);
}

.match-row.draw{
  border-left:4px solid var(--draw);
}

.match-row.loss{
  border-left:4px solid var(--loss);
}

.match-top,
.match-bottom{
  display:flex;
  justify-content:space-between;
  gap:12px;
  color:var(--text-muted);
  font-size:.86rem;
}

.match-date{
  margin:8px 0 12px;
  color:var(--text-soft);
  font-size:.92rem;
}

.match-main{
  display:grid;
  grid-template-columns:1fr auto 1fr;
  gap:10px;
  align-items:center;
  margin-bottom:12px;
}

.team-side{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}

.team-side-right{
  justify-content:flex-end;
  text-align:right;
}

.team-side img{
  width:36px;
  height:36px;
  object-fit:contain;
  flex-shrink:0;
}

.team-side span{
  font-weight:700;
  color:var(--text);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.match-center{
  min-width:80px;
  text-align:center;
}

.match-center strong{
  color:var(--text);
  font-size:1.02rem;
}

/* STATUS BADGES */
.status-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:6px 10px;
  border-radius:999px;
  font-size:.78rem;
  font-weight:700;
  letter-spacing:.02em;
}

.status-win{
  background:var(--win-soft);
  color:var(--win);
}

.status-draw{
  background:var(--draw-soft);
  color:var(--draw);
}

.status-loss{
  background:var(--loss-soft);
  color:var(--loss);
}

/* TRANSFERS */
.transfer-list{
  display:grid;
  gap:12px;
  
}

.transfer-row{
  font-size:14px;
  display:flex;
  align-items:center;
  gap:12px;
  padding:8px;
  border:1px solid var(--border);
  background:linear-gradient(180deg, var(--surface-2), var(--surface));
  border-radius:14px;
}

.transfer-avatar{
  width:50px;
  height:50px;
  min-width:50px;
  border-radius:14px;
  background:var(--primary-soft);
  color:var(--primary);
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:800;
  font-size:1.05rem;
}

.transfer-copy{
  min-width:0;
}

.transfer-copy h4{
  margin:0 0 4px;
  color:var(--text);
  font-size:1rem;
}

.transfer-copy p{
  margin:0 0 4px;
  color:var(--text-soft);
  font-size:.92rem;
}

.transfer-copy small{
  color:var(--text-muted);
  display:block;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}




/* INJURIES */
.injury-list{
  display:grid;
  gap:12px;
}

.injury-row{
  display:flex;
  align-items:center;
  gap:12px;
  padding:12px;
  border:1px solid var(--border);
  background:linear-gradient(180deg, var(--surface-2), var(--surface));
  border-radius:14px;
}

.injury-row img{
  width:50px;
  height:50px;
  object-fit:cover;
  border-radius:14px;
  flex-shrink:0;
  background:var(--surface-3);
}

.injury-copy h4{
  margin:0 0 4px;
  color:var(--text);
}

.injury-copy p{
  margin:0 0 4px;
  color:var(--warning);
  font-weight:700;
}

.injury-copy small{
  color:var(--text-muted);
}

/* TROPHIES */
.trophy-list{
  display:grid;
  gap:12px;
}

.trophy-row{
  display:flex;
  align-items:flex-start;
  gap:12px;
  padding:14px;
  border:1px solid var(--border);
  background:linear-gradient(180deg, var(--surface-2), var(--surface));
  border-radius:14px;
}

.trophy-row::before{
  content:"🏆";
  width:42px;
  height:42px;
  min-width:42px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:12px;
  background:rgba(245,158,11,.12);
  font-size:1.1rem;
}

.trophy-copy h4{
  margin:0 0 4px;
  color:var(--text);
}

.trophy-copy p{
  margin:0 0 4px;
  color:var(--text-soft);
}

.trophy-copy small{
  color:var(--text-muted);
}

/* FORM ELEMENTS */
.team-form,
.sn-form{
  display:grid;
  gap:16px;
}

.form-row{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:14px;
}

.form-row-3{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:14px;
}

.form-group{
  display:grid;
  gap:8px;
}

.form-label{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:.92rem;
  font-weight:700;
  color:var(--text-soft);
}

.form-help{
  font-size:.84rem;
  color:var(--text-muted);
}

.form-error{
  font-size:.84rem;
  color:var(--danger);
}

.input-wrap,
.select-wrap,
.textarea-wrap{
  position:relative;
}

.form-control,
.form-select,
.form-textarea,
.team-page input[type="text"],
.team-page input[type="email"],
.team-page input[type="url"],
.team-page input[type="number"],
.team-page input[type="search"],
.team-page input[type="date"],
.team-page input[type="password"],
.team-page select,
.team-page textarea{
  width:100%;
  min-height:46px;
  border:1px solid var(--border);
  border-radius:12px;
  background:linear-gradient(180deg, var(--surface), var(--surface-2));
  color:var(--text);
  padding:12px 14px;
  outline:none;
  transition:border-color .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}

.form-textarea,
.team-page textarea{
  min-height:120px;
  resize:vertical;
  line-height:1.5;
}

.form-control::placeholder,
.form-textarea::placeholder,
.team-page input::placeholder,
.team-page textarea::placeholder{
  color:var(--text-muted);
}

.form-control:hover,
.form-select:hover,
.form-textarea:hover,
.team-page input:hover,
.team-page select:hover,
.team-page textarea:hover{
  border-color:var(--border-strong);
}

.form-control:focus,
.form-select:focus,
.form-textarea:focus,
.team-page input:focus,
.team-page select:focus,
.team-page textarea:focus{
  border-color:var(--primary);
  box-shadow:0 0 0 4px var(--primary-soft);
  background:var(--surface);
}

.team-page select,
.form-select{
  appearance:none;
  -webkit-appearance:none;
  -moz-appearance:none;
  padding-right:42px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--text-muted) 50%),
    linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 3px),
    calc(100% - 12px) calc(50% - 3px);
  background-size:6px 6px, 6px 6px;
  background-repeat:no-repeat;
}

.team-page input[type="checkbox"],
.team-page input[type="radio"]{
  accent-color:var(--primary);
}

.checkbox-group,
.radio-group{
  display:grid;
  gap:10px;
}

.checkbox-item,
.radio-item{
  display:flex;
  align-items:flex-start;
  gap:10px;
  color:var(--text-soft);
  font-size:.94rem;
}

.checkbox-item input,
.radio-item input{
  margin-top:3px;
  flex-shrink:0;
}

.form-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
}

.btn,
.form-btn,
.team-page button[type="submit"],
.team-page button[type="button"],
.team-page button[type="reset"]{
  appearance:none;
  border:none;
  border-radius:var(--btn-radius);
  padding:12px 16px;
  min-height:44px;
  font-weight:700;
  cursor:pointer;
  transition:transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease, opacity .2s ease;
}

.btn:hover,
.form-btn:hover,
.team-page button[type="submit"]:hover,
.team-page button[type="button"]:hover,
.team-page button[type="reset"]:hover{
  transform:translateY(-1px);
}

.btn:disabled,
.form-btn:disabled,
.team-page button:disabled{
  opacity:.65;
  cursor:not-allowed;
  transform:none;
}

.btn-primary{
  background:var(--primary);
  color:#fff;
  box-shadow:0 10px 22px rgba(37,99,235,.18);
}

.btn-primary:hover{
  background:var(--primary-hover);
}

.btn-secondary{
  background:var(--tab-bg);
  color:var(--text);
  border:1px solid var(--border);
}

.btn-secondary:hover{
  background:var(--tab-hover);
}

.btn-danger{
  background:var(--danger);
  color:#fff;
}

.btn-success{
  background:var(--success);
  color:#fff;
}

.input-inline{
  display:flex;
  gap:10px;
  align-items:center;
}

.input-inline .form-control{
  flex:1;
}

.search-bar{
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px;
  border:1px solid var(--border);
  background:var(--surface);
  border-radius:14px;
  box-shadow:var(--shadow-soft);
}

.search-bar .form-control{
  border:none;
  background:transparent;
  min-height:42px;
  padding:0;
}

.search-bar .form-control:focus{
  box-shadow:none;
}

.search-bar .search-btn{
  min-width:44px;
  min-height:44px;
  border-radius:12px;
  background:var(--primary);
  color:#fff;
}

.filter-bar{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  padding:12px;
  border:1px solid var(--border);
  background:var(--surface);
  border-radius:14px;
  box-shadow:var(--shadow-soft);
}

.filter-bar .form-group{
  min-width:180px;
  flex:1 1 180px;
}

.field-with-icon{
  position:relative;
}

.field-with-icon .field-icon{
  position:absolute;
  left:12px;
  top:50%;
  transform:translateY(-50%);
  color:var(--text-muted);
  pointer-events:none;
}

.field-with-icon .form-control,
.field-with-icon .form-select{
  padding-left:40px;
}

.field-status{
  font-size:.84rem;
  color:var(--text-muted);
}

.field-status.success{
  color:var(--success);
}

.field-status.error{
  color:var(--danger);
}

.form-divider{
  height:1px;
  background:var(--border);
  margin:4px 0;
}

.form-card{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--card-radius);
  box-shadow:var(--shadow-soft);
  padding:18px;
}

.form-section-title{
  margin:0 0 14px;
  font-size:1rem;
  font-weight:800;
  color:var(--text);
}

/* STATES */
.empty-state{
  color:var(--text-muted);
  text-align:center;
  padding:28px 16px;
}

.error-state{
  color:var(--danger);
  border-color:rgba(220,38,38,.28);
  background:linear-gradient(180deg, rgba(220,38,38,.04), var(--surface));
}

.muted{
  color:var(--text-muted);
}

/* TABLET */
@media (max-width: 992px){
  .team-grid,
  .team-grid.two-cols{
    grid-template-columns:1fr;
  }

  .team-stat-strip{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }

  .player-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
}

/* MOBILE */
@media (max-width: 768px){
   .team-tabs{
    display:flex;
    flex-wrap:nowrap;
    overflow-x:auto;
    overflow-y:hidden;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
    gap:8px;
    padding:8px;
  }

  .team-tabs::-webkit-scrollbar{
    display:none;
  }

  .team-tab{
    flex:0 0 auto;
    white-space:nowrap;
    text-align:center;
    padding:10px 14px;
    font-size:.92rem;
  } 
    
  .team-page{
    width:min(100% - 20px, 1200px);
    padding:16px 0 28px;
  }

  .team-page-topbar{
    margin-bottom:12px;
  }

  .theme-toggle-btn{
    width:100%;
    justify-content:center;
  }

  .team-hero-card{
    padding:16px;
  }

  .team-hero-main{
    flex-direction:column;
    align-items:flex-start;
    gap:14px;
  }

  .team-logo-wrap{
    width:86px;
    height:86px;
    min-width:86px;
  }

  .team-logo{
    width:62px;
    height:62px;
  }

  .team-meta-row{
    gap:8px;
  }

  .sn-badge{
    font-size:.82rem;
    padding:7px 10px;
  }

  .team-stat-strip{
    grid-template-columns:1fr 1fr;
    gap:10px;
  }

  .team-tabs{
    gap:8px;
    padding:8px;
  }

  .team-tab{
    flex:1 1 calc(50% - 8px);
    text-align:center;
    padding:10px 12px;
    font-size:.92rem;
  }

  .summary-metrics{
    grid-template-columns:1fr 1fr;
  }

  .player-grid{
    grid-template-columns:1fr;
  }

  .match-main{
    grid-template-columns:1fr;
    gap:12px;
  }

  .team-side,
  .team-side-right{
    justify-content:flex-start;
    text-align:left;
  }

  .match-center{
    text-align:left;
    min-width:0;
  }

  .match-top,
  .match-bottom{
    flex-direction:column;
    align-items:flex-start;
    gap:5px;
  }

  .transfer-row,
  .injury-row,
  .player-card,
  .trophy-row{
    align-items:flex-start;
  }

  .transfer-copy small{
    white-space:normal;
    overflow:visible;
    text-overflow:unset;
  }

  .form-row,
  .form-row-3{
    grid-template-columns:1fr;
  }

  .form-actions{
    flex-direction:column;
    align-items:stretch;
  }

  .form-actions .btn,
  .form-actions .form-btn,
  .form-actions button{
    width:100%;
  }

  .input-inline{
    flex-direction:column;
    align-items:stretch;
  }

  .search-bar{
    flex-wrap:wrap;
  }

  .search-bar .search-btn{
    width:100%;
  }
}

/* SMALL MOBILE */
@media (max-width: 480px){
  .team-tab{
    flex:1 1 100%;
  }  
    
  .team-page{
    width:min(100% - 14px, 1200px);
  }

  .team-tab{
    flex:1 1 100%;
  }

  .team-stat-strip{
    grid-template-columns:1fr;
  }

  .summary-metrics{
    grid-template-columns:1fr;
  }

  .player-card img,
  .injury-row img,
  .transfer-avatar{
    width:46px;
    height:46px;
    min-width:46px;
  }

  .team-title{
    font-size:1.45rem;
  }

  .team-form-wrap{
    align-items:flex-start;
    flex-direction:column;
  }
}