/* styles.css — GLOBAL FOUNDATION (cleaned + optimized watermark) */

/* =========================
   GLOBAL VARIABLES
   ========================= */
:root{
  --bg:#0b1220;
  --panel:#0f1b33;
  --panel2:#0c162b;
  --text:#e8eefc;
  --muted:#a9b7d6;
  --brand:#47d7ac;
  --brand2:#5aa7ff;
  --danger:#ff5a7a;
  --warn:#ffcf5a;
  --ok:#49e28b;

  --majorBorder: rgba(255,207,90,.55);
  --majorText: #ffe6ad;
  --majorBg: rgba(255,207,90,.10);

  --border:rgba(255,255,255,.10);
  --shadow: 0 12px 40px rgba(0,0,0,.35);
  --radius: 18px;
}

/* =========================
   BASE RESET / TYPOGRAPHY
   ========================= */
*{ box-sizing:border-box; }
a{ color:inherit; text-decoration:none; }

/* =========================
   BASE PAGE BACKGROUND
   (gradient + fixed watermark + readability veil)
   ========================= */
body{
  position: relative;
  margin:0;
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Helvetica,
    Arial,
    "Apple Color Emoji",
    "Segoe UI Emoji";

  /* Main background gradient (your original look) */
  background:
    radial-gradient(1200px 600px at 20% 0%, rgba(90,167,255,.22), transparent 55%),
    radial-gradient(900px 500px at 80% 10%, rgba(71,215,172,.18), transparent 55%),
    linear-gradient(180deg, var(--bg), #060b15);

  color: var(--text);
}

/* =========================
   FIXED WATERMARK (header-banner.jpg)
   ========================= */
body::before{
  content:"";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;

  background:
    radial-gradient(1200px 600px at 20% 0%, rgba(90,167,255,.22), transparent 55%),
    radial-gradient(900px 500px at 80% 10%, rgba(71,215,172,.18), transparent 55%),
    linear-gradient(180deg, #0b1220, #060b15),
    url("./assets/header-banner.jpg");

  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat;

  background-size:
    100% 100%,
    100% 100%,
    100% 100%,
    min(1100px, 78vw) auto;

  background-position:
    center center,
    center center,
    center center,
    center center;

  opacity: .25;
}

@media (min-width: 768px){
  body::before{
    background-position: 50% 30%;
    background-size: clamp(520px, 60vw, 980px) auto;
    opacity: 0.25;
  }
}

@media (min-width: 1600px){
  body::before{
    background-position: 50% 34%;
    background-size: 980px auto;
    opacity: 0.25;
  }
}

/* =========================
   READABILITY VEIL
   ========================= */
body::after{
  content:"";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;

  background:
    radial-gradient(900px 380px at 25% 20%, rgba(90,167,255,.10), transparent 62%),
    radial-gradient(800px 320px at 80% 10%, rgba(71,215,172,.09), transparent 62%),
    linear-gradient(180deg, rgba(0,0,0,.55), rgba(0,0,0,.22));
}

/* =========================
   GLOBAL STRUCTURE
   ========================= */
.wrap{
  position: relative;
  z-index: 1;
  max-width:1100px;
  margin:0 auto;
  padding:28px 18px 60px;
}

.pageTitle{
  font-size:22px;
  font-weight:900;
  letter-spacing:.2px;
}
.pageSub{
  color:var(--muted);
  font-size:13px;
  margin-top:6px;
}

.sectionRule{
  border-top:1px solid var(--border);
  padding-top:12px;
  margin-top:12px;
}

/* =========================
   HEADER BANNER
   ========================= */
.headerCard{ overflow:hidden; margin-bottom:16px; }
.headerBanner{
  position:relative;
  width:100%;
  height:220px;
  background-color: rgba(0,0,0,.18);
  background-image: url("./assets/header-banner.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.headerBannerOverlay{
  position:absolute;
  inset:0;
  background:
    radial-gradient(900px 380px at 30% 35%, rgba(255,255,255,.08), transparent 60%),
    linear-gradient(180deg, rgba(0,0,0,.22), rgba(0,0,0,.10));
}
.headerBannerText{
  position:absolute;
  inset:0;
  display:flex;
  align-items:flex-end;
  justify-content:center;
  padding:14px 16px;
}
.headerSubtitle{
  font-size:13px;
  color: rgba(233,241,255,.80);
  text-shadow: 0 2px 10px rgba(0,0,0,.6);
  background: rgba(0,0,0,.22);
  border: 1px solid rgba(255,255,255,.12);
  padding:6px 12px;
  border-radius:999px;
}
@media (max-width: 560px){
  .headerBanner{ height:190px; }
}

/* =========================
   PILLS / BADGES / BUTTONS
   ========================= */
.pillrow{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; justify-content:flex-start; }
.pill{
  border:1px solid var(--border);
  background: rgba(255,255,255,.06);
  padding:8px 10px; border-radius:999px;
  font-size:12px; color:var(--muted);
  display:flex; gap:8px; align-items:center;
}
.dot{ width:8px; height:8px; border-radius:50%; background:var(--warn); }
.dot.ok{ background:var(--ok); }
.dot.bad{ background:var(--danger); }

.badge{
  display:inline-flex; align-items:center; gap:8px;
  padding:6px 10px; border-radius:999px;
  background: rgba(71,215,172,.12);
  border:1px solid rgba(71,215,172,.28);
  color:#c9fff0;
  font-weight:700; font-size:12px;
}
.badge.gray{
  background: rgba(255,255,255,.06);
  border:1px solid var(--border);
  color: var(--muted);
  font-weight:700;
}
.badge.red{
  background: rgba(255,90,122,.12);
  border:1px solid rgba(255,90,122,.28);
  color:#ffc9d4;
}.btn{
  appearance:none; border:none; cursor:pointer;
  background: linear-gradient(135deg, var(--brand2), var(--brand));
  color:#04101e; font-weight:800;
  padding:10px 12px; border-radius:12px;
  box-shadow: 0 10px 24px rgba(0,0,0,.28);
  transition: transform .08s ease;
  font-size:13px;
}
.btn:active{ transform: translateY(1px); }
.btn.secondary{
  background: rgba(255,255,255,.08);
  color:var(--text);
  border:1px solid var(--border);
  box-shadow:none;
  font-weight:700;
}
.btn.danger{
  background: rgba(255,90,122,.16);
  border:1px solid rgba(255,90,122,.35);
  color:#ffd5dd;
  box-shadow:none;
}

.row{ display:flex; gap:10px; flex-wrap:wrap; align-items:center; }

/* =========================
   LAYOUT / CARDS / TABLES / FORMS
   ========================= */
.grid{
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap:16px;
}
@media (max-width: 980px){
  .grid{ grid-template-columns:1fr; }
}

.card{
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border:1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.card .hd{
  padding:14px 16px;
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  background: rgba(0,0,0,.14);
  border-bottom:1px solid var(--border);
}
.card .hd h2{
  margin:0; font-size:14px; letter-spacing:.3px; text-transform:uppercase; color:var(--muted);
}
.card .bd{ padding:16px; }

.field{
  display:flex; flex-direction:column; gap:6px;
  min-width: 180px;
  flex: 1;
}
label{ font-size:12px; color:var(--muted); }
input, select{
  width:100%;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--border);
  background: rgba(0,0,0,.25);
  color:var(--text);
  outline:none;
}
input::placeholder{ color: rgba(233,241,255,.35); }

.split{ display:grid; grid-template-columns: 1fr 1fr; gap:10px; }
@media(max-width:560px){ .split{ grid-template-columns:1fr; } }

table{
  width:100%;
  border-collapse:collapse;
  overflow:hidden;
  border-radius: 14px;
  border:1px solid var(--border);
  background: rgba(0,0,0,.18);
}
th, td{
  padding:10px 10px;
  border-bottom:1px solid rgba(255,255,255,.07);
  text-align:left;
  font-size:13px;
}
th{
  color:var(--muted);
  font-weight:700;
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.3px;
}
tr:last-child td{ border-bottom:none; }
.rank{ font-weight:900; color:#d9e6ff; width:56px; }
.mono{ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }

/* =========================
   MESSAGES / FOOTER
   ========================= */
.msg{
  margin-top:10px;
  border:1px solid var(--border);
  background: rgba(0,0,0,.22);
  padding:10px 12px;
  border-radius:12px;
  color:var(--muted);
  font-size:13px;
  white-space: pre-wrap;
}
.msg.ok{ border-color: rgba(73,226,139,.3); color:#c9ffde; }
.msg.bad{ border-color: rgba(255,90,122,.35); color:#ffd0da; }

.footer{
  margin-top:16px;
  color:rgba(233,241,255,.45);
  font-size:12px;
  text-align:center;
}

/* =========================
   NAV TABS
   ========================= */
.navTab{
  padding:8px 14px;
  border-radius:999px;
  border:1px solid var(--border);
  text-decoration:none;
  font-size:13px;
  color:var(--muted);
  font-weight:700;
  transition:.15s;
}
.navTab:hover{
  border-color:rgba(90,167,255,.45);
  color:#cfe3ff;
}
.navTabActive{
  border-color:rgba(71,215,172,.45);
  color:#c9fff0;
  background:rgba(71,215,172,.10);
}

/* =========================
   WEEK HERO
   ========================= */
.weekHero{
  position: relative;
  min-height: 150px;
  padding: 16px;
  border-top: 1px solid var(--border);
  background: rgba(0,0,0,.16);
  overflow: hidden;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: right center;
}
.weekHeroOverlay{
  position:absolute;
  inset:0;
  background:
    linear-gradient(90deg, rgba(5,10,20,.92) 0%, rgba(5,10,20,.78) 44%, rgba(5,10,20,.35) 100%),
    radial-gradient(900px 320px at 20% 10%, rgba(90,167,255,.18), transparent 60%),
    radial-gradient(800px 280px at 80% 0%, rgba(71,215,172,.14), transparent 60%);
}
.weekHeroContent{
  position: relative;
  z-index: 1;
  display:flex;
  align-items:center;
  gap: 14px;
  flex-wrap: wrap;
}
.weekHeroLogo{
  width: 88px;
  height: 88px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,.18);
  object-fit: contain;
  flex: 0 0 auto;
}
.weekHeroText{ flex: 1; min-width: 240px; }
.weekHeroTitle{
  font-weight: 900;
  font-size: 18px;
  letter-spacing: .2px;
  line-height: 1.15;
}
.weekHeroDates{
  margin-top: 6px;
  color: rgba(233,241,255,.75);
  font-size: 13px;
}

/* =========================
   SCHEDULE LIST
   ========================= */
.scheduleList{ display:flex; flex-direction:column; gap:10px; }
.scheduleItem{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid var(--border);
  background: rgba(0,0,0,.18);
  cursor:pointer;
  transition: transform .08s ease, background .12s ease;
}
.scheduleItem:active{ transform: translateY(1px); }
.scheduleItem.active{
  border-color: rgba(71,215,172,.35);
  background: rgba(71,215,172,.08);
}
.scheduleLeft{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
  flex:1;
}
.scheduleLogo{
  width:40px; height:40px;
  border-radius:12px;
  border:1px solid var(--border);
  background: rgba(0,0,0,.18);
  object-fit: contain;
  flex:0 0 auto;
}
.scheduleText{ min-width:0; }
.scheduleName{
  font-weight:800;
  font-size:13px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.scheduleMeta{ margin-top:2px; color:var(--muted); font-size:12px; }

.tag{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.06);
  color: var(--muted);
  font-weight:800;
  font-size:12px;
  flex: 0 0 auto;
}
.tag.major{
  border-color: var(--majorBorder);
  color: var(--majorText);
  background: var(--majorBg);
}

/* =========================
   MAJOR WEEK STYLES
   ========================= */
.card.weekMajorCard{
  border-color: var(--majorBorder);
  box-shadow:
    0 12px 40px rgba(0,0,0,.35),
    0 0 0 1px rgba(255,207,90,.12),
    0 0 26px rgba(255,207,90,.14);
}
.card.weekMajorCard .hd{
  border-bottom-color: rgba(255,207,90,.25);
}
.badge.majorBadge{
  border-color: var(--majorBorder) !important;
  color: var(--majorText) !important;
  background: var(--majorBg) !important;
  font-weight: 800 !important;
}
.badge.majorPts{
  border-color: rgba(255,207,90,.55) !important;
  color: #ffe6ad !important;
  background: rgba(255,207,90,.10) !important;
  font-weight: 800 !important;
}

/* =========================
   Logged-in user mini (name + handicap)
   ========================= */
.userMini{
  color: rgba(233,241,255,.82);
  font-weight: 900;
  font-size: 12.5px;
  white-space: nowrap;
}
.userMini small{
  color: var(--muted);
  font-weight: 800;
  font-size: 11px;
  margin-left: 6px;
}
/* --- Auth mini (header right side) --- */
.userMini{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.userMiniName{
  font-weight:900;
  color: var(--text);
}
.hcpInline{
  font-size: 12px;
  font-weight: 800;
  color: rgba(233,241,255,.70);
  margin-left:6px;
}
/* Draft page warning flash (subtle red) */
body.draft-warning .wrap {
  animation: draftWarnPulse 1s ease-in-out infinite;
}

@keyframes draftWarnPulse {
  0% { box-shadow: 0 0 0 rgba(255,0,0,0); }
  50% { box-shadow: 0 0 0 9999px rgba(255,0,0,0.045); }
  100% { box-shadow: 0 0 0 rgba(255,0,0,0); }
}
