:root{
  --brand1:#6b8cff; --brand2:#3aa6ff; --accent:#00d4a6; --accent2:#ff8b5e;
  --bg:#e8f0ff; --border:#f5f5f5; --muted:#475569; --text:#0f172a;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;background:var(--bg);color:var(--text)}
img{max-width:100%;display:block}
.container{max-width:1100px;margin:0 auto;padding:0 16px 40px}

/* HEADER */
.header{position:sticky;top:0;z-index:10;background:linear-gradient(90deg,var(--brand1),var(--brand2));color:#fff}
.header-inner{max-width:1100px;margin:0 auto;padding:10px 16px;display:grid;grid-template-columns:1fr auto 1fr;align-items:center}
.menu-left{display:flex;gap:10px}
.menu-link{color:#fff;text-decoration:none;padding:6px 10px;border-radius:6px;opacity:.9}
.menu-link:hover{background:rgba(255,255,255,.15);opacity:1}
.logo{text-align:center;font-weight:800;letter-spacing:.4px}
.auth-right{display:flex;justify-content:flex-end}
.auth-btn{background:#fff;color:var(--brand2);border:none;padding:6px 12px;border-radius:8px;cursor:pointer;font-weight:600}
.auth-btn:hover{filter:brightness(1.05)}

/* CAROUSEL */
.hero {
  margin: 18px 0 28px;
}

.carousel {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
  height: 420px;              
}

.slide {
  display: none;
  width: 100%;
  height: 100%;
}

.slide.active {
  display: block;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;          
  object-position: center;    
  display: block;
}

.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  background: rgba(0,0,0,.3);
  padding: 0 16px;
}

.overlay h1 {
  margin: 0 0 6px;
  font-size: clamp(20px, 4vw, 36px);
}

/* EVENTS */
.section-title{font-size:22px;margin:10px 0;color:#0b1020}
.calendar{background:#fff;border:1px solid var(--border);border-radius:12px;overflow:hidden}
.cal-title{padding:10px 12px;background:linear-gradient(90deg,var(--accent),var(--accent2));color:#0b1020;font-weight:700}
.cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:1px;background:var(--border)}
.cal-cell{background:#fff;min-height:64px;padding:6px;font-size:14px}
.cal-head{background:#f1f5f9;font-weight:700;text-align:center}
.actions{display:flex;gap:10px;justify-content:flex-start;padding:12px 0 0}
.btn{border:0;background:linear-gradient(90deg,var(--brand2),var(--brand1));color:#fff;padding:9px 14px;border-radius:10px;cursor:pointer}
.btn:hover{filter:brightness(1.06)}
.btn-outline{background:#fff;color:var(--brand2);border:1px solid var(--brand2)}

/* MEDALS */
.medals{margin-top:28px}
.medals-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
.medal-card{background:#fff;border:1px solid var(--border);border-radius:12px;overflow:hidden}
.medal-card figcaption{text-align:center;padding:10px;color:var(--muted);font-size:14px}

/* FOOTER */
.footer{text-align:center;padding:16px;color:var(--muted)}

/* Calendar event highlight  */
.event-day {
  background: #e0f2fe;           
  border: 1px solid #38bdf8;     
  border-radius: 6px;
  position: relative;
}
.event-label {
  font-size: 11px;
  color: #0369a1;
  margin-top: 4px;
}

/*  Modal 4 Login / Register*/
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.6);
  z-index: 1000;
}
.modal.hidden { display: none; }
.modal-content {
  background: #fff;
  color: var(--text);
  width: 90%;
  max-width: 420px;
  padding: 18px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}
.close {
  appearance: none;
  border: 0;
  background: transparent;
  font-size: 24px;
  float: right;
  cursor: pointer;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}
.stack input {
  padding: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}
/* PROFILE PAGE BOXES  */
.profile-page .card {
  background: #ffffff;
  border: 3px solid rgba(58,166,255,0.85);   
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 4px 12px rgba(58,166,255,0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.profile-page .card:hover {
  transform: translateY(-2px);
  border-color: rgba(107,140,255,1);        
  box-shadow: 0 6px 20px rgba(107,140,255,0.35);
}
.profile-page .card h3 {
  margin: 0 0 10px;
  color: #0f172a;
  border-bottom: 2px solid rgba(107,140,255,0.4);
  padding-bottom: 6px;
}

/* KPI tiles inside Overview */
.profile-page .kpi {
  background: #f3f8ff;
  border: 2px solid rgba(58,166,255,0.85);
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 2px 6px rgba(58,166,255,0.2);
}
.profile-page .kpi:hover {
  border-color: rgba(107,140,255,1);
  background: #eaf2ff;
}

/* Medals grid cards */
.profile-page .medal-card {
  background: #f8fbff;
  border: 3px solid rgba(58,166,255,0.85);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 3px 10px rgba(58,166,255,0.25);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.profile-page .medal-card:hover {
  border-color: rgba(107,140,255,1);
  box-shadow: 0 6px 16px rgba(107,140,255,0.35);
}

/* Communities / Events section cards */
.profile-page .list,
.profile-page .communities-card {
  background: #fff;
  border: 3px solid rgba(58,166,255,0.85);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 3px 10px rgba(58,166,255,0.25);
}

/* Past Runs entries */
.profile-page .past-runs {
  background: #fff;
  border: 3px solid rgba(58,166,255,0.85);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 3px 10px rgba(58,166,255,0.25);
}


/* Global confirm modal */
.confirm-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5); 
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.confirm-modal {
  background: #ffffff;
  border-radius: 16px;
  padding: 18px 20px 14px;
  max-width: 360px;
  width: 90%;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.35);
  border: 1px solid var(--border);
}

.confirm-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.confirm-message {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 14px;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.confirm-btn {
  border-radius: 999px;
  border: 1px solid var(--border);
  padding: 6px 12px;
  font-size: 0.85rem;
  background: #f8fafc;
  cursor: pointer;
}

.confirm-btn-primary {
  border: 0;
  background: linear-gradient(90deg, var(--brand2), var(--brand1));
  color: #fff;
}

.confirm-btn-danger {
  border: 0;
  background: #ef4444;
  color: #fff;
}


/* Center the home mission section */
.home-mission {
  text-align: center;
  margin-top: 24px;
  padding: 24px 20px;
}

.home-mission-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.home-mission-text {
  max-width: 700px;             
  margin: 0 auto;               
  line-height: 1.55;
  color: var(--muted);
  font-size: 1rem;
}
