/* Common styles */
:root {
  --discord-blue: #5865F2;
  --discord-dark: #36393F;
  --discord-darker: #2F3136;
  --discord-light: #DCDDDE;
  --minecraft-green: #44bd32;
  --success: #57F287;
  --warning: #FEE75C;
  --danger: #ED4245;
  --vpn-color: #e74c3c;
  --clean-color: #2ecc71;
}

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

body {
  font-family: 'Whitney', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  background-color: var(--discord-darker);
  color: var(--discord-light);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden; /* Prevent horizontal scroll */
}

.unsupported-banner {
  background: var(--discord-blue);
  color: var(--discord-light);
  text-align: center;
  padding: 14px 0;
  font-size: 1.1rem;
  font-weight: 600;
  border-bottom: 2px solid var(--discord-dark);
  letter-spacing: 0.5px;
  position: relative;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(88,101,242,0.07);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.unsupported-banner button {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--discord-light);
  font-size: 1.3em;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.unsupported-banner button:hover {
  opacity: 1;
}

/* Layout components */
.container {
  width: 100%;
  max-width: 480px;
  background-color: var(--discord-dark);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  padding: 30px;
  text-align: center;
}

/* Dashboard layout */
.dashboard {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

.sidebar {
  background-color: var(--discord-dark);
  padding: 30px 24px;
  position: fixed;
  width: 280px;
  height: 100%;
  overflow-y: auto;
  z-index: 10;
  transition: transform 0.3s ease;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 24px;
}

.user-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-name {
  font-weight: 600;
  color: white;
  font-size: 18px;
}

.status {
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.status i {
  color: var(--success);
  font-size: 10px;
}

/* Menu styles */
.menu {
  list-style: none;
}

.menu-item {
  margin-bottom: 12px;
}

.menu-category {
  margin-bottom: 16px;
}

.category-title {
  color: var(--discord-light);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  padding-left: 18px;
  display: block;
  opacity: 0.7;
}

.submenu {
  list-style: none;
  padding: 0;
}

.submenu .menu-item {
  margin-bottom: 6px;
}

.menu .logout-btn {
  margin-top: 20px;
}

.menu-link {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  text-decoration: none;
  color: var(--discord-light);
  border-radius: 6px;
  transition: background 0.2s;
  gap: 12px;
  font-size: 16px;
}

.menu-link:hover, .menu-link.active {
  background: rgba(255,255,255,0.05);
  color: white;
}

.menu-link.active {
  background: var(--discord-blue);
}

.logout {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  text-decoration: none;
  color: var(--danger);
  border-radius: 6px;
  transition: all 0.2s;
  gap: 12px;
  font-size: 16px;
}

.logout:hover {
  background: rgba(237,66,69,0.1);
}

.main-content {
  flex: 1;
  margin-left: 280px;
  padding: 40px;
  max-width: 100%;
}

/* Typography */
h1 {
  font-size: 32px;
  font-weight: 700;
  color: white;
  margin-bottom: 10px;
}

h3 {
  font-size: 22px;
  font-weight: 600;
  color: white;
  margin: 28px 0 16px;
}

p {
  margin-bottom: 24px;
  font-size: 16px;
}

.welcome-message {
  font-size: 18px;
  margin-bottom: 28px;
  opacity: 0.9;
}

/* Card Components */
.card {
  background-color: var(--discord-dark);
  border-radius: 12px;
  padding: 32px;
  margin-bottom: 36px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  width: 100%;
  max-width: 100%;
  overflow-x: auto; /* Enable horizontal scroll within cards if needed */
}

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

.card-title {
  font-size: 22px;
  font-weight: 600;
  color: white;
}

.header {
  margin-bottom: 36px;
}

/* Logo and icons */
.logo {
  margin-bottom: 24px;
}

.logo i {
  font-size: 48px;
  color: var(--discord-blue);
}

/* Buttons and Form elements */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--discord-blue);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.2s, transform 0.1s;
}

.btn:hover {
  background-color: #4752c4;
}

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

.btn i {
  margin-right: 8px;
}

.btn-danger {
  background-color: var(--danger);
}

.btn-danger:hover {
  background-color: #c13436;
}

.button-group {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* Search styles */
.search-form {
  display: flex;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap; /* Allow wrapping on small screens */
}

.search-input {
  flex: 1;
  min-width: 200px; /* Ensure input doesn't get too small */
  background-color: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 14px 20px;
  color: white;
  font-size: 18px;
  outline: none;
  transition: border-color 0.2s;
}

.search-input:focus {
  border-color: var(--discord-blue);
}

.search-button {
  background-color: var(--discord-blue);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 14px 24px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
  display: flex;
  align-items: center;
}

.search-button:hover {
  background-color: #4752c4;
}

.search-button:active {
  transform: translateY(1px);
}

.search-button i {
  margin-right: 10px;
  font-size: 18px;
}

/* User profile */
.user-info {
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 24px;
  text-align: left;
  display: flex;
  align-items: center;
}

.avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin-right: 16px;
  background-color: var(--discord-blue);
  overflow: hidden;
}

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

.user-details {
  flex: 1;
}

.username {
  font-size: 18px;
  font-weight: 600;
  color: white;
}

.userid {
  font-size: 14px;
  opacity: 0.7;
}

/* Minecraft profile elements */
.minecraft-avatar {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  margin-right: 24px;
  image-rendering: pixelated;
}

.minecraft-profile-header {
  display: flex;
  align-items: center;
  margin-bottom: 32px;
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.minecraft-username {
  font-size: 28px;
  font-weight: 700;
  color: white;
}

.minecraft-uuid {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 4px;
}

/* Tables */
.name-history-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 24px;
  font-size: 16px;
}

.name-history-table th {
  text-align: left;
  padding: 16px 24px;
  background-color: rgba(0, 0, 0, 0.2);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.name-history-table td {
  padding: 16px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.name-history-table tr:last-child td {
  border-bottom: none;
}

.name-history-table tr:hover td {
  background-color: rgba(255, 255, 255, 0.05);
}

/* Status badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
}

.status-success {
  background-color: rgba(87, 242, 135, 0.2);
  color: var(--success);
}

.status-error {
  background-color: rgba(237, 66, 69, 0.2);
  color: var(--danger);
}

.status-warning {
  background-color: rgba(254, 231, 92, 0.2);
  color: var(--warning);
}

/* States */
.error-message {
  padding: 20px;
  background-color: rgba(237, 66, 69, 0.1);
  border-radius: 6px;
  color: var(--danger);
  margin-bottom: 24px;
  font-size: 16px;
}

.empty-state {
  text-align: center;
  padding: 60px 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 18px;
}

.empty-state i {
  font-size: 64px;
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.3);
}

/* Skin and cape elements */
.skin-preview-section {
  margin-top: 32px;
}

.skin-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
}

.skin-item {
  width: 100px;
  height: 100px;
  border-radius: 8px;
  overflow: hidden;
  image-rendering: pixelated;
  cursor: pointer;
  transition: transform 0.2s;
  border: 3px solid transparent;
}

.skin-item:hover {
  transform: scale(1.05);
  border-color: var(--discord-blue);
}

.skin-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cape-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
}

