/* Pandify Discord Bot Website - Dark Theme with Bamboo Elements */
@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@300;400;500;700&family=Share+Tech+Mono&display=swap');

:root {
  /* Pandify Dark Theme Colors */
  --bg-primary: #0f0f0f;
  --bg-secondary: #1a1a1a;
  --bg-tertiary: #171717;
  --bg-card: rgba(20, 20, 20, 0.9);
  
  /* Bamboo Green Accents */
  --bamboo-primary: #4a6741;
  --bamboo-secondary: #6b8e5a;
  --bamboo-light: #8fbc7f;
  --bamboo-accent: #3d5a34;
  
  /* Text Colors */
  --text-primary: #e0e0e0;
  --text-secondary: #b0b0b0;
  --text-muted: #808080;
  --text-success: var(--bamboo-light);
  --text-warning: #ffb347;
  --text-danger: #ff6b6b;
  
  /* Pandify Alert Colors */
  --pandify-red: #cc0000;
  --pandify-orange: #ff6600;
  
  /* Border and Effects */
  --border-color: #333333;
  --border-bamboo: var(--bamboo-accent);
  --shadow-primary: 0 4px 16px rgba(0, 0, 0, 0.6);
  --shadow-bamboo: 0 2px 8px rgba(74, 103, 65, 0.3);
}

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

body {
  font-family: 'Roboto Mono', monospace;
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
}

/* Pandify Header Styling */
.pandify-header {
  background: linear-gradient(90deg, var(--bg-tertiary) 0%, var(--bamboo-accent) 100%);
  padding: 1rem 0;
  border-bottom: 3px solid var(--bamboo-primary);
  box-shadow: var(--shadow-primary);
}

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

.logo {
  font-family: 'Share Tech Mono', monospace;
  font-size: 2rem;
  font-weight: 700;
  color: var(--bamboo-light);
  text-transform: uppercase;
  letter-spacing: 2px;
  position: relative;
}

.logo::before {
  content: "🎋 ";
  color: var(--bamboo-light);
}

.logo::after {
  content: " Bot";
  font-size: 0.8em;
  color: var(--text-muted);
  vertical-align: super;
}

/* Navigation */
.nav-menu {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-item a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border: 1px solid transparent;
  transition: all 0.3s ease;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 1px;
}

.nav-item a:hover {
  color: var(--bamboo-light);
  border-color: var(--border-bamboo);
  background: rgba(74, 103, 65, 0.1);
}

/* Main Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem 2rem 2rem;
}/* Pandify Cards */
.pandify-card {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-primary);
  position: relative;
  overflow: hidden;
}

.pandify-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--bamboo-primary), var(--bamboo-secondary), var(--bamboo-light));
}

.pandify-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.pandify-title {
  font-family: 'Share Tech Mono', monospace;
  font-size: 1.5rem;
  color: var(--bamboo-light);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-right: 1rem;
}

.classification {
  background: var(--bamboo-accent);
  color: var(--text-primary);
  padding: 0.3rem 1rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  flex-shrink: 0;
}

/* Bamboo Decorative Elements */
.bamboo-divider {
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--bamboo-primary), var(--bamboo-secondary), var(--bamboo-primary), transparent);
  margin: 2rem 0;
  position: relative;
}

.bamboo-divider::before,
.bamboo-divider::after {
  content: "🎋";
  position: absolute;
  top: -10px;
  font-size: 1.2rem;
  color: var(--bamboo-light);
}

.bamboo-divider::before {
  left: 10px;
}

.bamboo-divider::after {
  right: 10px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  background: linear-gradient(135deg, var(--bamboo-primary), var(--bamboo-secondary));
  color: var(--text-primary);
  text-decoration: none;
  border: none;
  border-radius: 4px;
  font-family: 'Roboto Mono', monospace;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-bamboo);
}

.btn:hover {
  background: linear-gradient(135deg, var(--bamboo-secondary), var(--bamboo-light));
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(74, 103, 65, 0.4);
}

.btn-danger {
  background: linear-gradient(135deg, var(--pandify-red), #aa0000);
}

.btn-danger:hover {
  background: linear-gradient(135deg, #aa0000, var(--pandify-red));
}

/* Server Grid */
.server-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.server-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  position: relative;
}

.server-card:hover {
  border-color: var(--border-bamboo);
  transform: translateY(-5px);
  box-shadow: var(--shadow-bamboo);
}

.server-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--bamboo-primary);
  border-radius: 8px 8px 0 0;
}

