/* Custom properties for responsive scaling and colors */
:root {
  --base-font-size: 16px;
  --primary-color: #3498db;
  --primary-dark: #2980b9;
  --text-color: #333;
  --text-light: #555;
  --bg-color: #f5f7fa;
  --bg-light: #ffffff;
  --border-color: #e0e6ed;
  --scale-ratio: 1;
}

/* Reset & base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

html {
  width: 100%;
  height: 100%;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  font-size: 16px;
  overflow: hidden;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  flex-direction: column;
  position: relative;
  background-color: #e8f4fc;
  /* Fallback color */
}

/* Background - with performance optimizations */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("images/robg_720x1080px.jpg");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  filter: blur(12px);
  z-index: -1;
  contain: strict;
  transform: scale(1.05);
  will-change: transform, filter;
  backface-visibility: hidden;
  pointer-events: none;
}

/* Prevent selection and dragging */
img,
picture,
video,
canvas,
svg {
  pointer-events: none;
}

/* Logo */
#logo {
  position: fixed;
  top: 16px;
  height: 128px;
  /* width: 384px; */
  /* max-width: 90vw; */
  /* height: 120px; */
  /* display: flex; */
  /* justify-content: center; */
  /* align-items: center; */
  z-index: 10;
}

#logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* App */
#app {
  position: fixed;
  width: 100%;
  max-width: 768px;
  top: 160px;
  bottom: 24px;
  margin: 0 auto;
  z-index: 5;
  overflow: hidden;
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  display: flex;
  flex-direction: column;
  will-change: transform;

  /* Elevation */
  box-shadow: 0 8px 10px 1px rgba(0, 0, 0, 0.14),
    /* umbra */
    0 3px 14px 2px rgba(0, 0, 0, 0.12),
    /* penumbra */
    0 5px 5px -3px rgba(0, 0, 0, 0.2);
  /* ambient */
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: box-shadow 0.3s ease;

  /* Initial state */
  opacity: 0;
  transform: translateY(120px);
  transition: opacity 450ms ease-out, transform 250ms ease-out;
  will-change: opacity, transform;
}

#app.visible {
  /* After loading */
  opacity: 1;
  transform: translateY(0);
}

/* #app * {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
} */

/* Header */
header {
  background: var(--primary-color);
  padding: 16px;
  text-align: center;
  border-bottom: 4px solid var(--primary-dark);
  flex-shrink: 0;
}

header h1 {
  color: #fff;
  font-size: 24px;
}

/* Navigation */
nav {
  background: var(--bg-light);
  border-bottom: 4px solid var(--border-color);
  flex-shrink: 0;
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: space-around;
}

nav a {
  display: block;
  padding: 12px 0;
  width: 100%;
  color: var(--text-color);
  text-decoration: none;
  font-size: 14px;
  text-align: center;
  position: relative;
  transition: color 0.3s ease;
  font-weight: 500;
}

nav a:hover {
  color: var(--primary-color);
}

nav a.active {
  color: var(--primary-color);
  font-weight: bold;
}

nav a.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 25%;
  width: 50%;
  height: 3px;
  background-color: var(--primary-color);
  transition: width 0.3s ease, left 0.3s ease;
}

nav a:hover::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 40%;
  width: 20%;
  height: 2px;
  background-color: var(--primary-color);
  opacity: 0.5;
}

/* Tab Content */
.tab-content {
  display: none;
}

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

/* Content */
.card {
  padding: 0;
  border-width: 16px 2px;
  border-style: solid;
  border-image-source: url("images/card.png");
  border-image-slice: 16 2 16 2 fill;
  border-image-repeat: stretch;
  background: white;
  border-radius: 2px;
  background-clip: padding-box;
  /* image-rendering: pixelated; */
  /* image-rendering: crisp-edges; */
}

main {
  padding: 20px;
  color: var(--text-color);
  font-size: 14px;
  line-height: 1.4;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  background-color: rgba(245, 247, 250, 1);
  /* Semi-transparent background */
  border-radius: 2px;
}

/* Custom scrollbar */
main::-webkit-scrollbar {
  width: 8px;
}

main::-webkit-scrollbar-track {
  background: var(--bg-light);
  border-radius: 4px;
}

main::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

main::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

main h2 {
  margin-bottom: 8px;
  color: var(--primary-dark);
  font-size: 16px;
}

main p,
main li {
  margin-bottom: 12px;
}

