/* Critical dark theme styles - Xbox 360 Edition */
:root {
  color-scheme: dark;
}

html {
  background-color: #121212;
}

body {
  background-color: #121212;
  color: #f3f4f6;
  min-height: 100vh;
}

article h1 {
  font-size: 2em;         /* 32px if base font is 16px */
  margin-top: 0.67em;
  margin-bottom: 0.67em;
  font-weight: bold;
}

article h2 {
  font-size: 1.5em;       /* 24px if base font is 16px */
  margin-top: 0.83em;
  margin-bottom: 0.83em;
  font-weight: bold;
}

article h3 {
  font-size: 1.17em;      /* 18.72px if base font is 16px */
  margin-top: 1em;
  margin-bottom: 1em;
  font-weight: bold;
}

article h4 {
  font-size: 1em;         /* 16px if base font is 16px */
  margin-top: 1.33em;
  margin-bottom: 1.33em;
  font-weight: bold;
}

article h5 {
  font-size: 0.83em;      /* 13.28px if base font is 16px */
  margin-top: 1.67em;
  margin-bottom: 1.67em;
  font-weight: bold;
}

/* Smooth page load transition */
.hide-content {
  display: none;
}

.show-content {
  display: block;
  animation: fadeIn 0.2s ease-in forwards;
}

@keyframes fadeIn {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

.dropdown-submenu>a::after {
  content: '>';
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
}

.parent_child::after {
  content: '›';
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #6B7280;
}

/* Xbox styled buttons */
.btn-game-action {
  @apply p-3 rounded-xl bg-[#262626] hover:bg-[#8DC63F] hover:text-[#121212] transition-colors text-lg;
}

.btn-game-primary {
  @apply px-4 py-2 rounded-xl bg-[#8DC63F] text-[#121212] hover:bg-[#74A630] transition-colors flex items-center gap-2 text-sm font-bold;
  box-shadow: 0 0 8px rgba(141, 198, 63, 0.2); /* Subtle green glow */
}

.widget {
  margin-bottom: 22px;
}

.widget-title {
  font-weight: bold;
  margin-bottom: 12px;
  font-size: 20px;
  color: #E5E7EB;
}

.game-content {
  overflow: hidden;
}

.game-iframe-container {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 700px;
}

.game-iframe {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
}

/* Comments */

.comment-user-avatar {
  position: absolute;
  width: 50px;
  height: 50px;
}

.comment-user-avatar img {
  border-radius: 50%;
}

.comment-avatar {
  float: left;
  width: 50px;
  height: 50px;
}

.comment-avatar img {
  border-radius: 50%;
}

.comment-input {
  margin-left: 65px;
}

.comment-btn-post {
  text-align: right;
}

.comment-p {
  margin-top: 23px;
}

.comment-p .comment-date {
  float: right;
  color: #888;
  font-size: 0.8em;
}

.comment-username {
  font-weight: bold;
  color: #8DC63F; /* Xbox green usernames */
}

.comment-details {
  margin-left: 65px;
}

.comment-text {
  white-space: pre-line;
}

.color-red {
  color: #bb4d4d;
}

i.disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* NEW COMMENT SYSTEM */

#tpl-comment-section {
  margin-top: 30px;
  margin-bottom: 20px;
}

#comment-form {
  display: flex;
  margin-bottom: 30px;
  border-bottom: 1px solid #333333;
}

.comment-profile-avatar {
  margin-right: 20px;
}

.comment-profile-avatar img {
  border-radius: 50%;
  float: left;
  width: 3.6rem;
  height: 3.6rem;
  max-width: 50px;
  max-height: 50px;
}

.comment-form-wrapper {
  background: #1E1E1E;
  margin-bottom: 30px;
  box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.3);
  border: 1px solid #333333;
  border-radius: 12px;
  padding: 15px;
  width: 100%;
}

.comment-form-wrapper textarea {
  padding: 0;
  border: 0;
  background: transparent;
  color: #f3f4f6;
}

.post-comment-btn-wrapper {
  float: right;
  margin-top: 15px;
}

textarea#comment-input {
  height: 100px;
}

.user-comment-wrapper {
  display: flex;
}

.tpl-user-comment {
  border-bottom: 1px solid #333333;
  margin-bottom: 30px;
}

.tpl-comment-children .tpl-user-comment:last-child {
  border-bottom: none;
}