.server-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.server-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid var(--bamboo-accent);
}

.server-details h3 {
  color: var(--bamboo-light);
  margin-bottom: 0.5rem;
}

.server-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

.stat {
  text-align: center;
  padding: 0.5rem;
  background: rgba(74, 103, 65, 0.1);
  border-radius: 4px;
}

.stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--bamboo-light);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* Alert Styling */
.alert {
  padding: 1rem;
  border-radius: 4px;
  margin-bottom: 1rem;
  border-left: 4px solid;
}

.alert-success {
  background: rgba(143, 188, 127, 0.1);
  border-left-color: var(--bamboo-light);
  color: var(--text-success);
}

.alert-danger {
  background: rgba(204, 0, 0, 0.1);
  border-left-color: var(--pandify-red);
  color: var(--text-danger);
}

/* Login Page */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 80vh;
}

.login-card {
  background: var(--bg-card);
  padding: 3rem;
  border-radius: 12px;
  border: 2px solid var(--border-bamboo);
  box-shadow: var(--shadow-primary);
  text-align: center;
  max-width: 400px;
  width: 100%;
}

.login-title {
  font-family: 'Share Tech Mono', monospace;
  font-size: 2rem;
  color: var(--bamboo-light);
  margin-bottom: 2rem;
  text-transform: uppercase;
}

/* Loading Animation */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid var(--border-color);
  border-radius: 50%;
  border-top-color: var(--bamboo-light);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Enhanced Mobile Responsive Design */
@media (max-width: 1024px) {
  .container {
    padding: 3rem 1.5rem 2rem 1.5rem;
  }
  
  .server-stats {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
  }
  
  .pandify-card {
    margin-bottom: 1.5rem;
  }
}

@media (max-width: 768px) {
  /* Header Mobile */
  .header-content {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }
  
  .nav-menu {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
  }
  
  .nav-item a {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
  
  /* Container Mobile */
  .container {
    padding: 2rem 1rem 1rem 1rem;
    max-width: 100%;
  }
  
  /* Cards Mobile */
  .pandify-card {
    margin-bottom: 1rem;
    padding: 1rem;
  }
  
  .pandify-card-header {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
  
  .pandify-title {
    font-size: 1.2rem;
  }
  
  /* Grid Systems Mobile */
  .server-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .server-stats {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }
  
  /* Typography Mobile */
  .logo {
    font-size: 1.5rem;
  }
  
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.4rem; }
  h3 { font-size: 1.2rem; }
  
  /* Buttons Mobile */
  .btn {
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
    width: 100%;
    margin-bottom: 0.5rem;
  }
  
  /* Tables Mobile */
  table {
    font-size: 0.8rem;
  }
  
  table th,
  table td {
    padding: 0.5rem !important;
  }
  
  /* Server Cards Mobile */
  .server-card {
    padding: 1rem;
  }
  
  .server-card h3 {
    font-size: 1rem;
  }
  
  /* Form Elements Mobile */
  input, select, textarea {
    font-size: 16px !important; /* Prevents zoom on iOS */
    padding: 0.8rem;
  }
  
  /* Forms Mobile Layout */
  form[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
  
  form[style*="grid-template-columns"] > div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 1rem;
  }
  
  form button {
    margin-top: 1rem;
    width: 100%;
  }
  
  /* Footer Mobile */
  footer div[style*="display: flex"] {
    flex-direction: column !important;
    gap: 1rem !important;
  }
  
  footer a {
    display: block;
    padding: 0.5rem;
  }
  
  /* Profile Layout Mobile */
  .profile-header {
    grid-template-columns: 1fr !important;
    text-align: center !important;
    gap: 1rem !important;
  }
  
  .profile-avatar {
    width: 80px !important;
    height: 80px !important;
    margin: 0 auto !important;
  }
  
  /* Stats Mobile */
  .stat {
    padding: 1rem;
    text-align: center;
  }
  
  .stat-value {
    font-size: 1.5rem;
  }
  
  .stat-label {
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  /* Extra Small Mobile */
  .container {
    padding: 1rem 0.5rem;
  }
  
  .pandify-card {
    padding: 0.8rem;
    margin-bottom: 0.8rem;
  }
  
  .nav-menu {
    flex-direction: column;
    width: 100%;
    gap: 0.5rem;
  }
  
  .nav-item {
    width: 100%;
  }
  
  .nav-item a {
    display: block;
    text-align: center;
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-secondary);
  }
  
  .nav-item a {
    display: block;
    text-align: center;
    width: 100%;
    padding: 0.8rem;
  }
  
  /* Typography Extra Small */
  .pandify-title {
    font-size: 1rem;
  }
  
  .logo {
    font-size: 1.3rem;
  }
  
  /* Tables Extra Small */
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  table {
    min-width: 400px;
    font-size: 0.7rem;
  }
  
  /* Buttons Extra Small */
  .btn {
    padding: 0.7rem 1rem;
    font-size: 0.8rem;
  }
  
  /* Server Stats Extra Small */
  .stat-value {
    font-size: 1.2rem;
  }
  
  .stat-label {
    font-size: 0.7rem;
  }
  
  /* Profile Image Mobile */
  img[alt="Avatar"], 
  img[alt="Server Icon"] {
    max-width: 60px !important;
    max-height: 60px !important;
  }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
  .btn:hover {
    transform: none;
    box-shadow: var(--shadow-bamboo);
  }
  
  .server-card:hover {
    transform: none;
  }
  
  /* Larger touch targets */
  .nav-item a {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .btn {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* Landscape Mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .header-content {
    flex-direction: row;
    justify-content: space-between;
  }
  
  .nav-menu {
    flex-direction: row;
    flex-wrap: wrap;
  }
  
  .container {
    padding: 1rem;
  }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .pandify-card {
    border-width: 0.5px;
  }
  
  .bamboo-divider {
    height: 0.5px;
  }
}

/* Privacy Toggle Switch */
.privacy-toggle {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 30px;
  margin: 0;
}

.privacy-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.privacy-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-secondary);
  transition: 0.3s ease;
  border-radius: 30px;
  border: 2px solid var(--border-color);
}

.privacy-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 2px;
  background-color: var(--text-muted);
  transition: 0.3s ease;
  border-radius: 50%;
}

