/* ============================================================================
   Global theme variables
   ----------------------------------------------------------------------------
   These CSS custom properties define the site's overall visual language:
   - Colors (background, panels, text)
   - Border and shadow styles
   - Corner radii and layout sizing
   Keeping them centralized makes the design consistent and easy to tune.
   ============================================================================ */

:root{
  --bg: #0b1020;
  --panel: rgba(255,255,255,.06);
  --panel2: rgba(255,255,255,.09);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.68);
  --muted2: rgba(255,255,255,.52);
  --border: rgba(255,255,255,.12);
  --shadow: 0 16px 40px rgba(0,0,0,.35);
  --radius: 16px;
  --radius2: 22px;
  --maxw: 1100px;
  --gap: 14px;

  /* Accent colors used by UI elements such as ribbons and states. */
  --winner: #f2c14e;
  --ok: #4ade80;
  --bad: #fb7185;
}

/* ============================================================================
   Base reset / defaults
   ----------------------------------------------------------------------------
   - box-sizing: border-box prevents padding from expanding element widths.
   - full-height html/body helps with vertical layouts and sticky elements.
   - global background uses layered radial gradients for the "glow" feel.
   ============================================================================ */

*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  background:
    radial-gradient(1200px 600px at 20% 10%, rgba(99,102,241,.35), transparent 55%),
    radial-gradient(900px 500px at 80% 0%, rgba(34,197,94,.22), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", Arial;
  line-height: 1.45;
}

a{ color: inherit; text-decoration: none; }
img{ display:block; max-width:100%; }

/* ============================================================================
   Page container
   ----------------------------------------------------------------------------
   This controls the readable content width and padding on both sides.
   Using min() keeps it responsive:
   - On wide screens: capped by --maxw
   - On narrow screens: leaves 32px total side padding
   ============================================================================ */

.container{
  width: min(var(--maxw), calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 34px;
}

/* ============================================================================
   Top navigation bar
   ----------------------------------------------------------------------------
   Sticky topbar remains visible during scroll.
   backdrop-filter provides the frosted glass effect.
   ============================================================================ */

.topbar{
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
  background: rgba(10, 15, 30, .65);
  border-bottom: 1px solid var(--border);

  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 14px 16px;
}

.brand{
  display:flex;
  align-items:center;
  gap: 12px;
}

.brand__logo{
  width: 34px;
  height: 34px;
}

.brand__name{
  font-weight: 800;
  letter-spacing: .2px;
}
.brand__sub{
  font-size: 12px;
  color: var(--muted);
  margin-top: 1px;
}

.nav{
  display:flex;
  gap: 10px;
}
.nav__link{
  font-size: 14px;
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid transparent;
}
.nav__link:hover{
  color: var(--text);
  border-color: var(--border);
  background: var(--panel);
}

/* The main app wrapper ensures the page has a minimum visual height. */
.app{ min-height: 60vh; }

/* ============================================================================
   Hero section
   ----------------------------------------------------------------------------
   Used at the top of pages for title + description + toolbar.
   ============================================================================ */

.hero{
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.03));
  border-radius: var(--radius2);
  padding: 18px;
  box-shadow: var(--shadow);
}

.hero__title{
  font-size: 22px;
  font-weight: 800;
  margin: 0;
}
.hero__desc{
  margin: 10px 0 0;
  color: var(--muted);
  max-width: 70ch;
}

/* ============================================================================
   Generic grid helpers
   ----------------------------------------------------------------------------
   grid--years uses auto-fit to display responsive year cards.
   ============================================================================ */

.grid{
  display:grid;
  gap: var(--gap);
  margin-top: 14px;
}
.grid--years{
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

/* ============================================================================
   Cards (generic and year-card)
   ----------------------------------------------------------------------------
   Card is a reusable glass panel.
   YearCard is a special card layout for selecting a year.
   ============================================================================ */

.card{
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
}

.yearCard{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  transition: transform .12s ease, background .12s ease;
}
.yearCard:hover{
  transform: translateY(-2px);
  background: var(--panel2);
}
.yearCard__year{
  font-size: 20px;
  font-weight: 800;
}
.yearCard__meta{
  color: var(--muted2);
  font-size: 12px;
}

/* ============================================================================
   Toolbar / input / badges
   ----------------------------------------------------------------------------
   - Toolbar wraps to multiple lines on narrow screens.
   - Input uses flexible width with a minimum for usability.
   ============================================================================ */

.toolbar{
  display:flex;
  flex-wrap:wrap;
  gap: 10px;
  align-items:center;
  margin-top: 14px;
}

.input{
  flex: 1;
  min-width: 220px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.04);
  color: var(--text);
  padding: 10px 12px;
  outline: none;
}
.input::placeholder{ color: var(--muted2); }

