@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Color Palette - Purple/Green/Blue theme */
  --purple-dark: #1a0033;
  --purple-medium: #4a148c;
  --purple-light: #7b1fa2;
  --green-dark: #1b5e20;
  --green-medium: #2e7d32;
  --green-light: #66bb6a;
  --blue-dark: #01579b;
  --blue-medium: #0277bd;
  --blue-light: #29b6f6;

  /* Gradients */
  --gradient-main: linear-gradient(135deg, #1a0033 0%, #01579b 50%, #1b5e20 100%);
  --gradient-card: linear-gradient(135deg, rgba(74, 20, 140, 0.2) 0%, rgba(2, 119, 189, 0.2) 100%);
  --gradient-accent: linear-gradient(90deg, #7b1fa2 0%, #29b6f6 50%, #66bb6a 100%);

  /* Glass effect */
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);

  /* Typography */
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  background: url('../tree-background.jpg') center center / cover no-repeat fixed;
  color: #ffffff;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Dark overlay for better readability */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  pointer-events: none;
  z-index: 0;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 0.5;
  }

  50% {
    opacity: 1;
  }
}

/* Top Navigation */
.top-nav {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 15px 0;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: center;
  /* Changed from space-between to center */
  align-items: center;
  gap: 20px;
}

.nav-title {
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
  white-space: nowrap;
}

.nav-tabs {
  display: flex;
  gap: 10px;
}

.nav-tab {
  padding: 10px 24px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-main);
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.nav-tab:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.2);
}

.nav-tab.active {
  background: linear-gradient(135deg, var(--purple-light) 0%, var(--blue-medium) 100%);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(123, 31, 162, 0.4);
}

/* Page Content */
.page-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

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

/* Main Header */
.main-header {
  text-align: center;
  margin-top: 40px;
  margin-bottom: 30px;
  position: relative;
  z-index: 2;
  /* Ensure text is above background but allows it to show through */
}

.header-action {
  display: flex;
  justify-content: center;
  margin-top: 16px;
  margin-bottom: 8px;
}

.main-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  font-weight: 900;
  line-height: 1.1;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
  /* Strong shadow for readability */
}

.title-line {
  font-size: 3rem;
  background: linear-gradient(135deg, #00C6FF 0%, #0072FF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
  text-shadow:
    0 0 10px rgba(0, 114, 255, 0.45),
    0 0 18px rgba(0, 114, 255, 0.35);
}

.main-title .title-line:nth-of-type(2) {
  text-shadow:
    0 0 10px rgba(104, 203, 92, 0.5),
    0 0 18px rgba(104, 203, 92, 0.4);
}

.title-symbol {
  font-size: 2rem;
  color: #fff;
  opacity: 0.9;
  margin: 5px 0;
}

.title-result {
  font-size: 3.5rem;
  background: linear-gradient(135deg, #a8ff78 0%, #78ffd6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-top: 10px;
  filter: drop-shadow(0 2px 10px rgba(0, 255, 100, 0.3));
}

.subtitle {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.1rem;
  margin: 0;
}

/* Footer Action */
.footer-action {
  margin-top: 40px;
  display: flex;
  justify-content: center;
  padding-bottom: 20px;
}

.suidex-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.1);
  padding: 12px 24px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  text-decoration: none;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.suidex-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.suidex-btn span {
  color: #fff;
  font-weight: 600;
  font-size: 1.1rem;
}

.suidex-logo {
  height: 32px;
  width: auto;
  object-fit: contain;
}

/* Container */
.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
  position: relative;
  z-index: 1;
}

/* Header */
.header {
  text-align: center;
  padding: 30px 20px;
  margin-bottom: 30px;
  position: relative;
}

.mascots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.mascot {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--glass-border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  animation: float 3s ease-in-out infinite;
}

.mascot:nth-child(1) {
  animation-delay: 0s;
}

.mascot:nth-child(2) {
  animation-delay: 1.5s;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-10px);
  }
}

.title {
  font-size: 2rem;
  font-weight: 800;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 10px;
  text-shadow: 0 0 30px rgba(123, 31, 162, 0.5);
}

.subtitle {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 400;
}

