:root{
  --pad: 16px;
  --radius: 14px;

  --bg: #f4f8fc;
  --surface: #ffffff;
  --surface-soft: rgba(255,255,255,0.94);

  --text: #0f172a;
  --muted: rgba(15,23,42,.65);

  --primary: #2f6fde;
  --primary-dark: #1f4fa8;
  --primary-light: #6ea2ff;
  --primary-soft: rgba(47,111,222,.07);

  --border: #d7e3f3;
  --shadow: 0 2px 8px rgba(15, 23, 42, .06);
  --shadow-hover: 0 6px 16px rgba(15, 23, 42, .10);
}

* {
  box-sizing: border-box;
}

body{
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(111,162,255,.16), transparent 32%),
    var(--bg);
}

#app {
  padding-bottom: 84px;
}

.app-header {
  background: linear-gradient(120deg, #3f7df0 0%, #2f6fde 55%, #2459bc 100%);
  color: #fff;
  padding: 14px 16px;
  text-align: center;
  box-shadow: 0 3px 10px rgba(31,79,168,.22);
}

.app-title {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: .3px;
}

.app-subtitle {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  margin-top: 8px;
  padding: 7px 16px;

  background: linear-gradient(
    180deg,
    #ffe27a 0%,
    #f6c544 100%
  );

  color: #0b2a4a;

  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: .35px;

  border-radius: 999px;

  border: 1px solid rgba(255,255,255,.35);

  box-shadow:
    inset 0 1px rgba(255,255,255,.55),
    0 3px 10px rgba(0,0,0,.18);
}

.container{
  max-width: 900px;
  margin: 0 auto;
  padding: var(--pad);
}

.card {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 15px 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
  animation: fadeUp .28s ease both;
}

.card strong,
.card .item-title {
  font-weight: 700;
  color: var(--primary-dark);
}

.card.eventhub {
  background: linear-gradient(135deg, #2f6fde 0%, #5d91f3 100%);
  color: #fff;
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: 0 8px 24px rgba(47,111,222,.22);
}

.card.eventhub .title,
.card.eventhub .small {
  color: rgba(255,255,255,.92);
}

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

.btn{
  display: inline-block;
  width: 100%;
  text-decoration: none;
  text-align: center;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--primary-dark);
  font-weight: 600;
  transition: transform .08s ease, box-shadow .18s ease, background .18s ease;
}

.btn:active{
  transform: scale(.98);
}

.btn:hover{
  box-shadow: var(--shadow-hover);
  background: var(--primary-soft);
}

.btn.disabled{
  opacity: 0.45;
  pointer-events: none;
}

.small{
  font-size: 0.9rem;
  color: var(--muted);
}

.title{
  font-size: 1.3rem;
  margin: 0 0 6px 0;
}

.view { 
  display:none; 
  padding: 14px 14px 86px; 
}

#view-home { 
  display:block; 
} 

.tabbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;

  display: flex;
  justify-content: space-around;
  align-items: center;
  transform: translateZ(0);

  background: linear-gradient(90deg, #2f6fde 0%, #2459bc 100%);
  border-top: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 -4px 18px rgba(31,79,168,.22);

  padding: 10px 0 calc(env(safe-area-inset-bottom, 0) + 6px);
  z-index: 1000;
}

.tabbar a {
  flex: 1;
  text-align: center;
  text-decoration: none;
  font-size: .84rem;
  font-weight: 500;
  color: rgba(255,255,255,.74);
  padding: 8px 0;
  transition: color .18s ease, transform .12s ease;
}

.tabbar a:active {
  transform: translateY(1px);
}

.tabbar .material-symbols-outlined {
  display: block;
  font-size: 21px;
  margin-bottom: 2px;
  color: currentColor;
}

.tabbar a.active {
  color: #ffffff;
  font-weight: 700;
}

.tabbar a.active::after {
  content: "";
  display: block;
  width: 24px;
  height: 3px;
  background: #ffffff;
  margin: 6px auto 0;
  border-radius: 999px;
}
/* Competition Status */
.status-card {
  margin: 18px 0;
}
.status-title {
  margin: 0 0 12px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(11, 42, 74, 0.12);
  font-size: 1.05rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #12357E;
}

.status-card .info-card {
  background: linear-gradient(
    135deg,
    rgba(11, 42, 74, 0.08),
    rgba(11, 42, 74, 0.03)
  );
  border: 1px solid rgba(11, 42, 74, 0.12);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 20px;
}

.status-card .rendered-intro {
  font-size: 0.95rem;
  line-height: 1.6;
}
.status-card .rendered-intro p {
  margin: 0 0 6px 0;
}

.status-card strong {
  display: inline-block;
  min-width: 140px;
  color: #0b2a4a;
}
.status-updated {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(11, 42, 74, 0.08);
  font-size: 0.8rem;
  color: #667085;
}

/* Call to Action buttons */

.cta * {
  text-decoration: none;
}

.cta-grid {
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:12px;
}

