/* ---------- Global Styles ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Rubik", sans-serif !important;
}

body {
  background-color: #f9fafb;
  color: #333;
}

/* ========== NAVBAR ========== */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 3rem;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 10;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-section img {
  width: 45px;
  height: 45px;
  border-radius: 50%;
}

.logo-section h1 {
  font-size: 1.6rem;
  font-weight: 700;
  color: #111;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-btn {
  text-decoration: none;
  font-weight: 500;
  color: #333;
  transition: 0.3s;
}

.nav-btn:hover {
  color: #007bff;
}

/* ========== HERO SECTION ========== */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 2rem;
  background: linear-gradient(135deg, #007bff, #00c6ff);
  color: #fff;
}

.hero-content {
  max-width: 700px;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hero .highlight {
  color: #ffeb3b;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.btn {
  text-decoration: none;
  padding: 0.8rem 1.6rem;
  border-radius: 50px;
  border: none;
  font-weight: 600;
  transition: 0.3s;
  font-size: 1rem;
}

.btn-primary {
  background: #fff;
  color: #007bff;
}

.btn-primary:hover {
  background: #007bff;
  color: #fff;
}

.btn-outline {
  border: 2px solid #fff;
  color: #fff;
}

.btn-outline:hover {
  background: #fff;
  color: #007bff;
}

/* ========== NEW INFO SECTION ========== */

.info-section {
  width: 100%;
  max-width: 1100px;
  margin: 80px auto;
  display: flex;
  flex-direction: column;
  gap: 80px;
}

.info-row {
  display: flex;
  align-items: center;
  gap: 40px;
}

.info-row.reverse {
  flex-direction: row-reverse;
}

.info-image {
  flex: 1;
  display: flex;
  justify-content: center;
}

.info-image img {
  width: 90%;
  max-width: 450px;
  border-radius: 14px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.info-text {
  flex: 1;
  padding: 20px;
}

.info-icon-large {
  font-size: 3rem;
  margin-bottom: 10px;
}

.info-text h3 {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.info-text p {
  font-size: 1.05rem;
  color: #444;
  line-height: 1.6;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
  .info-row,
  .info-row.reverse {
    flex-direction: column;
    text-align: center;
  }

  .info-image img {
    width: 100%;
  }
}

/* ===== NEW STACKED ABOUT SECTION ===== */

.about-rivals-section {
  width: 100%;
  max-width: 900px;
  margin: 100px auto;
  padding: 0 20px;
  text-align: center;
}

.about-title {
  font-size: 2.4rem;
  font-weight: 700;
  margin-bottom: 25px;
}

.about-image-large {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
}

.about-image-large img {
  width: 100%;
  max-width: 650px; /* bigger image */
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.15);
}

.about-text {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #444;
}

.about-text p {
  margin-bottom: 18px;
}

.about-highlight {
  font-weight: 600;
  font-size: 1.15rem;
}

/* Responsive */
@media (max-width: 600px) {
  .about-title {
    font-size: 2rem;
  }

  .about-image-large img {
    max-width: 100%;
  }

  .about-text {
    font-size: 1rem;
  }
}

/* ========== FOOTER ========== */
.footer {
  text-align: center;
  background: #fff;
  padding: 1.5rem;
  color: #555;
  font-size: 0.9rem;
  border-top: 1px solid #eee;
}

.btn-primary {
  background-color: #007bff;
  color: #fff;
}

.btn-primary:hover {
  background-color: #0056b3;
}

.btn-outline {
  border: 2px solid #007bff;
  background: none;
  color: #007bff;
}

.btn-outline:hover {
  background-color: #007bff;
  color: #fff;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  nav {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links {
    margin-top: 10px;
    flex-wrap: wrap;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .hero p {
    font-size: 1rem;
  }
}

/* ---------- Login Page ---------- */
.login-container {
  max-width: 400px;
  margin: 100px auto;
  background: #fff;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.login-container h1 {
  margin-bottom: 1rem;
}

.login-container input {
  width: 100%;
  padding: 0.8rem;
  margin: 0.5rem 0;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.note {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #555;
}

.note .link {
  color: #007bff;
  text-decoration: none;
  font-weight: 600;
}

.note .link:hover {
  text-decoration: underline;
}

/* ---------- Battle Section ---------- */

.battle-section h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: #111;
}

.battle-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3rem;
  margin-top: 2rem;
}

.team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.vs-text {
  font-size: 2.5rem;
  font-weight: bold;
  color: #007bff;
}

.vote-message {
  margin-top: 2rem;
  font-size: 1.1rem;
  font-weight: 500;
  color: #333;
}


/* ---------- Battle List (Improved UI) ---------- */
.battle-list-section {
  text-align: center;
  padding: 4rem 2rem;
  background: linear-gradient(180deg, #f9fafb 0%, #eef4ff 100%);
}

.battle-list-section h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.battle-list-section p {
  color: #555;
  font-size: 1rem;
  margin-bottom: 2rem;
}

.battle-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
}

.battle-card {
  background: #fff;
  border-radius: 20px;
  padding: 2rem 1.5rem;
  width: 320px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.battle-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.battle-card h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: #111;
}

/* ========== PROGRESS BARS WITH FRONT CIRCLE IMAGES ========== */
.bar-wrapper {
  margin: 2rem 0;
  position: relative;
}

.bar-container {
  background: #e5e7eb;
  border-radius: 50px;
  height: 35px;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.bar {
  height: 100%;
  border-radius: 50px;
  transition: width 0.8s ease-in-out;
  position: relative;
}

.bar-a {
  background: linear-gradient(90deg, #007bff, #00c6ff);
}

.bar-b {
  background: linear-gradient(90deg, #ff3d3d, #ff8585);
}

/* --- Circle Badge (Team Image) --- */
.badge {
  width: 65px;
  height: 65px;
  border-radius: 50%;
  border: 4px solid #fff;
  background-color: #fff;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 0;
  transition: left 0.8s ease-in-out;
  object-fit: cover;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  z-index: 3;
}

/* ensure the image is always above bar */
.bar-container {
  position: relative;
  overflow: visible; /* allow badge to appear outside the bar */
}

.bar-info {
  text-align: center;
  margin-top: 1rem;
  font-weight: 600;
  color: #333;
  font-size: 1rem;
}

/* Optional hover glow for interactivity */
.bar-container:hover .bar {
  box-shadow: inset 0 0 10px rgba(0, 123, 255, 0.3);
}

.bar-container:hover .badge {
  transform: translateY(-50%) scale(1.08);
}

.hidden {
  display: none;
}

/* ========== USER MENU ========== */
.user-menu {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.user-icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
}

.user-icon {
  width: 32px;
  height: 32px;
  color: #333;
  transition: 0.3s ease;
}

.user-icon-btn:hover .user-icon {
  color: #007bff;
}


/* Dropdown menu under avatar */
.dropdown {
  position: absolute;
  top: 55px;
  right: 0;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 140px;
  padding: 0.5rem;
  flex-direction: column;
  align-items: stretch;
  z-index: 100;
}

.dropdown button {
  border: none;
  background: none;
  color: #333;
  padding: 0.7rem 1rem;
  text-align: left;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
  width: 100%;
}

.dropdown button:hover {
  background: #6d6969;
}

.watcher-info {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  font-size: 1rem;
  font-weight: 500;
  color: #444;
  margin-bottom: 12px;
}

.eye-icon {
  width: 20px;
  height: 20px;
  stroke: #007bff;
  flex-shrink: 0;
}

/* ========== Battle Page Layout ========== */
.battle-page {
  display: flex;
  justify-content: center;
  align-items: stretch; /* ✅ ensures both columns have equal height */
  gap: 2rem;
  width: 90%;
  margin: 2rem auto;
  flex-wrap: wrap;
}

/* -------- LEFT SIDE: Battle Section -------- */
.battle-section {
  flex: 1 1 65%;
  background: #fff;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* -------- RIGHT SIDE: Live Chat -------- */
.live-chat-section {
  flex: 1 1 30%;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  min-width: 320px;
  /* height: 100%; */
}

/* -------- Chat Inner Layout -------- */
.battle-chat {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.battle-chat h3 {
  text-align: center;
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.chat-box {
  flex: 1;
  background: #f9fafb;
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 0.8rem;
  overflow-y: auto;
  margin-bottom: 1rem;
  height: 100%;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 5px;
}

.chat-box::-webkit-scrollbar {
  width: 6px;
}
.chat-box::-webkit-scrollbar-thumb {
  background: #bdbdbd;
  border-radius: 10px;
}
.chat-box::-webkit-scrollbar-thumb:hover {
  background: #9e9e9e;
}

.chat-form {
  display: flex;
  gap: 0.5rem;
}

.chat-form input {
  flex: 1;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 1rem;
}

.chat-form button {
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
}

/* -------- Responsive Design -------- */
@media (max-width: 900px) {
  .battle-page {
    flex-direction: column;
    align-items: center;
  }

  .battle-section,
  .live-chat-section {
    flex: 1 1 100%;
    width: 100%;
    height: auto; /* ✅ let them grow naturally on mobile */
  }
}

/* --- Modal Overlay --- */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 1;
  visibility: visible;
  transition: all 0.25s ease-in-out;
  z-index: 9999;
}

.modal.hidden {
  opacity: 0;
  visibility: hidden;
}

/* --- Modal Card --- */
.modal-content {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 25px 30px;
  border-radius: 16px;
  width: 350px;
  max-width: 90%;
  text-align: center;
  box-shadow: 0px 8px 25px rgba(0, 0, 0, 0.25);
  animation: popIn 0.25s ease;
}

/* Animation */
@keyframes popIn {
  0% {
    transform: scale(0.85);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Title */
.modal-content h2 {
  margin-bottom: 18px;
  font-size: 22px;
  color: #222;
  font-weight: 600;
}

/* Inputs */
.modal-content input {
  width: 100%;
  padding: 12px;
  margin-bottom: 12px;
  border-radius: 10px;
  border: 1px solid #ddd;
  font-size: 15px;
  outline: none;
  transition: 0.2s;
}

.modal-content input:focus {
  border-color: #007bff;
  box-shadow: 0px 0px 3px rgba(0, 123, 255, 0.3);
}

/* Buttons */
.modal-content .btn-primary {
  width: 100%;
  margin-top: 4px;
}

.modal-content .btn-outline {
  width: 100%;
  margin-top: 12px;
  background: #eee;
  border-color: #ccc;
}

.modal-content .btn-outline:hover {
  background: #ddd;
}


.battle-filters {
  display: flex;
  gap: 15px;
  align-items: center;
  background: #fff;
  padding: 15px 20px;
  border-radius: 12px;
  margin-bottom: 25px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.search-box {
  flex: 1;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid #ccc;
}

.limit-dropdown {
  padding: 10px;
  border-radius: 8px;
}

.trending-filter {
  display: flex;
  align-items: center;
  gap: 5px;
}

.pagination {
  margin-top: 30px;
  display: flex;
  justify-content: center;
  gap: 15px;
  align-items: center;
}

.page-count {
  font-size: 1rem;
  font-weight: 600;
}


#toastr-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toastr {
  min-width: 260px;
  padding: 14px 18px;
  border-radius: 8px;
  color: white;
  font-weight: 500;
  animation: slideIn 0.35s ease, fadeOut 0.5s ease 3.5s forwards;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  gap: 10px;
}

.toastr-success {
  background: #4caf50;
}

.toastr-error {
  background: #f44336;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeOut {
  to {
    opacity: 0;
    transform: translateX(40px);
  }
}