input:checked + .privacy-slider {
  background-color: var(--bamboo-secondary);
  border-color: var(--bamboo-light);
}

input:focus + .privacy-slider {
  box-shadow: 0 0 8px rgba(74, 103, 65, 0.6);
}

input:checked + .privacy-slider:before {
  transform: translateX(28px);
  background-color: var(--bamboo-light);
}

.privacy-slider:hover {
  border-color: var(--bamboo-accent);
}

/* Mobile optimizations for toggle */
@media (max-width: 768px) {
  .privacy-toggle {
    width: 50px;
    height: 25px;
  }
  
  .privacy-slider:before {
    height: 17px;
    width: 17px;
    left: 2px;
    bottom: 2px;
  }
  
  input:checked + .privacy-slider:before {
    transform: translateX(23px);
  }
}

/* Twemoji Emoji Styling */
.emoji {
  width: 1.2em;
  height: 1.2em;
  margin: 0 0.1em;
  vertical-align: -0.1em;
  display: inline-block;
}

/* Larger emojis for specific contexts */
.pandify-title .emoji,
.stat-label .emoji,
h1 .emoji,
h2 .emoji,
h3 .emoji {
  width: 1.3em;
  height: 1.3em;
  vertical-align: -0.15em;
}

/* Extra large emojis for decorative purposes */
.emoji-large {
  width: 2em;
  height: 2em;
  vertical-align: -0.3em;
}

.emoji-xlarge {
  width: 3em;
  height: 3em;
  vertical-align: -0.5em;
}

/* Emoji animations */
.emoji:hover {
  transform: scale(1.1);
  transition: transform 0.2s ease;
}

/* Leaderboard specific emoji styling */
.leaderboard .emoji {
  width: 1.5em;
  height: 1.5em;
  vertical-align: -0.2em;
}

/* Force emoji parsing for all pandify cards and content */
.pandify-card,
.pandify-title,
.pandify-header,
.server-card,
.alert,
.btn {
  font-feature-settings: "liga" 1;
}

/* Ensure emojis are properly spaced in all contexts */
.emoji {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "EmojiOne Color", "Android Emoji", "Twemoji Mozilla", sans-serif;
  font-style: normal;
  font-weight: normal;
  line-height: 1;
}

/* Language Selector Styling */
.language-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 1rem;
  border-left: 1px solid var(--border-color);
  padding-left: 1rem;
}

.lang-option {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 16px;
  user-select: none;
}