img.tpl-user-comment-avatar {
  border-radius: 50%;
  float: left;
  width: 3.6rem;
  height: 3.6rem;
  max-width: 50px;
  max-height: 50px;
  margin-right: 20px;
}

.tpl-comment-children img.tpl-user-comment-avatar {
  max-width: 40px;
  max-height: 40px;
}

.tpl-comment-author {
  font-weight: bold;
  color: #8DC63F;
}

.tpl-user-comment .comment-content {
  margin-bottom: 20px;
  width: 100%;
}

.tpl-comment-timestamp {
  margin-top: 3px;
  font-size: 15px;
  color: #888888;
}

.tpl-comment-text {
  margin-top: 13px;
  white-space: unset;
}

.comment-actions {
  margin-top: 15px;
}

.comment-action-right {
  float: right;
}

.comment-action-left {
  float: left;
}

.tpl-comment-children {
  display: block;
  margin-left: 70px;
}

.tpl-reply-form {
  display: flex;
}

.comment-reply-wrapper {
  margin-left: 70px;
  background: #1A1A1A;
  margin-bottom: 30px;
  box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.3);
  border: 1px solid #333333;
  border-radius: 12px;
  padding: 15px;
  width: 100%;
  color: #f3f4f6;
}

.comment-reply-wrapper textarea {
  padding: 0;
  border: 0;
  background: transparent;
  color: #f3f4f6;
}

.reply-action-buttons {
  float: right;
  margin-top: 15px;
}

.tpl-btn-cancel-reply {
  color: #888888;
}

#tpl-btn-load-more-comments {
  color: #8DC63F; /* Green link */
}

.comment-require-login-wrapper {
  display: flex;
  margin-bottom: 40px;
}

.comment-require-login-wrapper .comment-alert {
  padding: 10px;
  background-color: #262626;
  color: #f3f4f6;
  text-align: center;
  width: 100%;
  border-radius: 8px;
  border: 1px solid #333;
}

/* END COMMENT */

/* USER */

/* Grid System */
.container {
  width: 100%;
  padding-right: 15px;
  padding-left: 15px;
  margin-right: auto;
  margin-left: auto;
}

@media (min-width: 576px) {
  .container {
    max-width: 540px;
  }
}

@media (min-width: 768px) {
  .container {
    max-width: 720px;
  }
}

@media (min-width: 992px) {
  .container {
    max-width: 960px;
  }
}

@media (min-width: 1200px) {
  .container {
    max-width: 1140px;
  }
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin-right: -15px;
  margin-left: -15px;
}

.col-md-4, .col-md-8 {
  position: relative;
  width: 100%;
  padding-right: 15px;
  padding-left: 15px;
}

@media (min-width: 768px) {
  .col-md-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
  }

  .col-md-8 {
    flex: 0 0 66.666667%;
    max-width: 66.666667%;
  }
}

/* Forms */
.form-control {
  display: block;
  width: 100%;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  color: #E5E7EB;
  background-color: #262626;
  background-clip: padding-box;
  border: 1px solid #404040;
  border-radius: 0.25rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
  border-color: #8DC63F;
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(141, 198, 63, 0.25);
}

.form-check {
  position: relative;
  display: block;
  padding-left: 1.25rem;
  margin-bottom: 0.5rem;
}

.form-check-input {
  position: absolute;
  margin-top: 0.3rem;
  margin-left: -1.25rem;
}

.form-check-label {
  margin-bottom: 0;
}

/* User Profile Styles */
.user-page {
  padding: 2rem 0;
  padding-top: 100px;
}

.single-title {
  font-size: 23px;
  font-weight: bold;
  margin-bottom: 17px;
}