.badge{
  display:inline-flex;
  align-items:center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.04);
}

/* ============================================================================
   Sections / classic grid view (older layout)
   ----------------------------------------------------------------------------
   These classes are still kept for the home/other pages if you use them.
   ============================================================================ */

.section{
  margin-top: 16px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.04);
  border-radius: var(--radius2);
  padding: 16px;
}
.section__head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap: 10px;
}
.section__title{
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}
.section__sub{
  color: var(--muted);
  font-size: 12px;
}

.gameGrid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.gameCard{
  position: relative;
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .12s ease, background .12s ease;
}
.gameCard:hover{
  transform: translateY(-2px);
  background: var(--panel2);
}
.gameCard__inner{
  display:flex;
  gap: 12px;
  padding: 12px;
}
.gameCard__img{
  width: 52px;
  height: 52px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  object-fit: cover;
}
.gameCard__name{
  font-weight: 750;
  margin: 0;
}
.gameCard__meta{
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

/* Ribbon for winner cards (legacy / optional usage). */
.ribbon{
  position:absolute;
  top: 10px;
  right: -42px;
  transform: rotate(35deg);
  padding: 6px 54px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .3px;
  color: #221b06;
  background: var(--winner);
  box-shadow: 0 10px 20px rgba(0,0,0,.25);
}

/* ============================================================================
   Buttons
   ----------------------------------------------------------------------------
   Used for external links (Steam/Post). Disabled buttons are non-clickable.
   ============================================================================ */

.btnRow{
  display:flex;
  gap: 8px;
  padding: 0 12px 12px;
}

.btn{
  flex: 1;
  text-align:center;
  font-size: 13px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.04);
  color: var(--text);
}
.btn:hover{
  background: rgba(255,255,255,.08);
}
.btn--primary{
  border-color: rgba(242,193,78,.35);
  background: rgba(242,193,78,.12);
}
.btn--disabled{
  opacity: .45;
  pointer-events: none;
}

/* Tighter button row variant for the featured panel. */
.btnRow--tight{
  margin-top: 12px;
  padding: 0;
}

/* ============================================================================
   Notice blocks (info / errors / empty states)
   ============================================================================ */

.notice{
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px dashed rgba(255,255,255,.18);
  color: var(--muted);
  background: rgba(255,255,255,.03);
}

/* ============================================================================
   Footer
   ============================================================================ */

.footer{
  border-top: 1px solid var(--border);
  background: rgba(10, 15, 30, .55);
}
.footer__inner{
  width: min(var(--maxw), calc(100% - 32px));
  margin: 0 auto;
  padding: 16px 0;
  display:flex;
  gap: 10px;
  align-items:center;
  color: var(--muted2);
  font-size: 12px;
}
.footer__dot{ opacity: .6; }

/* ============================================================================
   Year page layout: "Featured + Overview + Carousel"
   ----------------------------------------------------------------------------
   This is the structure based on your mock:
   - Featured: large media on the left, overview panel on the right
   - Carousel: horizontal scroll list of awards below
   ============================================================================ */

.yearLayout{
  margin-top: 16px;
  display: grid;
  gap: 14px;
}

/* ----------------------------------------------------------------------------
   Featured panel container
   - Uses CSS Grid with minmax() so it adapts gracefully.
   - On large screens: two columns
   - On smaller screens: collapses to one column
   ---------------------------------------------------------------------------- */

.featured{
  border: 1px solid var(--border);
  background: rgba(255,255,255,.04);
  border-radius: var(--radius2);
  padding: 16px;
  box-shadow: var(--shadow);

  display: grid;
  gap: 14px;

  grid-template-columns: minmax(420px, 1.7fr) minmax(280px, 1fr);
}

.featured__left{
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.05);
  border-radius: var(--radius2);
  padding: 14px;
  overflow: hidden;
}

.featured__awardName{
  font-size: 16px;
  font-weight: 850;
  letter-spacing: .2px;
  color: rgba(255,255,255,.92);
  margin-bottom: 10px;
}

/* ----------------------------------------------------------------------------
   Responsive media area
   ---------------------------------------------------------------------------- */

