:root {
    --primary-bright: #f55671;
	--primary-color: #f22043;
    --primary-dark: #cc001f; 
    --background-dark: #1a1a1a;
    --background-darker: #111;
    --background-light: #222;
    --border-color: #2c2c2c;
    --text-light: #eee;
    --text-muted: #aaa;
    --card-shadow: 0 2px 8px rgba(0,0,0,0.2);
  }

a, nav.navbar-new div#nav-links.navbar-new-center a {
	color: var(--primary-color);
	text-decoration: none;
}

a:hover, a:active, nav.navbar-new div#nav-links.navbar-new-center a:hover, nav.navbar-new div#nav-links.navbar-new-center a:active {
	color: var(--primary-bright);
	text-decoration: none;
}

  /* --- Layout --- */
  .layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
  }

  /* --- Cards --- */
  .card {
    background: var(--background-dark);
    border-radius: 8px;
    padding: 1.25rem;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: var(--card-shadow);
  }
  .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  }
  .card-bordered {
    box-shadow: inset 0 0 0 1px var(--border-color);
  }

  /* --- Tournament Banner --- */
  .tournament-banner {
    background: linear-gradient(to right, var(--background-dark), var(--background-darker));
    padding: 2rem 1.5rem;
    border-radius: 10px;
    margin: 2rem auto;
    max-width: 1200px;
    box-shadow: 0 0 10px rgba(0,0,0,0.4);
  }
  .section-title {
    color: var(--text-light);
    font-size: 1.3rem;
    margin: 0 0 1rem;
  }
  .featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
    gap: 1rem;
    margin-top: 1rem;
  }

  /* --- News Articles --- */
  .news-grid {
    display: grid;
    gap: 1.5rem;
  }
  .news-article {
    border-left: 4px solid var(--primary-color);
  }
  .news-article h3 a {
    color: var(--text-light);
    text-decoration: none;
  }
  .news-article .meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0.5rem 0;
  }
  .news-article .teaser {
    color: #ddd;
    margin: 0 0 0.5rem;
  }
  .read-more {
    color: var(--primary-color);
    text-decoration: underline;
    font-size: 0.9rem;
    display: inline-block;
    margin-top: 0.5rem;
  }

  /* --- Featured Articles --- */
  .featured-articles {
    max-width: 1200px;
    margin: 2rem auto;
  }
  .featured-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
  }
  .featured-article-card img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    aspect-ratio: 16/9;
    object-fit: cover;
  }

  /* --- Sidebar --- */
  .sidebar {
    display: grid;
    gap: 1.5rem;
    align-content: start;
  }
  .sidebar h3 {
    color: var(--text-light);
    margin: 0 0 0.5rem;
  }

  /* --- Recent Matches --- */
  .recent-matches-block ul {
    list-style: none;
    padding: 0;
    max-height: 180px;
    overflow-y: auto;
    font-size: 0.9rem;
  }
  .recent-matches-block li {
    margin-bottom: 0.4rem;
    padding: 0.2rem 0;
  }
  .team-name {
    display: inline-block;
    max-width: 110px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: bottom;
  }

/* Enhanced Forum Posts Styling */
.forum-activity {
  margin-top: 1.5rem;
}

.forum-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.forum-tabs [role="tab"] {
  padding: 0.5rem 1rem;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: var(--text-muted);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.forum-tabs [role="tab"]:hover {
  background: rgba(230, 0, 35, 0.1);
  color: var(--text-light);
}

.forum-tabs [role="tab"][aria-selected="true"] {
  background: var(--primary-color);
  color: #fff;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.tab-content ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tab-content li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.tab-content li:last-child {
  border-bottom: none;
}

.forum-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: 0.7;
}

.tab-content a {
  color: var(--text-light);
  text-decoration: none;
  font-weight: 500;
  flex-grow: 1;
}

.tab-content a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