.section {
  background-color: #1A1A1A;
  border: 1px solid #333333;
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.section-title {
  font-size: 1.25rem;
  font-weight: bold;
  color: white;
  margin-bottom: 1rem;
}

.profile-photo img {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  margin: 0 auto;
  border: 3px solid #8DC63F; /* Xbox green ring around avatar */
}

.profile-username {
  font-size: 1.5rem;
  font-weight: bold;
  color: white;
  margin: 1rem 0;
}

.profile-join {
  color: #888888;
  margin-bottom: 0.5rem;
}

.profile-bio {
  font-style: italic;
  color: #9CA3AF;
}

/* Game Lists */
.profile-gamelist-horizontal {
  position: relative;
  overflow: hidden;
  padding: 1rem 0;
}

.profile-gamelist-horizontal ul {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.profile-game-item {
  flex: 0 0 auto;
  margin-right: 1rem;
}

.list-thumbnail img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 0.5rem;
  border: 2px solid #333333;
  transition: border-color 0.2s ease;
}

.list-thumbnail img:hover {
  border-color: #8DC63F;
}

/* Buttons */
.btn {
  display: inline-block;
  font-weight: bold;
  text-align: center;
  vertical-align: middle;
  user-select: none;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: 0.25rem;
  transition: all 0.15s ease-in-out;
}

.btn-primary {
  color: #121212;
  background-color: #8DC63F;
  border: 1px solid #8DC63F;
}

.btn-primary:hover {
  background-color: #74A630;
  border-color: #74A630;
  color: #121212;
}

.btn-danger {
  color: #fff;
  background-color: #EF4444;
  border: 1px solid #EF4444;
}

.btn-danger:hover {
  background-color: #DC2626;
  border-color: #DC2626;
}

.btn-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  background-color: rgba(141, 198, 63, 0.2);
  color: #8DC63F;
  border: 1px solid rgba(141, 198, 63, 0.5);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.btn-arrow:hover {
  background-color: #8DC63F;
  color: #121212;
}

.btn-left { left: 0; }
.btn-right { right: 0; }

/* Progress Bar */
.progress {
  display: flex;
  height: 1rem;
  overflow: hidden;
  font-size: .75rem;
  background-color: #333333;
  border-radius: 0.25rem;
}

.progress-bar {
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  color: #121212;
  font-weight: bold;
  text-align: center;
  white-space: nowrap;
  background-color: #8DC63F;
  transition: width .6s ease;
}

/* Comments */
.profile-comment-item {
  background-color: #262626;
  border: 1px solid #333333;
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 1rem;
}

.comment-text {
  color: white;
  margin-bottom: 0.5rem;
}

.comment-date {
  font-size: 0.875rem;
  color: #888888;
}

.delete-comment {
  color: #EF4444;
  cursor: pointer;
  margin-top: 0.5rem;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-secondary { color: #888888; }
.text-danger { color: #EF4444; }
.mb-3 { margin-bottom: 1rem; }

/* Avatar Chooser */
.avatar-chooser {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.input-hidden {
  position: absolute;
  left: -9999px;
}

.input-hidden+label img {
  width: 100%;
  height: auto;
  border: 2px solid transparent;
  border-radius: 0.5rem;
  cursor: pointer;
}

.input-hidden:checked+label img {
  border-color: #8DC63F;
}

/* END USER */

/* Mobile Header Fixes */
@media (max-width: 768px) {
  .mobile-logo-menu {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }

  .mobile-search {
    width: 100%;
    margin: 1rem 0;
  }

  .mobile-search input {
    width: 100%;
    background-color: #262626;
    border: 1px solid #404040;
    color: #fff;
  }

  .mobile-nav {
    padding: 1rem;
  }

  .mobile-nav ul {
    background: #1A1A1A;
    width: 100%;
    border-top: 2px solid #8DC63F; /* Subtle Xbox accent line */
  }

  .mobile-nav li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #333333;
  }

  .mobile-nav li:last-child {
    border-bottom: none;
  }

  .mobile-nav .submenu {
    position: relative;
    padding-left: 1rem;
    margin-top: 0.5rem;
  }
}

.login-body {
  color: #E5E7EB;
}

/* Game Info Bar Improvements */
.game-info-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 768px) {
  .game-info-container {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }
}

.game-title-section {
  flex: 1;
  min-width: 0;
  margin-right: 1rem;
}

.game-title {
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  color: #fff;
}

.game-actions-section {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: flex-start;
}

@media (min-width: 768px) {
  .game-actions-section {
    justify-content: flex-end;
    min-width: fit-content;
  }
}

.game-meta-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
  color: #888;
}

.single-game__actions {
  display: flex;
  gap: 0.5rem;
  margin-right: 0.5rem;
}

.mobile-primary-buttons {
  display: flex;
  gap: 0.5rem;
}

@media (max-width: 640px) {
  .game-actions-section {
    width: 100%;
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .single-game__actions {
    margin-right: 0;
    justify-content: center;
    order: 1;
  }
  
  .mobile-primary-buttons {
    display: flex;
    gap: 0.5rem;
    width: 100%;
    order: 2;
  }
  
  .game-actions-section .btn-game-primary {
    flex: 1;
    justify-content: center;
    min-width: 0;
    padding: 0.75rem 1rem;
  }
  
  .btn-game-action {
    order: 3;
    align-self: center;
  }
}