/* styles.css */

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body {
  background-color: #1a1a1a;
  color: #fff;
  line-height: 1.6;
}

/* Landing Page */
.landing-wrapper {
  text-align: center;
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.landing-header {
  background: linear-gradient(90deg, #ff4500, #ff8c00);
  padding: 30px;
  border-radius: 8px;
  margin-bottom: 30px;
  box-shadow: 0 4px 15px rgba(255, 69, 0, 0.3);
}

.landing-header h1 {
  font-size: 2.8em;
  margin-bottom: 10px;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.landing-header p {
  font-size: 1.3em;
  margin-top: 10px;
  opacity: 0.9;
}

/* Login/Signup/Reset Password Pages */
.login-wrapper {
  text-align: center;
  padding: 20px;
  max-width: 450px;
  margin: 50px auto;
}

.login-header {
  background: linear-gradient(90deg, #ff4500, #ff8c00);
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 4px 15px rgba(255, 69, 0, 0.3);
}

.login-header h1 {
  font-size: 2em;
}

.login-section {
  background-color: #333;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.login-section input {
  display: block;
  width: 100%;
  padding: 12px;
  margin: 12px 0;
  border: 1px solid #444;
  border-radius: 4px;
  background-color: #252525;
  color: #fff;
  font-size: 1em;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.login-section input:focus {
  border-color: #ff4500;
  box-shadow: 0 0 0 2px rgba(255, 69, 0, 0.2);
  outline: none;
}

.login-section p {
  margin-top: 15px;
  color: #ccc;
}

.login-section a {
  color: #ff4500;
  text-decoration: none;
  transition: color 0.3s;
}

.login-section a:hover {
  color: #ff8c00;
  text-decoration: underline;
}

/* Input Wrapper and Icons */
.input-wrapper {
  position: relative;
  margin: 15px 0;
}

.input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #777;
  pointer-events: none;
}

.input-wrapper input {
  padding-left: 40px !important;
  width: 100%;
  padding: 12px;
  border: 1px solid #444;
  border-radius: 4px;
  background-color: #252525;
  color: #fff;
  font-size: 1em;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.input-wrapper input:focus {
  border-color: #ff4500;
  box-shadow: 0 0 0 2px rgba(255, 69, 0, 0.2);
  outline: none;
}

/* Password Input and Toggle */
.password-input-wrapper {
  position: relative;
}

.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #777;
  cursor: pointer;
  transition: color 0.3s;
}

.toggle-password:hover {
  color: #ff4500;
}

/* Password Strength Meter */
.password-strength-meter {
  height: 4px;
  background-color: #444;
  margin: -10px 0 15px 0;
  border-radius: 2px;
  overflow: hidden;
}

.strength-bar {
  height: 100%;
  width: 0;
  transition: width 0.3s, background-color 0.3s;
}

.strength-text {
  display: block;
  text-align: right;
  font-size: 0.8em;
  color: #777;
  margin-top: 3px;
}

/* Success and Error Messages */
.success-text {
  color: #28a745;
  margin: 10px 0;
}

.error-text {
  color: #dc3545;
  margin: 10px 0;
}

.success-message, .error-message {
  padding: 12px;
  border-radius: 4px;
  margin-bottom: 15px;
  position: relative;
  display: none;
}

.success-message {
  background-color: rgba(40, 167, 69, 0.2);
  border: 1px solid #28a745;
  color: #28a745;
}

.error-message {
  background-color: rgba(220, 53, 69, 0.2);
  border: 1px solid #dc3545;
  color: #dc3545;
}

/* Message Container */
.message-container {
  margin: 15px 0;
}

/* Dashboard */
.dashboard-wrapper {
  display: flex;
  min-height: 100vh;
  position: relative;
}

.dashboard-sidebar {
  width: 250px;
  background-color: #222;
  padding: 20px;
  position: fixed;
  height: 100%;
  overflow-y: auto;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
  z-index: 10;
}

.dashboard-logo {
  font-size: 1.8em;
  color: #ff4500;
  margin-bottom: 30px;
  text-align: center;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.dashboard-sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.dashboard-sidebar nav a {
  display: flex;
  align-items: center;
  padding: 15px;
  color: #ccc;
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.3s, color 0.3s;
}

.dashboard-sidebar nav a i {
  margin-right: 10px;
  font-size: 1.2em;
  width: 20px;
  text-align: center;
}

.dashboard-sidebar nav a:hover,
.dashboard-sidebar nav a.active {
  background-color: #ff4500;
  color: #fff;
}

.dashboard-main {
  margin-left: 250px;
  padding: 20px;
  flex: 1;
}

.dashboard-header {
  background: linear-gradient(90deg, #ff4500, #ff8c00);
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  position: relative;
  box-shadow: 0 4px 15px rgba(255, 69, 0, 0.3);
}

.dashboard-header h1 {
  font-size: 2em;
  margin-bottom: 5px;
}

.dashboard-header p {
  margin-top: 10px;
  opacity: 0.9;
}

.dashboard-section {
  background-color: #333;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  border-left: 4px solid #ff4500;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  display: none;
}

.dashboard-section.active {
  display: block;
  animation: fadeIn 0.3s ease-in-out;
}

.dashboard-section h3 {
  color: #ff4500;
  margin-bottom: 20px;
  font-size: 1.4em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.dashboard-section h3 i {
  font-size: 1.2em;
}

/* Tournament Section in Dashboard */
.dashboard-section-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 15px;
}

.view-all-btn {
  font-size: 0.9em;
  display: flex;
  align-items: center;
  gap: 5px;
}

.tournament-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.dashboard-section-footer {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid #444;
  font-size: 0.9em;
  color: #ccc;
}

.dashboard-section-footer a {
  color: #ff4500;
  text-decoration: none;
  transition: color 0.3s;
}

.dashboard-section-footer a:hover {
  color: #ff8c00;
  text-decoration: underline;
}

/* Buttons */
.btn {
  background-color: #ff4500;
  color: #fff;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1em;
  transition: background-color 0.3s, transform 0.1s;
  margin: 10px 5px 10px 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.btn:hover {
  background-color: #ff6a33;
  transform: translateY(-2px);
}

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

.btn:disabled {
  background-color: #555;
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
}

.small-btn {
  padding: 5px 10px;
  font-size: 0.85em;
}

.secondary-btn {
  background-color: #444;
  color: #fff;
}

.secondary-btn:hover {
  background-color: #555;
}

.btn.registered {
  background-color: #28a745;
}

.btn.logout-btn {
  position: absolute;
  right: 15px;
  top: 15px;
  background-color: transparent;
  border: 1px solid #fff;
  color: #fff;
  padding: 8px 15px;
  font-size: 0.9em;
}

.btn.logout-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Sign Out Button */
.sign-out-btn {
  position: absolute;
  right: 15px;
  top: 15px;
  padding: 8px 15px;
  background-color: transparent;
  border: 1px solid #fff;
  color: #fff;
}

.sign-out-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Profile Section */
.profile-card {
  background: #252525;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.profile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.profile-stats {
  display: flex;
  gap: 20px;
}

.stat-label {
  font-weight: normal;
  opacity: 0.8;
  font-size: 0.9em;
}

.stat-value {
  font-weight: bold;
  display: block;
  margin-top: 5px;
  font-size: 1.1em;
}

.verification-status {
  background: #252525;
  padding: 15px;
  border-radius: 8px;
  margin-top: 15px;
}

.badge {
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.8em;
  margin-left: 10px;
  background-color: #dc3545;
}

.badge.verified {
  background-color: #28a745;
}

/* Stats Section */
.stats-overview {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 20px;
}

.stat-box {
  flex: 1;
  min-width: 100px;
  background: #252525;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  border-bottom: 3px solid #ff4500;
}

.stat-box .stat-value {
  font-size: 2em;
  margin-bottom: 5px;
  color: #ff4500;
}

.stat-box .stat-label {
  opacity: 0.8;
  font-size: 0.9em;
}

.stats-list {
  display: grid;
  gap: 15px;
}

.stat-item {
  background: #252525;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.tournament-name {
  font-weight: bold;
  margin-bottom: 8px;
  font-size: 1.1em;
}

.tournament-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  opacity: 0.8;
  margin: 10px 0;
}

.tournament-date {
  font-size: 0.9em;
  opacity: 0.6;
}

/* Tournament Section */
.tournament-filter {
  display: flex;
  margin-bottom: 15px;
  background: #252525;
  border-radius: 4px;
  overflow: hidden;
}

.filter-btn {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  color: #ccc;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
}

.filter-btn.active {
  background: #ff4500;
  color: #fff;
}

.tournaments-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.tournament-card {
  background: #252525;
  border-radius: 8px;
  padding: 15px;
  cursor: pointer;
  transition: all 0.3s;
  border: 2px solid transparent;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.tournament-card:hover {
  background: #2a2a2a;
  transform: translateY(-5px);
}

.tournament-card.selected {
  border-color: #ff4500;
}

.tournament-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.tournament-header h4 {
  font-size: 1.1em;
  color: #ff4500;
}

.tournament-date {
  font-size: 0.9em;
  opacity: 0.8;
}

.tournament-details {
  margin: 15px 0;
  background: #252525;
  padding: 15px;
  border-radius: 8px;
}

.tournament-details h4 {
  color: #ff4500;
  margin-bottom: 10px;
}

.prize, .entry-fee {
  margin: 5px 0;
  font-size: 0.95em;
}

.participants {
  font-size: 0.9em;
  opacity: 0.8;
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.no-tournaments {
  text-align: center;
  padding: 20px;
  opacity: 0.7;
  font-style: italic;
}

/* Rewards & Wallet Section */
.wallet-overview {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
}

.balance-box {
  flex: 1;
  background: #252525;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.balance-label {
  font-size: 0.9em;
  opacity: 0.8;
  margin-bottom: 10px;
  display: block;
}

.balance-value {
  font-size: 1.8em;
  font-weight: bold;
  color: #ff4500;
  display: block;
}

.transaction-tabs {
  display: flex;
  margin-bottom: 15px;
  background: #252525;
  border-radius: 4px;
  overflow: hidden;
}

.tab-btn {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  color: #ccc;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
}

.tab-btn.active {
  background: #ff4500;
  color: #fff;
}

.tab-content {
  display: none;
  background: #252525;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease-in-out;
}

.wallet-form {
  margin: 15px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wallet-form input {
  padding: 12px;
  border: 1px solid #444;
  border-radius: 4px;
  background-color: #333;
  color: #fff;
  font-size: 1em;
}

.wallet-form input:focus {
  border-color: #ff4500;
  outline: none;
}

/* Community Section */
.leaderboard-period {
  display: flex;
  margin-bottom: 15px;
  background: #252525;
  border-radius: 4px;
  overflow: hidden;
}

.period-btn {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  color: #ccc;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
}

.period-btn.active {
  background: #ff4500;
  color: #fff;
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.leaderboard-table th,
.leaderboard-table td {
  padding: 15px;
  text-align: left;
}

.leaderboard-table thead tr {
  background: #252525;
}

.leaderboard-table tbody tr {
  background: #2a2a2a;
}

.leaderboard-table tbody tr:nth-child(even) {
  background: #252525;
}

.leaderboard-table .rank-1 {
  background: linear-gradient(to right, #2a2a2a, rgba(153, 101, 21, 0.3));
}

.leaderboard-table .rank-1 td:first-child {
  position: relative;
}

.leaderboard-table .rank-1 td:first-child:before {
  content: "👑";
  position: absolute;
  left: 0;
  top: -10px;
  font-size: 14px;
}

.leaderboard-table .rank-2 {
  background: linear-gradient(to right, #2a2a2a, rgba(192, 192, 192, 0.2));
}

.leaderboard-table .rank-3 {
  background: linear-gradient(to right, #2a2a2a, rgba(205, 127, 50, 0.2));
}

/* Settings Section */
.settings-form {
  background: #252525;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.settings-form h4 {
  color: #ff4500;
  margin-bottom: 15px;
  font-size: 1.1em;
}

.settings-form input,
.settings-form select {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border: 1px solid #444;
  border-radius: 4px;
  background-color: #333;
  color: #fff;
  font-size: 1em;
}

.settings-form input:focus,
.settings-form select:focus {
  border-color: #ff4500;
  outline: none;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 100;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  overflow: auto;
}

.modal-content {
  background-color: #333;
  margin: 15% auto;
  padding: 20px;
  border-radius: 8px;
  max-width: 500px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  position: relative;
  animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: translateY(-50px); }
  to { opacity: 1; transform: translateY(0); }
}

.close-modal {
  position: absolute;
  right: 15px;
  top: 10px;
  font-size: 24px;
  cursor: pointer;
  color: #999;
}

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

.form-group {
  margin-bottom: 15px;
}

/* Messages */
.message-container {
  margin: 10px 0 20px 0;
}

.success-message, .error-message {
  padding: 12px;
  border-radius: 4px;
  margin-bottom: 15px;
  position: relative;
}

.success-message {
  background-color: rgba(40, 167, 69, 0.2);
  border: 1px solid #28a745;
  color: #28a745;
}

.error-message {
  background-color: rgba(220, 53, 69, 0.2);
  border: 1px solid #dc3545;
  color: #dc3545;
}

/* Animation */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .dashboard-sidebar {
    width: 60px;
    padding: 10px;
  }
  
  .dashboard-logo {
    font-size: 1.5em;
    margin-bottom: 20px;
  }
  
  .dashboard-sidebar nav a span {
    display: none;
  }
  
  .dashboard-sidebar nav a i {
    margin-right: 0;
    font-size: 1.4em;
  }
  
  .dashboard-main {
    margin-left: 60px;
    padding: 15px;
  }
  
  .tournaments-list {
    grid-template-columns: 1fr;
  }
  
  .stats-overview, .wallet-overview {
    flex-direction: column;
  }
  
  .profile-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .profile-stats {
    margin-top: 15px;
    width: 100%;
    justify-content: space-between;
  }
  
  .dashboard-header h1 {
    font-size: 1.6em;
    padding-right: 40px;
  }
  
  .modal-content {
    width: 95%;
    margin: 30% auto;
  }
}

@media (max-width: 480px) {
  .tab-btn, .filter-btn, .period-btn {
    padding: 8px 5px;
    font-size: 0.85em;
  }
  
  .tournament-stats {
    flex-direction: column;
    gap: 5px;
  }
  
  .dashboard-section h3 {
    font-size: 1.2em;
  }
  
  .balance-value {
    font-size: 1.5em;
  }
}

/* No Data States */
.no-data {
  opacity: 0.7;
  font-style: italic;
  text-align: center;
  padding: 20px;
}

/* Transaction History */
.transaction-item {
  padding: 12px;
  border-bottom: 1px solid #444;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.transaction-item:last-child {
  border-bottom: none;
}

.transaction-details {
  flex: 1;
}

.transaction-type {
  font-size: 0.85em;
  padding: 3px 8px;
  border-radius: 12px;
  margin-left: 10px;
}

.transaction-type.deposit {
  background-color: #28a745;
  color: #fff;
}

.transaction-type.withdrawal {
  background-color: #dc3545;
  color: #fff;
}

.transaction-type.entry-fee {
  background-color: #ffc107;
  color: #333;
}

.transaction-type.reward {
  background-color: #17a2b8;
  color: #fff;
}

/* 404 Page Styles */
.error-page-wrapper {
  text-align: center;
  padding: 40px 20px;
  max-width: 600px;
  margin: 50px auto;
}

.error-page-header {
  background: linear-gradient(90deg, #ff4500, #ff8c00);
  padding: 30px;
  border-radius: 8px;
  margin-bottom: 30px;
  box-shadow: 0 4px 15px rgba(255, 69, 0, 0.3);
}

.error-page-header h1 {
  font-size: 3.5em;
  margin-bottom: 10px;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.error-page-header p {
  font-size: 1.3em;
  margin-top: 10px;
  opacity: 0.9;
}

.error-page-icon {
  font-size: 5em;
  margin: 20px 0;
  color: #ff4500;
  opacity: 0.8;
}

.error-page-section {
  background-color: #333;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  margin-bottom: 20px;
}

.error-page-section p {
  margin-bottom: 20px;
  font-size: 1.1em;
}

.btn-group {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Tournaments Page Styles */
.tournaments-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.tournaments-header {
  background: linear-gradient(90deg, #ff4500, #ff8c00);
  padding: 20px;
  color: #fff;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-container h1 {
  font-size: 2.2em;
  margin-bottom: 5px;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.logo-container p {
  font-size: 1.1em;
  opacity: 0.9;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-link {
  color: #fff;
  text-decoration: none;
  font-size: 1em;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.3s ease;
}

.nav-link:hover {
  color: rgba(255, 255, 255, 0.8);
}

.tournaments-main {
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 20px;
}

.tournament-controls {
  margin-bottom: 20px;
  background-color: #333;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.search-filter-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-bottom: 15px;
  gap: 15px;
}

.search-container {
  display: flex;
  flex: 1;
  min-width: 200px;
  max-width: 400px;
}

.search-input {
  flex: 1;
  padding: 10px 15px;
  border: 1px solid #444;
  border-radius: 4px 0 0 4px;
  background-color: #252525;
  color: #fff;
  font-size: 1em;
}

.search-input:focus {
  outline: none;
  border-color: #ff4500;
}

#search-btn {
  border-radius: 0 4px 4px 0;
  margin: 0;
}

.filter-container {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  flex: 2;
}

.filter-group {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 150px;
}

.filter-group label {
  font-size: 0.9em;
  margin-bottom: 5px;
  color: #ccc;
}

.filter-select,
.sort-select {
  padding: 10px;
  background-color: #252525;
  border: 1px solid #444;
  border-radius: 4px;
  color: #fff;
  font-size: 1em;
}

.filter-select:focus,
.sort-select:focus {
  outline: none;
  border-color: #ff4500;
}

.sort-container {
  display: flex;
  align-items: center;
  gap: 15px;
}

.sort-container label {
  color: #ccc;
  font-size: 0.9em;
}

.tournament-list-section {
  margin-bottom: 40px;
}

.tournament-list-section h2,
.featured-tournaments h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ff4500;
  margin-bottom: 20px;
  font-size: 1.8em;
}

.tournaments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.tournament-card {
  background-color: #333;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  border: 2px solid transparent;
}

.tournament-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 69, 0, 0.3);
}

.tournament-image {
  height: 160px;
  position: relative;
  overflow: hidden;
}

.tournament-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tournament-status {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 0.8em;
  font-weight: bold;
  color: #fff;
}

.status-open {
  background-color: #28a745;
}

.status-live {
  background-color: #dc3545;
  animation: pulse 2s infinite;
}

.status-completed {
  background-color: #6c757d;
}

.status-upcoming {
  background-color: #17a2b8;
}

.registration-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background-color: #ff4500;
  color: #fff;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 0.75em;
  font-weight: bold;
}

.tournament-content {
  padding: 15px;
}

.tournament-content h3 {
  margin-bottom: 10px;
  font-size: 1.2em;
  color: #ff4500;
}

.tournament-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 15px;
}

.tournament-detail {
  font-size: 0.9em;
  display: flex;
  align-items: center;
  gap: 5px;
  color: #ccc;
}

.tournament-detail i {
  color: #ff4500;
  font-size: 0.9em;
}

.tournament-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #444;
}

.time-remaining {
  font-size: 0.85em;
  color: #ccc;
}

.view-details-btn {
  padding: 5px 10px;
  font-size: 0.85em;
}

/* Featured Tournaments */
.featured-tournaments {
  margin-bottom: 40px;
}

.featured-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.featured-tournament {
  flex: 1;
  min-width: 300px;
  max-width: 100%;
  background-color: #333;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  position: relative;
}

.featured-tournament:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.featured-image {
  height: 200px;
  position: relative;
  overflow: hidden;
}

.featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.8));
}

.featured-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: linear-gradient(90deg, #ff4500, #ff8c00);
  color: #fff;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 0.75em;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 5px;
}

.featured-content {
  padding: 20px;
}

.featured-content h3 {
  margin-bottom: 10px;
  font-size: 1.4em;
  color: #ff4500;
}

.featured-description {
  margin-bottom: 15px;
  font-size: 0.95em;
  color: #ccc;
}

.featured-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
}

.featured-prize, 
.featured-date {
  display: flex;
  align-items: center;
  gap: 8px;
}

.featured-prize i, 
.featured-date i {
  color: #ff4500;
}

.featured-btn {
  width: 100%;
}

/* Tournament Loading */
.tournament-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: #ccc;
  text-align: center;
}

.tournament-loading i {
  font-size: 2em;
  margin-bottom: 15px;
  color: #ff4500;
}

/* No Tournaments */
.no-tournaments {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: #ccc;
  text-align: center;
  background-color: #333;
  border-radius: 8px;
}

.no-tournaments i, 
.no-featured i {
  font-size: 2em;
  margin-bottom: 15px;
  color: #ff4500;
}

.no-tournaments p, 
.no-featured p {
  margin-bottom: 15px;
}

/* Pagination Controls */
.pagination-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-top: 20px;
}

#page-indicator {
  padding: 8px 12px;
  background-color: #252525;
  border-radius: 4px;
  color: #ccc;
}

/* Error State */
.error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: #dc3545;
  text-align: center;
  background-color: rgba(220, 53, 69, 0.1);
  border-radius: 8px;
  border: 1px solid rgba(220, 53, 69, 0.3);
}

.error-state i {
  font-size: 2em;
  margin-bottom: 15px;
}

.error-state p {
  margin-bottom: 15px;
}

/* Tournament Details Modal Content */
.tournament-modal-content {
  max-width: 800px;
  width: 90%;
  padding: 0;
  overflow: hidden;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.tournament-details-header {
  position: relative;
  height: 250px;
  overflow: hidden;
}

.tournament-header-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tournament-status-wrapper {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 5;
}

.tournament-details-content {
  padding: 25px;
  overflow-y: auto;
}

.tournament-details-content h2 {
  font-size: 2em;
  margin-bottom: 15px;
  color: #ff4500;
}

.tournament-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #444;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.meta-item i {
  color: #ff4500;
}

.tournament-description {
  margin-bottom: 25px;
  line-height: 1.6;
}

.tournament-info-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 30px;
}

.info-card {
  flex: 1;
  min-width: 200px;
  background-color: #252525;
  border-radius: 8px;
  padding: 15px;
  text-align: center;
}

.prize-card {
  border-left: 4px solid #28a745;
}

.entry-card {
  border-left: 4px solid #ff4500;
}

.format-card {
  border-left: 4px solid #17a2b8;
}

.card-title {
  font-size: 0.9em;
  color: #ccc;
  margin-bottom: 5px;
}

.card-value {
  font-size: 1.6em;
  font-weight: bold;
  margin: 5px 0;
}

.card-subtitle {
  font-size: 0.85em;
  color: #999;
}

.tournament-details-sections {
  margin-bottom: 30px;
}

.details-section {
  background-color: #252525;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}

.details-section h3 {
  color: #ff4500;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-content {
  line-height: 1.6;
  color: #ccc;
}

.prize-distribution {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.prize-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #444;
}

.prize-item:last-child {
  border-bottom: none;
}

.position {
  display: flex;
  align-items: center;
  gap: 8px;
}

.position-1 {
  color: gold;
}

.position-2 {
  color: silver;
}

.position-3 {
  color: #cd7f32;
}

.amount {
  font-weight: bold;
}

.registration-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  background-color: #252525;
  border-radius: 8px;
  padding: 20px;
}

/* Registration Status Styles */
.registered-status, 
.completed-status, 
.ongoing-status, 
.closed-status, 
.login-required-status, 
.insufficient-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95em;
}