.tab-content small {
  color: var(--text-muted);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Clean metadata styling without commas */
.meta-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.meta-item:not(:last-child)::after {
  content: "•";
  margin-left: 0.5rem;
  color: var(--text-muted);
}

.time {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.forum-page-controls {
  margin-top: 1rem;
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.forum-page-controls button {
  padding: 0.4rem 0.75rem;
  background: var(--background-light);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--text-light);
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.forum-page-controls button:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
}



  /* --- Responsive --- */
  /* 768px stack for nav/hamburger etc. */
  @media (max-width: 1270px) {
    .layout {
      grid-template-columns: 1fr;
    }
	 .tab-content li {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .meta-info {
    margin-top: 0.25rem;
  }
    .featured-grid {
      grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }
  }

* {

  box-sizing: border-box;

  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;

  font-size: 16px;

}



body {

	background: #111;

	background-image: url("images/invid-bg-plain.jpg");

	background-size: cover;

	background-repeat: no-repeat;

	background-attachment: fixed;

	background-position: center;

	flex-grow: 1;

	margin: 0;

}

.container {
 height: 100%;

  width: 100%;

  margin: 0 auto;

  color: #eeeeee;

  display: block;

  overflow: auto;

  background: #222;
  
}



.content {

  background-color: #222;

  color: #eeeeee;

}



.content h2 {

  margin: 0;

  padding: 24pt 40pt;

  font-size: 20px;

}



.content .footer {

  padding: 25px 75px 25px 75px;

}



 .footer {

    display: flex;

	justify-content: center;

	position: relative;	

    width: 100%;

	height: 128pt;

    color: #FFFFFFAA;

	background: linear-gradient(180deg, #222222FF 0%, #22222200 100%);

}



.footer p {

	position: absolute;

	top: 50%;

	transform: translateY(-50%);

	letter-spacing: 2pt;

	font-size: 14pt;

	margin: 0;

}



.content .block {

  padding: 4pt 30pt;

}



.content .block p {

  padding: 0px;

  margin: 0 0 20px 0;

}



.content.profile form label {

  display: block;

  padding: 15px 0 10px 0;

  font-weight: 500;

  font-size: 14px;

  color: #777777;

}



.content.profile .banner {

  height: 300px;

  display: flex;

  background-size: cover;

  background-position-x: center !important;

}



.content.profile .banner .avatar {

    width: 175px;

    height: 175px;

    background-size: cover;

    background-position-x: center;

    border-radius: 50%;

    margin: auto;

    user-select: none;

    margin-top: 26pt;

	z-index: 5;

    box-shadow: #33333300 0 0 50pt;

	transition: all ease 0.3s

}



.content.profile .banner .avatar:active, .content.profile .banner .avatar:hover, .content.profile .banner .avatar:focus {

	box-shadow: #333333FF 0 0 50pt;

	transition: all ease 0.3s

}



.content.profile .banner .avatar img {

  width: 175px;

  height: 175px;

  border-radius: 50%;

  user-select: none; 

}



.content.profile .banner .status-text {

    width: 100%;

	left: 0;

	margin-top: 145pt;

}



.content.profile .banner .status-text.online {

	color: #fff !important;

}



.content.profile .banner .status-text.offline {

	color: #888 !important;

}


.profile-username {

    position: absolute;

    left: 0;

    width: 100%;

    text-align: center;

    margin-top: 150pt;

}



.profile-username h1 {

	font-size: 28pt;

	font-weight: 600;

	text-shadow: 0 0 30px #222;

	color: #eeeeee !important;

}



.profile-username a {

	font-size: 28pt;

	font-weight: 600;

	text-shadow: 0 0 30px #222;

	color: #eeeeee !important;

}



.profile-status span {

    position: absolute;

    text-align: center;

    font-size: 16pt;

    letter-spacing: -1px;

    z-index: 7;

    text-shadow: 0 0 30px #222;

}



.profile-friends {



}



.profile .column {

	min-width: 370pt;

	max-width: 530pt;

	width: 100%;

}



.profile-friends-status {

	float: right;

	margin: 8pt 46pt 0 0;

}



.profile-friend {

    padding: 12pt !important;

    height: 75px;

    margin-bottom: 12pt;

    padding: 8pt 10pt 8pt 10pt;

    background: #333333;

    color: #eeeeee;

    border: 1px solid #555555;

}



.profile-friend img {

    width: 48px;

    height: 48px;

    border-radius: 50%;



    user-select: none;

}



.profile-friend p {

    display: inline;

    top: -14pt;

    left: 4pt;

    position: relative;

}



.profile-friend-link {

    position: relative;

    left: 8pt;

}



.profile-friend-container {

    width: 90%;

}



.profile-team {

    padding: 12pt !important;

    height: 75px;

    margin-bottom: 12pt;

    padding: 8pt 10pt 8pt 10pt;

    background: #333333;

    color: #eeeeee;

    border: 1px solid #555555;

}



.profile-team img {

    width: 48px;

    height: 48px;

    border-radius: 50%;



    user-select: none;

}



.profile-team p {

    display: inline;

    top: -14pt;

    left: 4pt;

    position: relative;

}



.profile-team-link {

    position: relative;

    left: 8pt;

}



.profile-team-container {

    width: 90%;

}



/* Shared tabbed container style */

.profile .activity .recent-activity {

	background: #333;

	height: 120pt;

	overflow-y: scroll;

	border-radius: 6pt;

	box-shadow: #111 0 0 20pt;

	margin-left: 24pt;

	padding: 2pt 0 2pt 6pt;

	scrollbar-color: #686868 #424242;

}



/* Tab button group */

.profile .activity .activity-tabs {

	display: flex;

	gap: 6pt;

	margin-left: 24pt;

	margin-bottom: 6pt;

}



/* Each tab button */

.profile .activity .activity-tab {

	padding: 4pt 10pt;

	background: #222;

	color: #ccc;

	border: 1px solid #444;

	border-radius: 4pt;

	cursor: pointer;

	font-weight: bold;

	font-size: 9pt;

	transition: background 0.2s, color 0.2s;

}



.profile .activity .activity-tab:hover {

	background: #444;

	color: #fff;

}



.profile .activity .activity-tab.active {

	background: #5562e4;

	color: #fff;

}



/* Hide non-selected tab panels */

.profile .activity .activity-tab-content.hidden {

	display: none;

}



/* Entries inside each activity container */

.profile .activity .activity-entry {

	font-size: 9.5pt;

	color: #ddd;

	margin-bottom: 5pt;

	padding-right: 6pt;

}



.profile .activity .activity-entry .timestamp {

	color: #aaa;

	margin-right: 4pt;

	font-size: 8pt;

}



.content.profile form input[type="text"], .content.profile form input[type="password"], .content.profile form input[type="email"] {

  padding: 10px;

  width: 250px;

  border-radius: 4px;

  background: #444444;

  color: #eeeeee;

  outline: none;

}



.content.profile .profile-detail {

  padding: 4pt;

  color: #eeeeee;

}



.content.profile .profile-detail strong {

  display: inline-block;

  color: #777777;

  min-width: 120px;

  font-size: 16px;

}



.content.profile .profile-detail i {

  width: 28px;

  color: #aaabad;

}



.content.profile .profile-btn {

  display: inline-block;

  text-decoration: none;

  border: 0;

  cursor: pointer;

  color: #fff;

  background-color: #3274d6;

  margin: 20px 5px 0 0;

  padding: 10px 15px;

  border-radius: 4px;

  appearance: none;

  font-size: 14px;

}



.content.profile .profile-btn:hover {

  background-color: #2868c7;

}

.profile .block {

	width: 100%;

	min-width: 600pt;

	margin: auto;

	display: flex;

	justify-content: center;

	background-color: #222;

}

.action-button {

    display: block;

    padding: 10px 15px;

    background-color: #3274d6;

    color: white;

    text-align: center;

    border-radius: 5px;

    text-decoration: none;

}

/* === Navbar (moved from layout.html inline) === */
.navbar-new {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: 0;
  color: #fff;
  padding: 10px 20px;
  flex-wrap: wrap;
  position: relative;
  height: 50pt;
}
.navbar-new-left, .navbar-new-center, .navbar-new-right {
  display: flex;
  align-items: center;
  margin-right: 10pt;
}
.navbar-new-center {
  flex-grow: 1;
  justify-content: center;
  gap: 20px;
}
.navbar-new-logo-link {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.navbar-new-logo-img { 
	height: 36pt;
	user-select: none;
}
.navbar-new-title {
	font-weight: bold;
	font-size: 16pt;
	color: #fff;
	margin-left: 2pt;
	margin-top: -3pt;
}

.navbar-new-icon-group {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
}
.navbar-new-icon-link { position: relative; color: #fff; font-size: 1.2rem; }

/* SVG icon sizing/behavior */
.navbar-new-icon-link .navbar-new-icon-img {
  width: 20px;   /* match your previous FA size */
  height: 20px;
  display: block;
  pointer-events: none; /* clicks go to the link */
}

/* Optional: subtle hover feedback */
.navbar-new-icon-link:hover .navbar-new-icon-img {
  opacity: 0.85;
}

.navbar-new-badge,
.navbar-new-notification-badge {
  position: absolute;
  top: -5px; right: -5px;
  background: red; color: #fff;
  border-radius: 50%;
  padding: 2px 6px;
  font-size: 0.7rem;
}

.navbar-new-avatar-dropdown,
.navbar-new-notifications-dropdown { position: relative; }

.navbar-new-dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  background: #222;
  padding: 10px;
  border-radius: 6px;
  box-shadow: 0 0 6px rgba(0,0,0,0.3);
  z-index: 1000;
  min-width: 200px;
}
.navbar-new-dropdown-content.show { display: block; }

.navbar-new-user-avatar {
  height: 32px;
  border-radius: 50%;
}

/* Search */
.navbar-new-search-form {
  display: flex;
  align-items: center;
  margin: 0 10pt;
  min-width: 150px;
}
.navbar-new-search-bar {
  background: #333; color: #fff;
  border: none; padding: 6px 10px;
  border-radius: 4px 0 0 4px; width: 100%;
}
.navbar-new-search-form button {
  background: #555; border: none;
  padding: 6px 10px;
  border-radius: 0 4px 4px 0;
  color: white; cursor: pointer;
}
.search-wrapper { position: relative; display: flex; min-width: 150px; max-width: 250px; width: 100%; }

/* Recent search dropdown */
.recent-dropdown {
  position: absolute;
  top: 100%; left: 0; right: 0;
  background: #1c1c1c; color: #fff;
  border: 1px solid #444; border-top: none;
  list-style: none; margin: 0; padding: 0;
  z-index: 1001; max-height: 200px; overflow-y: auto;
  display: none; border-radius: 0 0 6px 6px;
  font-size: 0.9rem;
}
.recent-dropdown li {
  padding: 8px 10px; cursor: pointer;
  border-bottom: 1px solid #333;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.recent-dropdown li:last-child { border-bottom: none; }
.recent-dropdown li:hover { background: #333; }

/* Login button */
.login-button {
  padding: 8px 16px;
  background: #555;
  border-radius: 4px;
  cursor: pointer;
  color: #fff;
}

/* Mobile */
.navbar-new-hamburger {
  display: none;
  background: none; border: none;
  color: #fff; cursor: pointer;
  width: 32pt;
  height: 32pt;
  position: absolute;
  left: calc (50% -16pt);
}



/* ===== Popups wired to .popup-container / .popup-content ===== */
.popup-container {
  position: fixed;
  inset: 0;
  display: none;                 /* hidden by default */
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.6);    /* overlay */
  z-index: 2000;
  padding: 16px;                 /* margin on tiny screens */
}

.popup-container.active { display: flex; }

.popup-content {
  background: #1a1a1a;
  color: #fff;
  width: 100%;
  max-width: 420px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,.45);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 90vh;              /* keep inside viewport */
}

.popup-content h2 { margin: 0; padding: 14px 16px; border-bottom: 1px solid #2b2b2b; }
.popup-content p  { padding: 0 16px; }

.popup-content .ajax-form,
.popup-content form { padding: 16px; overflow: auto; }

.close-btn {
  position: absolute;
  top: 10px; right: 14px;
  background: none; border: 0; color: #aaa;
  font-size: 1.6rem; cursor: pointer;
  line-height: 1;
}

.close-btn:hover { color: #fff; }

/* Inputs/buttons inside popup */
.popup-content .input-container {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px;
}
.popup-content .input-container i { color: #bbb; }

.popup-content input[type="text"],
.popup-content input[type="password"],
.popup-content input[type="email"] {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #333;
  background: #111;
  color: #fff;
}

.popup-content button[type="submit"],
.popup-content input[type="submit"] {
  padding: 10px 14px;
  border-radius: 8px;
  border: 0;
  background: #ff4655;
  color: #fff;
  cursor: pointer;
}

#register-recaptcha-container { margin: 12px 0; text-align: center; }

body.modal-open { overflow: hidden; touch-action: none; }

/* 768px stack for nav/hamburger etc. */
@media (max-width: 1270px) {
  .navbar-new-hamburger { display: block;  margin: 0; font-size: 0; }
  .navbar-new-center,
  .navbar-new-right {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 15px;
    padding: 15px 0;
    background: #111;
    order: 1;
  }
  .navbar-new-center.active,
  .navbar-new-right.active { display: flex; }
  .navbar-new-search-form { margin: 10px 0; width: 100%; max-width: none; }
  .search-wrapper { max-width: none; }
  .navbar-new-icon-group { width: 100%; justify-content: space-around; }
}

/* 480px micro‑tweaks */
@media (max-width: 480px) {
  .popup-content { max-width: 100%; border-radius: 10px; }
  .popup-content h2 { padding: 12px; }
  .popup-content p  { padding: 0 12px; }
  .popup-content .ajax-form,
  .popup-content form { padding: 12px; }

  .navbar-new-center a { font-size: 0.9rem; padding: 5px 0; }
  .navbar-new-title { font-size: 1rem; }
}
/* spinner + loading state */
.is-loading [data-loading-text] { visibility: hidden; }
.is-loading [data-spinner] { display: inline-block; }
button[disabled] { opacity: .7; cursor: not-allowed; }

[data-spinner] {
  display: none;
  width: 1em; height: 1em;
  border: 2px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  vertical-align: -2px;
  animation: spin .8s linear infinite;
  margin-left: .5rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* dim popup while submitting */
.form-busy-mask {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.25);
  display: none;
  z-index: 5;
}
.popup-content.is-busy .form-busy-mask { display: block; }

/* anchor the close button to the card */
.popup-content { position: relative; }

.navtop .nav-links a:hover {

    color: #ddd;

}

.fas.fa-bars {
  font-size: 32pt;
  margin-left: -8pt;
}

.navbar-hamburger {
	position: absolute;
	left: calc(50% - 16pt);
	top: 8pt;
}