.cta {
  color: inherit;
  text-decoration: none;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-soft);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform .08s ease, box-shadow .18s ease, background .18s ease;
}

.cta:hover{
  box-shadow: var(--shadow-hover);
  background: #fff;
}

.cta:active {
  transform: scale(0.98);
  box-shadow: none;
}

.cta-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align:center;
  font-weight: 700;
  color: var(--primary-dark);
}

.cta-sub { 
  text-align: center;
  font-size: .75rem;
  color: var(--muted);
  margin-top: 3px;
}

.cta .material-symbols-outlined {
  font-size: 21px;
  color: var(--primary);
}

.section-title {
  font-size: 1.05rem;
  font-weight: 800;
  margin: 20px 0 10px;
  color: var(--primary-dark);
  letter-spacing: .1px;
}

.list{
  list-style:none;
  padding:0;
  margin:0;
  display: grid;
  gap: 10px;
}

.item { 
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  animation: fadeUp .28s ease both;
  transition: transform .1s ease, box-shadow .18s ease;
}

.item:hover {
  box-shadow: var(--shadow-hover);
}

.item:active {
  transform: scale(.995);
}

.item-title {
  display: flex;
  gap: 6px;
  align-items: center;
  font-weight: 800;
  margin-bottom: 4px;
  color: var(--primary-dark);
}

.item-meta { 
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
}

.item-intro { 
  font-size: 13px;
  opacity: .95;
  line-height: 1.42;
}

.item-link {
  display:block;
  padding: 12px;
  color: inherit;
  text-decoration:none;
}

.item-link:active{
  opacity: .85;
}

.info-section{
  margin-bottom: 18px;
}

.info-card{
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
  box-shadow: var(--shadow);
  padding: 13px;
  animation: fadeUp .28s ease both;
}

.info-link{
  display:block;
  color:inherit;
  text-decoration:none;
}

.info-link:active{
  opacity: .85;
}

.info-card .item-intro{
  margin-top: 8px;
  line-height: 1.42;
}

.material-symbols-outlined {
  font-size: 18px;
  color: var(--primary);
}

/** App Footer **/

.app-footer{
  margin-top: 22px;
  padding: 10px 4px 0;
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--muted);
}

.app-footer strong{
  font-weight: 700;
  color: rgba(15,23,42,.75);
}

.app-footer-links{
  margin: 6px 0 6px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 0.82rem;
}

.app-footer a{
  color: var(--primary-dark);
  text-decoration: none;
  font-weight: 600;
}

.app-footer a:active{
  opacity: .7;
}

/** Rendered Joomla article content **/

.rendered-intro {
  margin-top: 8px;
}

.rendered-intro p,
.rendered-intro ul,
.rendered-intro ol {
  margin: 0 0 12px 0;
}

.rendered-intro ul,
.rendered-intro ol {
  padding-left: 20px;
}

.rendered-intro li {
  margin-bottom: 8px;
}

.rendered-intro a {
  display: block;
  position: relative;
  margin-bottom: 10px;
  padding: 10px 38px 10px 12px;
  border-radius: 11px;
  background: var(--primary-soft);
  border: 1px solid rgba(47,111,222,.14);
  color: var(--primary-dark);
  text-decoration: none;
  font-weight: 600;
  word-break: break-word;
  transition: background .18s ease, transform .08s ease, box-shadow .18s ease;
}

.rendered-intro a::after {
  content: "›";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.45;
  font-size: 1.2rem;
}

.rendered-intro a:hover {
  background: rgba(47,111,222,.11);
  box-shadow: var(--shadow);
}

.rendered-intro a:active {
  transform: scale(.99);
  opacity: 0.88;
}

.rendered-intro h1,
.rendered-intro h2,
.rendered-intro h3,
.rendered-intro h4,
.rendered-intro h5,
.rendered-intro h6 {
  margin: 0 0 10px 0;
  font-size: 1rem;
  color: var(--primary-dark);
}

.rendered-intro * {
  max-width: 100%;
}

/** Open buttons **/

.item-open-wrap {
  margin-top: 14px;
}

.item-open {
  display: inline-block;
  box-sizing: border-box;
  width: 100%;
  text-align: center;
  padding: 11px 14px;
  border-radius: 13px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  border: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 3px 10px rgba(47,111,222,.18);
  transition: transform .08s ease, box-shadow .18s ease, filter .18s ease;
}

.item-open:active {
  transform: scale(0.98);
  box-shadow: none;
}

.item-open:hover {
  filter: brightness(1.03);
  box-shadow: 0 6px 16px rgba(47,111,222,.24);
}

/** Subtle animations **/

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/** Accessibility: reduce motion if user prefers **/

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/** Small screens **/

@media (max-width: 520px) {
  :root {
    --pad: 14px;
  }

  .cta-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .cta {
    padding: 13px 10px;
  }

  .app-title {
    font-size: 1.1rem;
  }

  .tabbar a {
    font-size: .78rem;
  }
}