.registered-status {
  color: #28a745;
}

.completed-status {
  color: #6c757d;
}

.ongoing-status {
  color: #dc3545;
}

.closed-status {
  color: #ffc107;
}

.login-required-status {
  color: #17a2b8;
}

.insufficient-status {
  color: #dc3545;
}

/* Login Reminder Modal */
.reminder-modal-content {
  text-align: center;
  padding: 30px;
}

.reminder-modal-content h3 {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
  color: #ff4500;
}

.modal-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
  flex-wrap: wrap;
}

/* Animations */
@keyframes pulse {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
  100% {
    opacity: 1;
  }
}

/* Tournaments footer */
.tournaments-footer {
  margin-top: 50px;
  background-color: #222;
  padding: 40px 20px;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
}

.footer-logo h3 {
  font-size: 1.5em;
  margin-bottom: 5px;
  color: #ff4500;
}

.footer-logo p {
  color: #ccc;
  font-size: 0.9em;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: #ff4500;
}

.social-links {
  display: flex;
  gap: 15px;
}

.social-icon {
  color: #ccc;
  font-size: 1.2em;
  transition: color 0.3s;
}

.social-icon:hover {
  color: #ff4500;
}

.copyright {
  max-width: 1200px;
  margin: 20px auto 0;
  padding-top: 20px;
  border-top: 1px solid #444;
  text-align: center;
  color: #888;
  font-size: 0.9em;
}