/* Glass Card */
.card {
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px;
  padding: 30px;
  margin-bottom: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.2);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 15px;
  color: #ffffff;
}

.card-content {
  color: rgba(255, 255, 255, 0.9);
}

/* Info Banner */
.info-banner {
  background: var(--gradient-card);
  border-left: 4px solid var(--green-light);
  padding: 15px 20px;
  border-radius: 12px;
  margin-bottom: 20px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

.info-label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

.info-value {
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
}

/* Form */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.9);
}

.form-input {
  width: 100%;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  color: #ffffff;
  font-size: 1rem;
  font-family: var(--font-main);
  transition: all 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--blue-light);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 3px rgba(41, 182, 246, 0.1);
}

.form-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.form-input:disabled {
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.95);
  opacity: 1;
  cursor: not-allowed;
  border-color: rgba(255, 255, 255, 0.05);
}

/* Buttons */
.btn {
  padding: 14px 28px;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-main);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--purple-light) 0%, var(--blue-medium) 100%);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(123, 31, 162, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(123, 31, 162, 0.6);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--green-medium) 0%, var(--green-light) 100%);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(46, 125, 50, 0.4);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(46, 125, 50, 0.6);
}

.btn-full {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Alert Messages */
.alert {
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  font-size: 0.95rem;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.alert-success {
  background: rgba(102, 187, 106, 0.2);
  border: 1px solid var(--green-light);
  color: var(--green-light);
}

.alert-error {
  background: rgba(244, 67, 54, 0.2);
  border: 1px solid #f44336;
  color: #ff6b6b;
}

.alert-info {
  background: rgba(41, 182, 246, 0.2);
  border: 1px solid var(--blue-light);
  color: var(--blue-light);
}

/* Leaderboard */
.leaderboard {
  list-style: none;
  padding: 0;
}

.leaderboard-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
}

.leaderboard-item:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(4px);
}

.leaderboard-rank {
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  min-width: 40px;
}

.leaderboard-wallet {
  flex: 1;
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin: 0 15px;
}

.leaderboard-entries {
  background: var(--gradient-accent);
  padding: 6px 14px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.9rem;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Loading Spinner */
.spinner {
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top: 3px solid var(--blue-light);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Admin Panel Specific */
.admin-header {
  background: var(--gradient-card);
  padding: 20px;
  border-radius: 16px;
  margin-bottom: 30px;
  text-align: center;
}

.admin-role-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-top: 10px;
}

.role-aqua {
  background: linear-gradient(135deg, var(--blue-medium) 0%, var(--blue-light) 100%);
  color: #ffffff;
}

.role-tree {
  background: linear-gradient(135deg, var(--green-medium) 0%, var(--green-light) 100%);
  color: #ffffff;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 768px) {
  .admin-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Table */
.table-container {
  overflow-x: auto;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--glass-border);
}

th {
  font-weight: 700;
  color: var(--blue-light);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

td {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
}

tr:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* Responsive */
@media (max-width: 600px) {
  .nav-container {
    flex-direction: column;
    gap: 15px;
  }

  .nav-title {
    font-size: 1.2rem;
  }

  .nav-tabs {
    width: 100%;
    justify-content: center;
  }

  .nav-tab {
    padding: 8px 16px;
    font-size: 0.9rem;
  }

  .container {
    padding: 15px;
  }

  .title {
    font-size: 1.5rem;
  }

  .mascot {
    width: 60px;
    height: 60px;
  }

  .card {
    padding: 20px;
  }

  .leaderboard-wallet {
    font-size: 0.75rem;
  }
}

/* Tab Navigation */
.tab-container {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 8px;
  margin-bottom: 20px;
  display: flex;
  gap: 8px;
}

.tab-button {
  flex: 1;
  padding: 12px 20px;
  background: transparent;
  border: none;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-main);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.tab-button:hover {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.05);
}

.tab-button.active {
  background: linear-gradient(135deg, var(--purple-light) 0%, var(--blue-medium) 100%);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(123, 31, 162, 0.4);
}

.tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

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

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.mt-20 {
  margin-top: 20px;
}

.mb-20 {
  margin-bottom: 20px;
}

.hidden {
  display: none;
}