/* Font Face Declarations */
@font-face {
  font-family: "MantouSans";
  src: url("../fonts/MantouSans-Regular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* Global App Styles */
.app-container {
  min-height: 100vh;
  background: #0f0f0f;
  color: #ffffff;
  font-family: "Noto Sans", "Noto Sans TC", -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  font-weight: 500;
}

/* Top Navigation */
.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: rgba(0, 0, 0, 0.95);
  border-bottom: 1px solid #333;
}

.nav-left {
  display: flex;
  align-items: center;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.logo {
  height: 32px;
}

.brand-name {
  font-size: 1.2rem;
  font-weight: 400;
  color: #d9f20b;
  font-family: "Noto Sans", "Noto Sans TC", sans-serif;
}

.nav-center {
  display: flex;
  gap: 1rem;
}

.nav-button {
  padding: 0.75rem 1.5rem;
  border: none;
  background: rgba(60, 60, 60, 0.8);
  color: #888888;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.nav-icon {
  width: 18px;
  height: 18px;
  transition: all 0.3s ease;
}

.nav-button.active {
  background: #d9f20b;
  color: #000000;
  box-shadow: 0 2px 8px rgba(117, 176, 88, 0.3);
}

.nav-button:hover:not(.active) {
  background: rgba(80, 80, 80, 0.9);
  color: #bbbbbb;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.language-switch {
  padding: 0.5rem 1rem;
  border: 1px solid #666;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.language-switch:hover {
  border-color: #999999;
  color: #bbbbbb;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #777777;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.user-avatar:hover {
  border-color: #fff;
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(217, 242, 11, 0.4);
}

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

.avatar-status-ring {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 14px;
  height: 14px;
  background: #00ff88;
  border: 2px solid #0f0f0f;
  border-radius: 50%;
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.6);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(0, 255, 136, 0);
  }
}

/* Main Content */
.main-content {
  padding: 2rem;
}

.main-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr;
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.page-title {
  font-size: 2.5rem;
  font-weight: 600;
  margin-bottom: 0;
  color: #d9f20b;
  font-family: "Noto Sans", "Noto Sans TC", sans-serif;
  grid-column: 1 / -1;
  justify-self: start;
}

.content-grid {
  display: flex;
  flex-direction: row;
  gap: 2rem;
  grid-column: 1 / -1;
}

/* Left Panel Styles */
.left-panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  flex: 1.65;
  min-width: 0;
}

.conditions-section {
  background: rgba(20, 20, 20, 0.95);
  border-radius: 16px;
  padding: 1.5rem;
  border: 2px solid #444;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.conditions-layout {
  display: flex;
  gap: 2rem;
  position: relative;
}

.conditions-layout::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(100% * 1.17 / 2.45);
  width: 1px;
  background-color: #545454;
}

.conditions-left {
  flex: 1.25;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
}

.conditions-right {
  flex: 1.2;
  min-width: 0;
  padding-left: 5%;
  margin-right: 5%;
}

.subsection-title {
  color: #d9f20b;
  font-size: 1.2rem;
  margin-bottom: 1rem;
  font-weight: 600;
  font-family: "Noto Sans", "Noto Sans TC", sans-serif;
}

/* Charm Display */
.charm-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
}

.charm-title {
  color: #ffffff;
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1rem;
  text-align: center;
  font-family: "Noto Sans", "Noto Sans TC", sans-serif;
}

.charm-image-container {
  height: 250px;
  width: 250px;
  background: linear-gradient(45deg, #2a2a2a, #1a1a1a);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid #444;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.charm-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.price-container {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

.price-tag {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 215, 0, 0.1);
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 215, 0, 0.3);
  width: 250px;
}

.price-label {
  color: #ccc;
  font-size: 1.1rem;
  font-weight: 500;
}

.price-value {
  color: #d9f20b;
  font-size: 1.1rem;
  font-weight: 600;
  text-shadow: 0 2px 4px rgba(255, 215, 0, 0.3);
}

/* Equipment Info */
.equipment-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #545454;
}

.equipment-info > div {
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #333;
}