/* Responsive adjustments for tournaments page */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 15px;
  }
  
  .logo-container {
    text-align: center;
  }
  
  .nav-links {
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .search-filter-container {
    flex-direction: column;
  }
  
  .search-container {
    max-width: 100%;
  }
  
  .tournament-info-cards {
    flex-direction: column;
  }
  
  .registration-container {
    flex-direction: column;
    align-items: stretch;
  }
  
  .tournaments-grid {
    grid-template-columns: 1fr;
  }
  
  .featured-container {
    flex-direction: column;
  }
  
  .footer-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

/* New Index Error State Styles */
.index-error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  margin: 20px 0;
  color: #ff9800;
  text-align: center;
  background-color: rgba(255, 152, 0, 0.1);
  border-radius: 8px;
  border: 1px solid rgba(255, 152, 0, 0.3);
}

.index-error-state i {
  font-size: 2.5em;
  margin-bottom: 15px;
}

.index-error-state h3 {
  margin-bottom: 10px;
  color: #ff9800;
}

.index-error-state p {
  margin-bottom: 15px;
  max-width: 500px;
}

.index-action {
  text-align: left;
  background-color: rgba(0, 0, 0, 0.1);
  padding: 15px;
  border-radius: 6px;
  width: 100%;
  max-width: 500px;
  margin-top: 10px;
}