.lang-option:hover {
  background: var(--bamboo-accent);
  border-color: var(--bamboo-light);
  transform: scale(1.1);
  box-shadow: var(--shadow-bamboo);
}

.lang-option.active {
  background: var(--bamboo-primary);
  border-color: var(--bamboo-light);
  box-shadow: 0 0 0 2px rgba(74, 103, 65, 0.3);
}

.lang-option:active {
  transform: scale(0.95);
}

/* Mobile responsive language selector */
@media (max-width: 768px) {
  .language-selector {
    margin-left: 0;
    padding-left: 0;
    border-left: none;
    gap: 0.5rem;
    order: -1; /* Move language selector to top on mobile */
    margin-bottom: 0.5rem;
  }
  
  .lang-option {
    width: 36px;
    height: 36px;
    font-size: 16px;
    border-width: 2px;
  }
  
  .lang-option:hover {
    transform: scale(1.05); /* Reduced scale for mobile */
  }
  
  .lang-option:active {
    transform: scale(0.98);
  }
}

@media (max-width: 480px) {
  .language-selector {
    justify-content: center;
    width: 100%;
    padding: 0.5rem 0;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
  }
  
  .lang-option {
    width: 40px;
    height: 40px;
    font-size: 18px;
    margin: 0 0.5rem;
  }
  
  /* Ensure proper touch targets on small screens */
  .lang-option {
    min-height: 44px;
    min-width: 44px;
  }
}

/* ===== LOADING SYSTEM ===== */
.pandify-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.pandify-loading-overlay.hidden {
  opacity: 0;
  visibility: hidden;
}

.pandify-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid var(--border-color);
  border-top: 4px solid var(--bamboo-light);
  border-radius: 50%;
  animation: pandify-spin 1s linear infinite;
  margin-bottom: 1.5rem;
}

@keyframes pandify-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.pandify-loading-text {
  color: var(--bamboo-light);
  font-family: 'Roboto Mono', monospace;
  font-size: 1.1rem;
  font-weight: 500;
  text-align: center;
  margin-bottom: 0.5rem;
}

.pandify-loading-subtext {
  color: var(--text-muted);
  font-family: 'Roboto Mono', monospace;
  font-size: 0.9rem;
  text-align: center;
}

/* Bamboo dots animation */
.bamboo-dots::after {
  content: '';
  animation: bamboo-dots 1.5s steps(4, end) infinite;
}

@keyframes bamboo-dots {
  0%, 20% { content: ''; }
  40% { content: '.'; }
  60% { content: '..'; }
  80%, 100% { content: '...'; }
}

/* Content fade-in */
.pandify-content {
  opacity: 0;
  transition: opacity 0.6s ease-in;
}

.pandify-content.loaded {
  opacity: 1;
}

/* Alternative bamboo-themed spinner */
.bamboo-spinner {
  width: 50px;
  height: 50px;
  position: relative;
  margin-bottom: 1.5rem;
}

.bamboo-spinner::before,
.bamboo-spinner::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  animation: bamboo-pulse 1.5s ease-in-out infinite;
}

.bamboo-spinner::before {
  width: 100%;
  height: 100%;
  background: var(--bamboo-accent);
  animation-delay: -0.5s;
}

.bamboo-spinner::after {
  width: 80%;
  height: 80%;
  background: var(--bamboo-light);
  top: 10%;
  left: 10%;
}

@keyframes bamboo-pulse {
  0%, 100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.2);
    opacity: 1;
  }
}

/* Custom Scrollbar for Transaction History */
#transaction-log {
	max-height: 400px;
	overflow-y: auto;
	scrollbar-width: thin;
	scrollbar-color: var(--bamboo-accent) var(--bg-tertiary);
}

/* Webkit Scrollbar Styling */
#transaction-log::-webkit-scrollbar {
	width: 8px;
}

#transaction-log::-webkit-scrollbar-track {
	background: var(--bg-tertiary);
	border-radius: 4px;
	border: 1px solid var(--border-color);
}

#transaction-log::-webkit-scrollbar-thumb {
	background: linear-gradient(180deg, var(--bamboo-accent) 0%, var(--bamboo-primary) 100%);
	border-radius: 4px;
	border: 1px solid var(--bamboo-secondary);
}

#transaction-log::-webkit-scrollbar-thumb:hover {
	background: linear-gradient(180deg, var(--bamboo-secondary) 0%, var(--bamboo-light) 100%);
	box-shadow: 0 0 6px rgba(74, 103, 65, 0.4);
}