.equipment-info > div:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.charm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.charm-name {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.charm-icon {
  width: 24px;
  height: 24px;
}

.charm-text {
  color: #ffffff;
  font-weight: 500;
}

.charm-level {
  color: #fff;
  font-size: 0.9rem;
}

.charm-slots {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.slots-label {
  color: #ccc;
}

.slot-indicators {
  display: flex;
  gap: 0.25rem;
}

.slot {
  color: #666;
  font-family: monospace;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  user-select: none;
}

.slot:hover {
  background: rgba(217, 242, 11, 0.1);
  color: #d9f20b;
}

.slot.empty {
  color: #666;
}

.slot.weapon-slot {
  color: #d9f20b;
  background: rgba(217, 242, 11, 0.1);
}

.slot.level-1 {
  color: #75b058;
  background: rgba(117, 176, 88, 0.1);
}

.slot.level-2 {
  color: #ceb459;
  background: rgba(206, 180, 89, 0.1);
}

.slot.level-3 {
  color: #a99967;
  background: rgba(169, 153, 103, 0.1);
}

/* Skills */
.skills-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.skill-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  background: rgba(40, 40, 40, 0.5);
  border-radius: 8px;
  border: 1px solid #444;
  position: relative;
  margin-right: 40px;
  padding-bottom: 0.75rem;
}

.skill-icon {
  width: 32px;
  height: 32px;
  border-radius: 4px;
}

.skill-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  position: relative;
}

.skill-header {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.skill-level {
  color: #d9f20b;
  font-weight: 600;
  min-width: 50px;
  position: absolute;
  top: 0;
  right: 0;
}

.skill-name {
  color: #fff;
  font-weight: 500;
  min-width: 60px;
}

.skill-dots {
  display: flex;
  gap: 0.25rem;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid #666;
  cursor: pointer;
  transition: all 0.3s ease;
}

.dot.active {
  background: #d9f20b;
  border-color: #d9f20b;
}

.dot.semi-active {
  background: rgba(119, 119, 119, 0.3);
  border-color: rgba(119, 119, 119, 0.5);
}

.dot:hover {
  border-color: #999999;
  transform: scale(1.1);
}

.delete-skill {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  transition: background 0.3s ease;
  position: absolute;
  right: -40px;
  top: 50%;
  transform: translateY(-50%);
}

.delete-skill:hover {
  background: rgba(255, 0, 0, 0.2);
}

.trash-icon {
  width: 16px;
  height: 16px;
}

.add-skill-button {
  display: flex;
  justify-content: center;
  margin-right: 40px;
}

.add-button {
  width: 100%;
  height: 60px;
  border: 2px dashed #666;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.add-button:hover {
  border-color: #999999;
  background: rgba(153, 153, 153, 0.1);
}

.plus-icon {
  color: #666;
  font-size: 1.5rem;
  font-weight: 500;
}

.add-button:hover .plus-icon {
  color: #999999;
}

/* Right Panel Styles */
.right-panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  flex: 1;
  min-width: 0;
}

.results-section,
.analysis-section {
  background: rgba(20, 20, 20, 0.95);
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid #333;
}

.results-section {
  padding: 1.75rem;
}

.section-title {
  color: #d9f20b;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  font-weight: 600;
  font-family: "Noto Sans", "Noto Sans TC", sans-serif;
}

/* Results Content */
.results-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Loading State */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: #d9f20b;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #333;
  border-top: 3px solid #d9f20b;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

.loading-text {
  font-size: 16px;
  font-weight: 500;
}

/* Empty and No Results States */
.empty-state,
.no-results {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

.no-results-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 720px;
}

.empty-text,
.no-results-text {
  color: #999;
  font-size: 16px;
  line-height: 1.5;
}

.no-results-illustration {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

.no-results-image {
  max-width: 360px;
  width: 80%;
  height: auto;
  opacity: 0.95;
}

.details-toggle {
  margin-left: 8px;
  color: #aaa;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 14px;
}

.details-toggle:hover {
  color: #d9d9d9;
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  gap: 1rem;
}

.result-text {
  color: #ccc;
  line-height: 1.6;
  flex: 1;
}

.share-section {
  flex-shrink: 0;
}

.share-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: rgba(217, 242, 11, 0.1);
  border: 2px solid #d9f20b;
  color: #d9f20b;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
}