.index-action ol {
  margin: 15px 0 15px 20px;
  line-height: 1.6;
}

.index-action li {
  margin-bottom: 8px;
}

.index-action a {
  display: block;
  margin: 15px 0;
  text-align: center;
}

/* Admin Panel Button Improvements */
.admin-panel-wrapper .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.2s ease;
  padding: 10px 16px;
  cursor: pointer;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border: none;
}

.admin-panel-wrapper .btn i {
  font-size: 16px;
}

.admin-panel-wrapper .primary-btn {
  background-color: #4c84ff;
  color: white;
}

.admin-panel-wrapper .primary-btn:hover {
  background-color: #3a70e3;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.admin-panel-wrapper .secondary-btn {
  background-color: #e6e8ea;
  color: #333;
}

.admin-panel-wrapper .secondary-btn:hover {
  background-color: #d8dadc;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.admin-panel-wrapper .warning-btn {
  background-color: #ff5252;
  color: white;
}

.admin-panel-wrapper .warning-btn:hover {
  background-color: #e04444;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Card Actions Buttons Layout */
.admin-panel-wrapper .card-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 12px;
}

/* Tournament card button group */
.tournament-card .card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tournament-card .card-actions .btn {
  flex: 1;
  min-width: 80px;
}

.tournament-card .view-btn {
  background-color: #4c84ff;
  color: white;
}