.cape-item {
  width: 160px;
  height: 120px;
  border-radius: 8px;
  overflow: hidden;
  image-rendering: pixelated;
  cursor: pointer;
  transition: transform 0.2s;
  border: 3px solid transparent;
}

.cape-item:hover {
  transform: scale(1.05);
  border-color: var(--discord-blue);
}

.cape-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Skin 3D Preview */
.skin-3d-preview {
  margin-top: 32px;
  width: 100%;
}

.preview-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 20px;
}

.preview-view {
  flex: 1;
  min-width: 200px; /* Minimum width for preview items */
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
}

.preview-view h4 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  color: white;
}

.preview-image {
  width: 100%;
  height: 220px;
  image-rendering: pixelated;
  object-fit: contain;
}

/* Skin Viewer Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 100;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: var(--discord-dark);
  border-radius: 12px;
  width: 90%;
  max-width: 900px;
  position: relative;
  animation: modalFade 0.3s;
}

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

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-title {
  font-size: 24px;
  font-weight: 600;
  color: white;
}

.modal-close {
  background: none;
  border: none;
  color: var(--discord-light);
  font-size: 26px;
  cursor: pointer;
  transition: color 0.2s;
}

.modal-close:hover {
  color: white;
}

.modal-body {
  padding: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.skin-viewer {
  width: 100%;
  height: 500px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.skin-viewer-controls {
  display: flex;
  gap: 16px;
  margin-top: 24px;
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
  justify-content: center;
}

.skin-control-btn {
  background-color: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 6px;
  padding: 12px 20px;
  color: white;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.skin-control-btn:hover {
  background-color: var(--discord-blue);
}

.skin-control-btn i {
  margin-right: 8px;
}

/* Mobile menu toggle */
.mobile-menu-toggle {
  display: none;
  position: fixed;
  top: 20px;
  right: 20px;
  background-color: var(--discord-blue);
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 20px;
  cursor: pointer;
  z-index: 20;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* VPN elements */
.detection-summary {
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.detection-icon {
  font-size: 48px;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.vpn-detected {
  color: var(--vpn-color);
  background-color: rgba(231, 76, 60, 0.15);
}

.clean-result {
  color: var(--clean-color);
  background-color: rgba(46, 204, 113, 0.15);
}

/* Logout confirmation popup styles */
.logout-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.logout-overlay.active {
  opacity: 1;
  visibility: visible;
}

.logout-popup {
  background-color: var(--discord-dark);
  width: 100%;
  max-width: 400px;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  transform: translateY(-20px);
  transition: transform 0.3s ease;
}

.logout-overlay.active .logout-popup {
  transform: translateY(0);
}

.logout-popup-header {
  padding: 16px 20px;
  background-color: rgba(0, 0, 0, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logout-popup-title {
  font-size: 18px;
  font-weight: 600;
  color: white;
}

.logout-popup-close {
  background: none;
  border: none;
  color: var(--discord-light);
  font-size: 20px;
  cursor: pointer;
  transition: color 0.2s;
}

.logout-popup-close:hover {
  color: white;
}

.logout-popup-content {
  padding: 20px;
  text-align: center;
}

.logout-popup-message {
  margin-bottom: 24px;
  font-size: 16px;
  line-height: 1.5;
}

.logout-popup-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.logout-popup-button {
  padding: 10px 20px;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
  border: none;
}

.logout-popup-button:active {
  transform: translateY(1px);
}

.logout-popup-button-cancel {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--discord-light);
}

.logout-popup-button-cancel:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.logout-popup-button-confirm {
  background-color: var(--danger);
  color: white;
}

.logout-popup-button-confirm:hover {
  background-color: #c13436;
}

.logout-popup-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.logout-popup-icon i {
  font-size: 48px;
  color: var(--danger);
}

/* Media Queries */
@media (max-width: 1200px) {
  .preview-container {
    justify-content: center;
  }
  
  .preview-view {
    flex-basis: calc(50% - 12px);
    min-width: 200px;
  }
  
  .search-container {
    grid-template-columns: 1fr;
  }
  
  .history-panel {
    order: -1;
    margin-bottom: 24px;
  }
}

@media (max-width: 992px) {
  .main-content {
    padding: 30px;
  }
  
  .search-form {
    flex-direction: column;
  }
  
  .search-button {
    align-self: flex-start;
  }
  
  .detection-summary {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .search-controls {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }
  
  .search-input-container {
    margin-right: 0;
    width: 100%;
    margin-bottom: 16px;
  }
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .sidebar {
    transform: translateX(-100%);
    width: 250px;
  }
  
  .sidebar.active {
    transform: translateX(0);
  }
  
  .main-content {
    margin-left: 0;
    width: 100%;
    padding: 20px;
  }
  
  .dashboard {
    position: relative;
  }
  
  .card {
    padding: 20px;
  }
  
  .preview-view {
    flex-basis: 100%;
  }
  
  h1 {
    font-size: 26px;
  }
  
  .welcome-message {
    font-size: 16px;
  }
  
  .minecraft-avatar {
    margin-bottom: 15px;
  }
  
  .minecraft-profile-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .name-history-table {
    font-size: 14px;
  }
  
  .name-history-table th,
  .name-history-table td {
    padding: 12px 16px;
  }
  
  .container {
    max-width: 90%;
  }
}