.share-button:hover {
  background: rgba(119, 119, 119, 0.2);
  transform: translateY(-1px);
}

.share-icon {
  width: 18px;
  height: 18px;
}

.result-items {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.result-card {
  background: rgba(40, 40, 40, 0.5);
  border-radius: 12px;
  border: 1px solid #444;
  overflow: hidden;
  transition: all 0.3s ease;
}

.result-card:hover {
  border-color: #777777;
  box-shadow: 0 4px 16px rgba(119, 119, 119, 0.1);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem;
  border-bottom: 1px solid #555;
}

.template-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

.template-icon {
  width: 48px;
  height: 48px;
  border-radius: 6px;
}

.template-details {
  flex: 1;
}

.template-name {
  color: #ffffff;
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.template-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-tag {
  background: rgba(119, 119, 119, 0.2);
  color: #999999;
  padding: 0.25rem 0.75rem;
  border-radius: 16px;
  font-size: 0.85rem;
  font-weight: 500;
}

.slot-display {
  color: #fff;
  font-family: monospace;
  font-size: 1.1rem;
  font-weight: 600;
  background: rgba(60, 60, 60, 0.7);
  padding: 0.5rem 1rem;
  border-radius: 6px;
}

.card-footer {
  padding: 1.25rem;
}

.total-probability {
  color: #d9f20b;
  font-size: 1.3rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: rgba(217, 242, 11, 0.1);
  border-radius: 8px;
  border: 1px solid rgba(217, 242, 11, 0.9);
}

.detailed-breakdown {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem;
  background: rgba(60, 60, 60, 0.3);
  border-radius: 4px;
  font-size: 0.9rem;
}

.breakdown-row .label {
  color: #ccc;
  font-weight: 500;
}

.breakdown-row .value {
  color: #bbbbbb;
  font-weight: 600;
}

/* Failure Analysis */
.failure-analysis {
  margin-top: 20px;
  padding: 20px;
  background: rgba(255, 0, 0, 0.1);
  border: 1px solid rgba(255, 0, 0, 0.3);
  border-radius: 8px;
}

.analysis-title {
  color: #ff6b6b;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
}

.analysis-subtitle {
  color: #999999;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
}

.analysis-section {
  margin-bottom: 16px;
}

.analysis-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.analysis-item {
  padding: 8px 12px;
  margin-bottom: 4px;
  border-radius: 4px;
  font-size: 13px;
  line-height: 1.4;
}

.analysis-item.error {
  background: rgba(255, 107, 107, 0.2);
  color: #ff6b6b;
  border-left: 3px solid #ff6b6b;
}

.analysis-item.suggestion {
  background: rgba(119, 119, 119, 0.2);
  color: #999999;
  border-left: 3px solid #999999;
}

/* Analysis Section */
.chart-description {
  margin-bottom: 1.5rem;
}

.description-title {
  color: #d9f20b;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.description-content {
  color: #ccc;
  line-height: 1.6;
  font-size: 0.95rem;
  background: rgba(40, 40, 40, 0.3);
  padding: 1rem;
  border-radius: 8px;
  border-left: 3px solid #d9f20b;
}

.chart-container {
  height: 350px;
  background: rgba(40, 40, 40, 0.3);
  border-radius: 8px;
  border: 1px solid #444;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.analysis-chart {
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.chart-tooltip {
  position: fixed;
  background: rgba(20, 20, 20, 0.95);
  border: 1px solid #777777;
  border-radius: 6px;
  padding: 0.75rem;
  color: #fff;
  font-size: 0.9rem;
  z-index: 1000;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  max-width: 250px;
}

.tooltip-title {
  color: #bbbbbb;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.tooltip-content {
  color: #ccc;
  font-size: 0.85rem;
  white-space: pre-line;
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: rgba(20, 20, 20, 0.95);
  border-radius: 16px;
  border: 2px solid #444;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow: hidden;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid #333;
}

.modal-header h2 {
  color: #d9f20b;
  margin: 0;
  font-size: 1.5rem;
}

.close-button {
  background: none;
  border: none;
  color: #ccc;
  font-size: 2rem;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.close-button:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.modal-body {
  padding: 1.5rem;
  max-height: calc(90vh - 100px);
  overflow-y: auto;
}

/* Skill Selector Styles */
.skill-selector {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: 100%;
}

.search-container {
  margin-bottom: 1rem;
}

.search-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #444;
  border-radius: 8px;
  background: rgba(40, 40, 40, 0.8);
  color: #fff;
  font-size: 1rem;
}

.search-input::placeholder {
  color: #666;
}

.search-input:focus {
  outline: none;
  border-color: #d9f20b;
  box-shadow: 0 0 0 2px rgba(217, 242, 11, 0.2);
}

.categories-container {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.category-button {
  padding: 0.5rem 1rem;
  border: 1px solid #444;
  background: rgba(40, 40, 40, 0.8);
  color: #ccc;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.category-button:hover {
  border-color: #d9f20b;
  color: #d9f20b;
}

.category-button.active {
  background: #d9f20b;
  color: #000;
  border-color: #d9f20b;
}

.skills-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  max-height: 300px;
  overflow-y: auto;
  padding: 0.5rem;
  background: rgba(20, 20, 20, 0.5);
  border-radius: 8px;
  border: 1px solid #333;
}

.skill-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: rgba(40, 40, 40, 0.8);
  border: 1px solid #444;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.skill-card:hover {
  border-color: #d9f20b;
  background: rgba(217, 242, 11, 0.1);
  transform: translateY(-1px);
}

.skill-card.selected {
  border-color: #d9f20b;
  background: rgba(217, 242, 11, 0.2);
}

.skill-card.incompatible {
  border-color: #ff6b6b;
  background: rgba(255, 107, 107, 0.1);
  cursor: not-allowed;
}

.skill-card.incompatible:hover {
  border-color: #ff5252;
  background: rgba(255, 107, 107, 0.15);
  transform: none;
}

.skill-card .skill-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.skill-card .skill-name {
  font-size: 0.9rem;
  color: #fff;
  line-height: 1.2;
  font-weight: 500;
}

.skill-level-info {
  font-size: 0.75rem;
  color: #d9f20b;
  font-weight: 400;
}

.skill-card.incompatible .skill-level-info {
  color: #ff6b6b;
}

.available-levels {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.level-badge {
  background: rgba(217, 242, 11, 0.3);
  color: #d9f20b;
  font-size: 0.7rem;
  padding: 0.15rem 0.4rem;
  border-radius: 12px;
  font-weight: 500;
  border: 1px solid rgba(217, 242, 11, 0.5);
}

/* Share Modal Styles */
.share-modal {
  max-width: 500px;
}

.share-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.share-option {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: rgba(40, 40, 40, 0.5);
  border: 2px solid #444;
  color: #fff;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  font-weight: 500;
  font-size: 1rem;
  text-align: left;
}

.share-option:hover {
  border-color: #777777;
  background: rgba(119, 119, 119, 0.1);
  color: #bbbbbb;
  transform: translateY(-2px);
}

.share-option-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.share-message {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 6px;
  font-weight: 500;
  text-align: center;
}

.share-message.success {
  background: rgba(117, 176, 88, 0.2);
  color: #75b058;
  border: 1px solid rgba(117, 176, 88, 0.3);
}

.share-message.error {
  background: rgba(255, 107, 107, 0.2);
  color: #ff6b6b;
  border: 1px solid rgba(255, 107, 107, 0.3);
}

/* Footer Styles */
.app-footer {
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0f0f0f 100%);
  border-top: 1px solid rgba(217, 242, 11, 0.3);
  margin-top: 3rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.footer-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.footer-info {
  flex: 1;
}

.thanks-text {
  color: #ccc;
  line-height: 1.6;
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.thanks-link {
  color: #d9f20b;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.thanks-link:hover {
  color: #fff;
  text-decoration: underline;
}

.data-sources {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #888;
}

.data-link {
  color: #aaa;
  text-decoration: none;
  transition: color 0.3s ease;
}

.data-link:hover {
  color: #bbbbbb;
  text-decoration: underline;
}

.footer-contacts {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #888;
  flex-shrink: 0;
}

.contact-link {
  color: #aaa;
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-link:hover {
  color: #bbbbbb;
  text-decoration: underline;
}

.footer-disclaimer {
  background: rgba(20, 20, 20, 0.4);
  border-radius: 8px;
  padding: 1rem;
  border-left: 3px solid rgba(119, 119, 119, 0.3);
  margin-bottom: 1.5rem;
}

.disclaimer-text {
  color: #aaa;
  line-height: 1.5;
  font-size: 0.85rem;
  margin: 0;
}

.footer-bottom {
  text-align: center;
  padding-top: 1rem;
  border-top: 1px solid rgba(119, 119, 119, 0.2);
}

.copyright {
  color: #888;
  font-size: 0.9rem;
  margin: 0;
}

.data-source {
  color: #d9f20b;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.data-source:hover {
  color: #fff;
  text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .content-grid {
    flex-direction: column;
    gap: 1.5rem;
  }

  /* Remove the rule that hides the entire nav-center */
  /*
  .nav-center {
    display: none;
  }
  */
}

@media (max-width: 950px) {
  .conditions-layout {
    flex-direction: column;
    gap: 1rem;
  }

  .conditions-layout::after {
    display: none;
  }

  .charm-image-container {
    width: 180px;
    height: 180px;
  }

  .price-tag {
    width: 180px;
  }
}

@media (max-width: 768px) {
  .main-content {
    padding: 1rem;
  }

  .top-nav {
    padding: 0.8rem 1rem; /* Reduced padding */
  }

  .page-title {
    font-size: 1.6rem; /* Even smaller font size for mobile */
  }

  /* Smaller logo and avatar on mobile */
  .logo {
    height: 24px; /* Smaller logo */
  }
  .user-avatar {
    width: 32px; /* Smaller avatar */
    height: 32px;
  }

  /* Smaller section titles on mobile */
  .section-title {
    font-size: 1.2rem;
  }
  .subsection-title {
    font-size: 1.0rem;
  }

  /* Smaller text content on mobile */
  .result-text, .description-content, .thanks-text {
    font-size: 0.85rem;
  }

  /* Reduce padding for sections and cards on mobile */
  .conditions-section, .results-section, .analysis-section, .card-header, .card-footer {
    padding: 0.8rem;
  }

  .footer-main {
    flex-direction: column;
    gap: 1rem;
  }

  .footer-contacts {
    justify-content: center;
    flex-wrap: wrap;
  }

  .data-sources {
    justify-content: center;
    flex-wrap: wrap;
  }

  .footer-disclaimer {
    padding: 0.75rem;
  }
}

@media (max-width: 480px) {
  .footer-container {
    padding: 1.5rem 1rem;
  }

  .disclaimer-text {
    font-size: 0.8rem;
  }

  .footer-contacts,
  .data-sources {
    font-size: 0.85rem;
  }

  .modal-content {
    width: 95%;
    max-height: 95vh;
  }
}

/* Scrollbar styling */
.skills-grid::-webkit-scrollbar,
.modal-body::-webkit-scrollbar {
  width: 6px;
}

.skills-grid::-webkit-scrollbar-track,
.modal-body::-webkit-scrollbar-track {
  background: rgba(20, 20, 20, 0.5);
  border-radius: 3px;
}

.skills-grid::-webkit-scrollbar-thumb,
.modal-body::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 3px;
}

.skills-grid::-webkit-scrollbar-thumb:hover,
.modal-body::-webkit-scrollbar-thumb:hover {
  background: #666;
}

/* Responsive styles for smaller screens */
@media (max-width: 890px) {
  .nav-center .nav-button .nav-button-text {
    display: none;
  }

  .nav-center .nav-button {
    padding: 8px 12px; /* Adjust padding for icon-only buttons */
  }

  .nav-icon {
    margin-right: 0; /* Remove margin when text is hidden */
  }
}