.featured__media{
  position: relative;
  border-radius: var(--radius2);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);

  aspect-ratio: 21 / 9;
  min-height: clamp(180px, 26vw, 340px);
}

.featured__img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: none;
  filter: saturate(1.05);
}

.featured__winnerBlock{
  position: absolute;
  left: 12px;
  bottom: 12px;
  right: 12px;
  padding: clamp(10px, 1.2vw, 14px);
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(10, 15, 30, .45);
  backdrop-filter: blur(10px);
}

.featured__label{
  font-size: 12px;
  color: var(--muted);
}

.featured__winnerName{
  margin-top: 3px;
  font-size: clamp(16px, 1.6vw, 20px);
  font-weight: 850;
}

/* ----------------------------------------------------------------------------
   Overview panel (right side)
   ---------------------------------------------------------------------------- */

.featured__right{
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.05);
  border-radius: var(--radius2);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.featured__rightTitle{
  font-size: 14px;
  font-weight: 850;
  color: rgba(255,255,255,.9);
}

.featured__rightText{
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  border-radius: 14px;
  border: 1px dashed rgba(255,255,255,.16);
  background: rgba(255,255,255,.03);
  padding: 12px;
  min-height: 220px;
}

.featured__hint{
  font-size: 12px;
  color: var(--muted2);
  padding-top: 2px;
}

/* ----------------------------------------------------------------------------
   Carousel container
   ---------------------------------------------------------------------------- */

.carousel{
  border: 1px solid var(--border);
  background: rgba(255,255,255,.03);
  border-radius: var(--radius2);
  padding: 14px;
}

.carousel__title{
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .25px;
}

/* ============================================================================
   Carousel track: fixed 4 items per view with draggable scrollbar
   ----------------------------------------------------------------------------
   IMPORTANT:
   - Do NOT set "scroll-behavior: smooth" here.
   - Smooth scrolling should be controlled by JS with a "smart" strategy
     (near distance smooth, far distance jump) to avoid long animations.
   ============================================================================ */

.carousel__track{
  margin-top: 12px;

  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 3 * 12px) / 4);
  gap: 12px;

  overflow-x: auto;
  overflow-y: hidden;

  padding-bottom: 14px;
  -webkit-overflow-scrolling: touch;
}

/* ============================================================================
   Custom scrollbar: visible, draggable, slider-like
   ============================================================================ */

.carousel__track::-webkit-scrollbar{
  height: 14px;
}
.carousel__track::-webkit-scrollbar-track{
  background: rgba(255,255,255,.06);
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.08);
}
.carousel__track::-webkit-scrollbar-thumb{
  background: linear-gradient(180deg, rgba(242,193,78,.9), rgba(242,193,78,.6));
  border-radius: 999px;
  border: 3px solid rgba(0,0,0,.25);
}
.carousel__track::-webkit-scrollbar-thumb:hover{
  background: linear-gradient(180deg, rgba(242,193,78,1), rgba(242,193,78,.75));
}

/* ============================================================================
   Award tile (each award item in the carousel)
   ============================================================================ */

.awardChip{
  min-width: 100%;
  height: 100%;

  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  color: var(--text);
  border-radius: 16px;
  padding: 12px;

  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 10px;
  align-items: center;

  cursor: pointer;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}
.awardChip:hover{
  transform: translateY(-2px);
  background: rgba(255,255,255,.08);
}
.awardChip.is-active{
  border-color: rgba(242,193,78,.45);
  box-shadow: 0 14px 30px rgba(0,0,0,.28);
  background: rgba(242,193,78,.07);
}

.awardChip__imgWrap{
  width: 54px;
  height: 54px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.04);
}
.awardChip__img{
  width: 54px;
  height: 54px;
  object-fit: cover;
}

.awardChip__text{ text-align: left; }
.awardChip__award{
  font-weight: 850;
  font-size: 13px;
  line-height: 1.2;
}
.awardChip__winner{
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.25;
}

/* ============================================================================
   Responsive layout rules for carousel
   ============================================================================ */

@media (max-width: 1024px){
  .carousel__track{
    grid-auto-columns: calc((100% - 2 * 12px) / 3);
  }
}

@media (max-width: 640px){
  .carousel__track{
    grid-auto-columns: calc((100% - 1 * 12px) / 2);
  }
}

/* ----------------------------------------------------------------------------
   Featured responsive breakpoint
   ---------------------------------------------------------------------------- */

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

  .featured__media{
    aspect-ratio: 16 / 9;
    min-height: clamp(200px, 45vw, 360px);
  }
}