.tournament-card .edit-btn {
  background-color: #ffb545;
  color: white;
}

.tournament-card .delete-btn {
  background-color: #ff5252;
  color: white;
}

/* Form buttons organization */
.form-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

/* Improving form buttons */
.form-buttons .btn {
  min-width: 120px;
}

/* Admin UI Improvements */
.admin-section {
  background-color: #f6f8fa;
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Improving sidebar active state */
.admin-sidebar .sidebar-item.active {
  background-color: rgba(76, 132, 255, 0.1);
  color: #4c84ff;
  border-left: 3px solid #4c84ff;
  font-weight: 500;
}

/* Improving modal button layout */
.modal .form-buttons {
  border-top: 1px solid #eaeaea;
  padding-top: 16px;
  margin-top: 24px;
}

/* Action button groups */
.action-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.action-btn-group .btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 100px;
}

/* Status badges */
.status-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
  text-transform: capitalize;
}

.status-badge.open {
  background-color: #4caf50;
  color: white;
}

.status-badge.upcoming {
  background-color: #2196f3;
  color: white;
}

.status-badge.ongoing {
  background-color: #ff9800;
  color: white;
}

.status-badge.completed {
  background-color: #9e9e9e;
  color: white;
}

.status-badge.pending {
  background-color: #ffc107;
  color: #333;
}

.status-badge.approved {
  background-color: #4caf50;
  color: white;
}

.status-badge.rejected {
  background-color: #f44336;
  color: white;
}

/* User action buttons */
.user-card {
  position: relative;
  background-color: white;
  padding: 16px;
  margin-bottom: 16px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.user-card .user-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

/* Admin panel section headers improved */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 12px;
  margin-bottom: 24px;
}

.section-header h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #333;
}

.section-header h2 i {
  color: #4c84ff;
}