h3 {
  font-size: 18px;
  color: var(--primary-dark);
}

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

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: bold;
  color: var(--primary-dark);
}

.form-group input {
  width: 100%;
  padding: 10px;
  border: 2px solid var(--border-color);
  border-radius: 4px;
  background: var(--bg-light);
  font-size: 14px;
  color: var(--text-color);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* Button styles */
.btn {
  display: inline-block;
  height: 48px;
  padding: 10px 20px;
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.btn:hover {
  background: var(--primary-dark);
}

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

.btn.secondary {
  background: var(--text-light);
}

.btn.secondary:hover {
  background: var(--text-color);
}

/* Account Management Styles */
.auth-container,
.account-management {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.auth-container p {
  margin-bottom: 20px;
  color: var(--text-light);
}

.user-info {
  background: var(--bg-light);
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  text-align: center;
  border: 1px solid var(--border-color);
}

.user-info h2 {
  margin-bottom: 10px;
  color: var(--text-color);
}

.accounts-section {
  background: var(--bg-light);
  padding: 16px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.accounts-section h3 {
  padding: 0 16px;
  margin: 0;
  text-align: left;
  font-size: 18px;
  color: var(--primary-dark);
}

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

.accounts-header h3 {
  padding: 0 16px;
  margin: 0;
  text-align: left;
  font-size: 18px;
  color: var(--primary-dark);
}

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

.account-item {
  background: var(--bg-color);
  padding: 15px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  text-align: left;
}

.account-item h4 {
  margin: 0 0 10px 0;
  color: var(--primary-color);
  font-size: 16px;
}

.account-item p {
  margin: 5px 0;
  font-size: 12px;
  color: var(--text-light);
}

.status-active {
  color: #27ae60;
  font-weight: bold;
}

.status-inactive {
  color: #e74c3c;
  font-weight: bold;
}

/* Login value styles */
.login-value {
  cursor: pointer;
  padding: 4px 6px;
}

/* Password spoiler styles */
.password-spoiler {
  display: inline-block;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 3px;
  background-color: #f0f0f0;
  border: 1px solid #ddd;
  transition: all 0.2s ease;
  font-family: monospace;
  position: relative;
  min-width: 125px;
}

.password-spoiler:hover {
  background-color: #e8e8e8;
  border-color: #ccc;
}

.password-spoiler.password-hidden .password-value {
  opacity: 0;
  user-select: none;
  color: transparent;
  text-shadow: none;
  pointer-events: none;
}

.password-spoiler.password-hidden::before {
  /* content: "••••••••"; */
  position: absolute;
  left: 6px;
  top: 2px;
  color: #666;
  font-size: 14px;
  letter-spacing: 1px;
  pointer-events: none;
}

.password-spoiler.password-visible .password-value {
  opacity: 1;
  color: #333;
  user-select: text;
  pointer-events: auto;
}

.password-spoiler.password-visible {
  background-color: #fff3cd;
  border-color: #ffeaa7;
}

.no-accounts {
  text-align: center;
  color: var(--text-light);
  font-style: italic;
  padding: 40px 20px;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: white;
  padding: 30px;
  border-radius: 8px;
  max-width: 400px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-content h3 {
  padding: 0 16px;
  margin: 0 0 16px 0;
  text-align: center;
  font-size: 18px;
  color: var(--primary-dark);
}

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

.form-group label {
  display: block;
  margin-bottom: 5px;
  color: var(--text-color);
  font-weight: bold;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 14px;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}

.notification {
  padding: 12px 20px;
  margin-bottom: 20px;
  border-radius: 4px;
  font-weight: bold;
  text-align: center;
}

.notification-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.notification-error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.notification-info {
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

/* Server info styles */
.server-stats {
  background: var(--bg-light);
  padding: 20px;
  border-radius: 8px;
  margin: 20px 0;
  border: 1px solid var(--border-color);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin-top: 15px;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
}

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

.features,
.getting-started {
  background: var(--bg-light);
  padding: 20px;
  border-radius: 8px;
  margin: 20px 0;
  border: 1px solid var(--border-color);
}

.features h3,
.getting-started h3 {
  margin-top: 0;
  color: var(--text-color);
}

.features ul,
.getting-started ol {
  text-align: left;
  padding-left: 20px;
}

.features li,
.getting-started li {
  margin-bottom: 8px;
  color: var(--text-light);
}

/* Account Tabs Styling */
.account-tabs-container {
  display: flex;
  height: 100%;
  gap: 0;
}

.account-nav {
  position: fixed;
  left: -4px;
  top: 65px;
  z-index: 100;
  font-size: 12px;
  width: 48px;
  /* Collapsed width */
  flex-shrink: 0;
  background: white;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
  border-radius: 0 8px 8px 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  border: 1px solid var(--border-color);
  border-left: none;
}

.account-nav:not(:hover) {
  transform: scale(0.8) translateX(-8px);
}

/* Expanded hover state for desktop, not touch devices */
@media (hover: hover) and (pointer: fine) {
  .account-nav:hover {
    transform: scale(1) translateX(-2px);
    width: 280px;
    color: var(--text-color);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
  }

  .account-nav:hover .tab-text {
    opacity: 1;
  }
}

.account-tabs {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.account-tabs li {
  margin: 0;
  border-bottom: 1px solid var(--border-color);
}

.account-tab-link {
  display: flex;
  align-items: center;
  padding: 16px 8px;
  color: var(--text-color);
  text-decoration: none;
  transition: all 0.3s ease;
  border-left: 4px solid transparent;
  gap: 12px;
  position: relative;
  min-height: 56px;
  white-space: nowrap;
}

.account-tab-link:hover {
  background: linear-gradient(90deg, var(--bg-color) 0%, rgba(52, 152, 219, 0.1) 100%);
  color: var(--primary-color);
  transform: translateX(2px);
}

.account-tab-link.active {
  background: linear-gradient(90deg, var(--primary-color) 0%, rgba(52, 152, 219, 0.9) 100%);
  color: white;
  border-left-color: var(--primary-dark);
  font-weight: bold;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* .account-tab-link.active::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid var(--primary-color);
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
} */

.tab-icon {
  font-size: 20px;
  min-width: 24px;
  text-align: center;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.tab-text {
  font-size: 14px;
  white-space: nowrap;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Add tooltip for collapsed state */
.account-nav:not(:hover) .account-tab-link::before {
  content: attr(data-tooltip);
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  margin-left: 8px;
  z-index: 1000;
}

.account-nav:not(:hover) .account-tab-link:hover::before {
  opacity: 1;
}

.account-content {
  flex: 1;
  padding: 16px;
  /* padding-left: 80px; */
  overflow-y: auto;
  background: var(--bg-color);
  transition: padding-left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  /* min-height: calc(100vh - 65px); */
  z-index: 10;
}

.account-tab-content {
  display: none;
}

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

/* Loading and Error States */
.loading {
  text-align: center;
  padding: 40px;
  color: var(--text-light);
  font-style: italic;
}

.error-message {
  text-align: center;
  padding: 20px;
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  border-radius: 4px;
  margin: 20px 0;
}

.no-data {
  text-align: center;
  padding: 40px;
  color: var(--text-light);
  font-style: italic;
}

/* Accounts Grid */
.accounts-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.fade {
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  will-change: opacity;
}

.fade.show {
  opacity: 1;
}

/* Inventories Section */
.inventories-section h3 {
  padding: 0 16px;
  margin: 0;
  text-align: left;
  font-size: 18px;
  color: var(--primary-dark);
}

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

.inventory-search {
  margin-bottom: 16px;
}

.inventory-search input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  background: white;
  font-size: 14px;
  color: var(--text-color);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.inventory-search input:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.inventory-search input::placeholder {
  color: var(--text-light);
  font-style: italic;
}

.inventory-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.filter-btn {
  padding: 8px 16px;
  border: 2px solid var(--border-color);
  background: white;
  color: var(--text-color);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 12px;
  font-weight: 500;
}

.filter-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.filter-btn.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.inventory-containers {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Account-based inventory structure */
.account-inventory-container {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.account-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  margin: 0;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
}

.account-header h4 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  color: white;
  font-size: 16px;
  font-weight: bold;
}

.account-icon {
  font-size: 20px;
  opacity: 0.9;
}

.total-items {
  font-size: 12px;
  font-weight: normal;
  opacity: 0.8;
  margin-left: auto;
}

.account-sources {
  padding: 0;
}

.source-container {
  border-bottom: 1px solid var(--border-color);
  content-visibility: auto;
}

.source-container:last-child {
  border-bottom: none;
}

.source-container h5 {
  background: var(--bg-color);
  margin: 0;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-dark);
  font-size: 14px;
  font-weight: 600;
}

.character-container {
  padding: 16px;
  border-bottom: 1px solid #f0f0f0;
}

.character-container:last-child {
  border-bottom: none;
}

/* .character-container.has-zeny {
    background: linear-gradient(135deg, #fff9e6 0%, #fff3cd 100%);
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    margin-bottom: 8px;
} */

/* .character-container.has-zeny .character-header h6 {
    color: #b8860b;
    font-weight: bold;
} */

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

.character-header h6 {
  margin: 0;
  color: var(--text-color);
  font-size: 13px;
  font-weight: 500;
}

/* Legacy styles for compatibility */
.inventory-container {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}

.inventory-container h4 {
  background: var(--bg-color);
  margin: 0;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-dark);
  font-size: 16px;
}

.source-icon {
  font-size: 18px;
}

.item-container {
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
}

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

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

.container-header h5 {
  margin: 0;
  color: var(--text-color);
  font-size: 14px;
}

.item-count {
  background: var(--primary-color);
  color: white;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: bold;
}

.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}

.no-items {
  text-align: center;
  color: var(--text-light);
  font-style: italic;
  padding: 20px;
}

/* Item Cards */
.item-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 8px;
  transition: all 0.2s ease;
  cursor: pointer;
}

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

.item-name {
  font-weight: bold;
  font-size: 12px;
  margin-bottom: 4px;
  color: var(--text-color);
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
}

.item-type {
  color: var(--text-light);
  font-size: 10px;
}

.item-amount {
  background: var(--bg-color);
  padding: 2px 6px;
  border-radius: 8px;
  font-weight: bold;
  color: var(--primary-dark);
}

/* Item Type Colors */
.item-card.weapon {
  border-left: 4px solid #e74c3c;
}

.item-card.armor {
  border-left: 4px solid #3498db;
}

.item-card.healing {
  border-left: 4px solid #27ae60;
}

.item-card.ammo {
  border-left: 4px solid #f39c12;
}

.item-card.etc {
  border-left: 4px solid #9b59b6;
}

.item-card.usable {
  border-left: 4px solid #e67e22;
}

.item-card.cash {
  border-left: 4px solid #1abc9c;
}

.item-card.card {
  border-left: 4px solid #8e44ad;
  background: linear-gradient(135deg, #f3e5f5 0%, #e8f5e9 100%);
}

.item-card.zeny {
  border-left: 4px solid #f1c40f;
  background: linear-gradient(135deg, #fff9e6 0%, #fffef7 100%);
}

.item-card.zeny .item-name {
  color: #b8860b;
}

/* Special styling for zeny items within inventories */
.item-card.zeny-item {
  background: linear-gradient(135deg, #fff4e6 0%, #ffe4b5 100%);
  border: 2px solid #daa520;
  box-shadow: 0 0 8px rgba(218, 165, 32, 0.3);
}

.item-card.zeny-item:hover {
  box-shadow: 0 2px 12px rgba(218, 165, 32, 0.5);
  transform: translateY(-2px);
}

.item-card.zeny-item .item-name {
  color: #b8860b;
  font-weight: bold;
}

/* Download Section Styles */
.download-header {
  text-align: center;
  margin-bottom: 30px;
}

.download-header h2 {
  color: var(--primary-dark);
  font-size: 24px;
  margin-bottom: 8px;
}

.download-header p {
  color: var(--text-light);
  font-size: 16px;
}

.download-main {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
}

.download-card {
  background: linear-gradient(135deg, var(--bg-light) 0%, #f8fbff 100%);
  border: 2px solid var(--border-color);
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 8px 32px rgba(52, 152, 219, 0.1);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

/* .download-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
} */

/* .download-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(52, 152, 219, 0.2);
  border-color: var(--primary-color);
} */

.download-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  border-radius: 50%;
  margin-bottom: 20px;
  box-shadow: 0 4px 16px rgba(52, 152, 219, 0.3);
}

.download-card h3 {
  color: var(--primary-dark);
  font-size: 20px;
  margin-bottom: 8px;
}

.download-size {
  background: var(--primary-color);
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: bold;
  display: inline-block;
  margin-bottom: 16px;
}

.download-card p {
  color: var(--text-light);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 24px;
}

.download-btn-main {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  border: none;
  border-radius: 12px;
  padding: 16px 32px;
  color: white;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 16px rgba(52, 152, 219, 0.3);
}

.download-btn-main:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

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

.download-btn-main:disabled {
  opacity: 0.7;
  transform: none;
  cursor: not-allowed;
}

.btn-icon {
  font-size: 18px;
  transition: transform 0.3s ease;
}

.download-btn-main:hover .btn-icon {
  transform: translateY(2px);
}

.download-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 40px;
}

.requirements-section,
.installation-guide {
  background: var(--bg-light);
  border-radius: 12px;
  padding: 24px;
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.requirements-section h3,
.installation-guide h3 {
  color: var(--primary-dark);
  font-size: 18px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.requirements-section h3::before {
  content: "⚙️";
  font-size: 20px;
}

.installation-guide h3::before {
  content: "📋";
  font-size: 20px;
}

.requirements-grid {
  display: grid;
  gap: 16px;
}

.req-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #f8fbff;
  border-radius: 8px;
  border-left: 4px solid var(--primary-color);
}

.req-icon {
  font-size: 24px;
  min-width: 32px;
  text-align: center;
}

.req-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.req-info strong {
  color: var(--text-color);
  font-size: 14px;
}

.req-info span {
  color: var(--text-light);
  font-size: 13px;
}

.guide-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.guide-steps li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
  background: #f8fbff;
  border-radius: 8px;
  border-left: 4px solid var(--primary-color);
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  font-weight: bold;
  font-size: 14px;
  flex-shrink: 0;
}

.step-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.step-content strong {
  color: var(--text-color);
  font-size: 14px;
}

.step-content span {
  color: var(--text-light);
  font-size: 13px;
  line-height: 1.4;
}

/* Responsive adjustments for download section */
@media (max-width: 768px) {
  .download-info {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .download-card {
    padding: 24px;
    margin: 0 16px;
  }

  .download-icon {
    width: 64px;
    height: 64px;
  }

  .download-btn-main {
    padding: 14px 24px;
    font-size: 14px;
  }

  .requirements-section,
  .installation-guide {
    padding: 20px;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  body {
    font-size: var(--base-font-size);
    background-color: var(--bg-color);
  }

  body::before {
    background-image: none;
    filter: none;
    transform: none;
    will-change: auto;
  }

  #logo {
    display: none;
  }

  #app {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    max-width: 100%;
    width: 100%;
    height: 100%;
    margin: 0;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  nav {
    border-bottom-width: calc(4px * var(--scale-ratio));
  }

  nav a {
    padding: calc(12px * var(--scale-ratio)) 0;
    font-size: calc(12px * var(--scale-ratio));
  }

  main {
    padding: calc(20px * var(--scale-ratio));
    font-size: calc(14px * var(--scale-ratio));
    line-height: 1.4;
    contain: paint;
  }

  main h2 {
    margin-bottom: calc(8px * var(--scale-ratio));
    font-size: calc(16px * var(--scale-ratio));
  }

  main p,
  main li {
    margin-bottom: calc(12px * var(--scale-ratio));
  }

  #app footer {
    border-top-width: calc(4px * var(--scale-ratio));
    padding: calc(12px * var(--scale-ratio));
    font-size: calc(10px * var(--scale-ratio));
  }

  .tab-text {
    font-size: 12px;
  }

  .accounts-header {
    justify-content: center;
  }

  .accounts-grid {
    grid-template-columns: 1fr;
  }

  .items-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }

  .inventory-filters {
    gap: 4px;
  }

  .filter-btn {
    padding: 6px 12px;
    font-size: 11px;
  }

  .account-header {
    padding: 12px 16px;
  }

  .account-header h4 {
    font-size: 14px;
    gap: 8px;
  }

  .total-items {
    font-size: 10px;
  }

  .source-container h5 {
    padding: 10px 12px;
    font-size: 13px;
    gap: 6px;
  }

  .character-container {
    padding: 12px;
  }

  /* .character-container.has-zeny {
        margin-bottom: 6px;
        padding: 10px;
    } */

  .character-header h6 {
    font-size: 12px;
  }

  .inventory-search input {
    padding: 10px 12px;
    font-size: 13px;
  }
}

/* For shorter screens */
@media (max-height: 720px) {
  #logo {
    display: none;
  }

  #app {
    top: 0;
    bottom: 0;
    height: 100%;
    margin: 0;
  }
}

/* For very short screens - show warning */
@media (max-height: 320px) or (max-width: 240px) {
  #app {
    display: none;
  }

  body::after {
    content: "Please use a larger screen";
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    color: var(--primary-dark);
    font-size: 16px;
    text-align: center;
    padding: 20px;
  }
}

/* Server Info Tab Styles */
.server-hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  margin: -20px -20px 30px -20px;
  padding: 32px 20px;
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.server-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.1;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: 32px;
  font-weight: bold;
  margin: 0 0 8px 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
  font-size: 16px;
  margin: 0 0 16px 0;
  opacity: 0.9;
  font-weight: 500;
}

.hero-description {
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
  opacity: 0.95;
  max-width: 800px;
  margin: 0 auto;
}

/* Server Status Cards */
.server-status {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.status-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

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

.status-icon {
  font-size: 32px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-color);
  border-radius: 50%;
}

.status-info {
  flex: 1;
}

.status-label {
  font-size: 12px;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.status-value {
  font-size: 18px;
  font-weight: bold;
  color: var(--text-color);
}

.status-value.online {
  color: #27ae60;
}

/* Server Info Grid */
.server-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.info-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

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

.card-header {
  background: linear-gradient(135deg, var(--bg-color) 0%, #f0f7ff 100%);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-color);
}

.card-icon {
  font-size: 24px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-color);
  color: white;
  border-radius: 10px;
}

.card-header h3 {
  margin: 0;
  font-size: 18px;
  color: var(--primary-dark);
  font-weight: bold;
}

/* Stats Lists */
.stats-list {
  padding: 20px;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
  transition: all 0.2s ease;
}

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

.stat-item:hover {
  background: rgba(52, 152, 219, 0.05);
  margin: 0 -8px;
  padding: 12px 8px;
  border-radius: 6px;
}

.stat-item.highlight {
  background: linear-gradient(135deg, #fff9e6 0%, #fffef7 100%);
  border: 1px solid #ffeaa7;
  border-radius: 8px;
  padding: 12px 16px;
  margin: 8px 0;
}

.stat-item.highlight:hover {
  background: linear-gradient(135deg, #fff3cd 0%, #fff9e6 100%);
  margin: 8px 0;
}

.stat-label {
  color: var(--text-color);
  font-weight: 500;
}

.stat-value {
  color: var(--primary-color);
  font-weight: bold;
  font-size: 16px;
}

/* Features Lists */
.features-list {
  padding: 20px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  transition: all 0.2s ease;
}

.feature-item:hover {
  background: rgba(52, 152, 219, 0.05);
  margin: 0 -8px;
  padding: 10px 8px;
  border-radius: 6px;
}

.feature-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.feature-item.positive {
  color: var(--text-color);
}

.feature-item.positive .feature-icon {
  color: #27ae60;
}

.feature-item.restriction {
  color: var(--text-light);
}

.feature-item.restriction .feature-icon {
  color: #e74c3c;
}

/* Special Card Styling */
.rates-card {
  border-left: 4px solid #27ae60;
}

.limits-card {
  border-left: 4px solid var(--primary-color);
}

.features-card {
  border-left: 4px solid #f39c12;
}

.restrictions-card {
  border-left: 4px solid #e74c3c;
}

/* Connection Info */
.connection-info {
  background: linear-gradient(135deg, #f8fbff 0%, #e8f4fc 100%);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
}

.connection-card h4 {
  margin: 0 0 20px 0;
  color: var(--primary-dark);
  font-size: 18px;
  font-weight: bold;
}

.connection-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.detail-item {
  background: white;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

.detail-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.detail-label {
  display: block;
  font-size: 12px;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.detail-value {
  display: block;
  font-size: 16px;
  font-weight: bold;
  color: var(--primary-color);
  font-family: 'Courier New', monospace;
}

/* Responsive adjustments for server info */
@media (max-width: 768px) {
  .hero-title {
    font-size: 24px;
  }

  .hero-subtitle {
    font-size: 14px;
  }

  .hero-description {
    font-size: 13px;
  }

  .server-status {
    grid-template-columns: 1fr;
  }

  .server-info-grid {
    grid-template-columns: 1fr;
  }

  .connection-details {
    grid-template-columns: 1fr;
  }

  .status-card {
    padding: 16px;
  }

  .card-header {
    padding: 16px;
  }

  .stats-list,
  .features-list {
    padding: 16px;
  }
}