html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Poppins', 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  background-color: #ffffff00;
  color: #e0e0e0;
  transition: background-color 0.5s ease, color 0.5s ease;
}

body {
  --bg-gradient: linear-gradient(135deg, #0f0f18 0%, #1a1a2e 100%);
  --card-bg: rgba(20, 20, 35, 0.75);
  --text-color: #e0e0e0;
  --accent-color: #a0a8d9;
  --button-bg: #3b4da0;
  --button-hover: #4c5eb6;
  --input-bg: rgba(25, 25, 40, 0.5);
  --input-border: rgba(100, 120, 200, 0.3);
  --card-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  --card-hover-shadow: 0 12px 40px rgba(100, 120, 200, 0.25);
}

body.light-theme {
  color: #186037;
  transition: all 0.3s ease;
  
  --bg-gradient: linear-gradient(135deg, #f0f7eb, #e2f0d9);
  --card-bg: rgba(248, 252, 245, 0.9);
  --text-color: #186037;
  --accent-color: #0d8043;
  --button-bg: #0d8043;
  --button-hover: #076a33;
  --input-bg: rgba(255, 255, 255, 0.95);
  --input-border: rgba(13, 128, 67, 0.4);
  --card-shadow: 20px 20px 40px rgba(13, 128, 67, 0.25),
                -20px -20px 40px rgba(248, 252, 245, 0.7),
                inset 6px 6px 12px rgba(255, 255, 255, 0.6),
                inset -6px -6px 12px rgba(13, 128, 67, 0.1);
  --card-hover-shadow: 25px 25px 50px rgba(13, 128, 67, 0.35),
                      -25px -25px 50px rgba(248, 252, 245, 0.8);
}

#particles-js {
  position: fixed;
  width: 100%;
  height: 100%;
  background: var(--bg-gradient);
  z-index: -1;
  transition: background 0.3s ease;
}
body > div.content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 30px auto;
  padding: 0;
  background: transparent;
}
.card {
  background: var(--card-bg);
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 15px;
  transition: all 0.3s ease;
  border: 1px solid rgba(100, 120, 200, 0.1);
  overflow: visible;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--card-hover-shadow);
}
.form-card {
  margin-bottom: 0;
  box-shadow: var(--card-shadow);
  transition: all 0.3s ease;
}
.form-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--card-hover-shadow);
}
.language-selector-container {
  position: fixed;
  top: 15px;
  right: 15px;
  z-index: 1000;
  display: flex;
  gap: 10px;
}
.language-selector {
  display: flex;
  align-items: center;
  gap: 10px;
}
.language-selector select {
  width: auto;
  padding: 8px 12px;
  font-size: 0.9rem;
  background-color: rgba(25, 25, 40, 0.8);
  border: none;
  border-radius: 20px;
  color: #a0a8d9;
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg fill='%23a0a8d9' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 30px;
}
.language-selector select:hover, .language-selector select:focus {
  background-color: rgba(35, 35, 50, 0.9);
  box-shadow: 0 4px 15px rgba(100, 120, 200, 0.3);
  transform: translateY(-2px);
  outline: none;
}
.direction-btn {
  background-color: rgba(25, 25, 40, 0.8);
  color: #a0a8d9;
  border: none;
  border-radius: 20px;
  padding: 8px 12px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}
.direction-btn:hover {
  background-color: rgba(35, 35, 50, 0.9);
  box-shadow: 0 4px 15px rgba(100, 120, 200, 0.3);
  transform: translateY(-2px);
}
h1 {
  text-align: center;
  color: var(--accent-color);
  font-size: 28px;
  margin-bottom: 24px;
  text-shadow: 0 0 8px rgba(100, 120, 200, 0.3);
}
label {
  display: block;
  margin-top: 16px;
  font-weight: bold;
  color: var(--accent-color);
  transition: transform 0.3s;
}
label:hover {
  transform: translateX(5px);
}
select, input {
  width: 100%;
  padding: 12px;
  margin-top: 6px;
  font-size: 1rem;
  background-color: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 8px;
  box-sizing: border-box;
  color: var(--text-color);
  transition: all 0.3s ease;
}
select:hover, input:hover {
  border-color: #8087b8;
  box-shadow: 0 0 8px rgba(100, 120, 200, 0.4);
  transform: translateY(-2px);
}
select:focus, input:focus {
  outline: none;
  border-color: #8087b8;
  box-shadow: 0 0 12px rgba(100, 120, 200, 0.5);
}
button {
  width: 100%;
  padding: 12px;
  margin-top: 16px;
  font-size: 1rem;
  background-color: var(--button-bg);
  color: white;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(59, 77, 160, 0.3);
  position: relative;
  overflow: hidden;
}
button:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.2);
  transition: width 0.3s ease;
}
button:hover {
  background-color: var(--button-hover);
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(59, 77, 160, 0.4);
}
button:hover:before {
  width: 100%;
}
button:active {
  transform: translateY(-1px);
}
.result {
  margin-top: 30px;
  background: var(--card-bg);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  padding: 20px;
  border: 1px solid var(--input-border);
  border-radius: 8px;
  color: var(--text-color);
  word-break: break-word;
  box-shadow: var(--card-shadow);
  transition: all 0.3s ease;
}
.result:hover {
  box-shadow: 0 6px 20px rgba(100, 120, 200, 0.3);
  transform: translateY(-2px);
}
.hidden { display: none; }
button:disabled { 
  background: #252d4d; 
  cursor: not-allowed; 
  opacity: 0.6;
  transform: none;
  box-shadow: none;
}
button:disabled:before {
  display: none;
}
.current-time-container {
  text-align: center;
  margin-bottom: 15px;
  color: var(--text-color);
  font-size: 1.1rem;
  font-weight: bold;
  background-color: var(--card-bg);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  padding: 8px;
  border-radius: 8px;
  border: 1px solid var(--input-border);
  transition: all 0.3s ease;
  box-shadow: var(--card-shadow);
}
.current-time-container:hover {
  box-shadow: 0 6px 16px rgba(100, 120, 200, 0.3);
  transform: translateY(-2px);
}
.exchange-rate-container {
  position: relative;
}
.exchange-rate-container:hover .rate-update-info {
  display: block;
}
.input-with-button {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}
.input-with-button input {
  width: 100%;
  padding-right: 40px;
}
.refresh-btn {
  position: absolute;
  right: 8px;
  top: 55%;
  transform: translateY(-50%);
  width: 28px !important;
  height: 28px !important;
  min-height: unset;
  padding: 0 !important;
  margin: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  background-color: transparent !important;
  color: var(--accent-color);
  border: none;
  z-index: 5;
  box-shadow: none !important;
}
.refresh-btn:hover {
  transform: translateY(-50%) rotate(180deg);
  color: var(--button-bg);
}
.rate-update-info {
  display: none;
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  width: 100%;
  padding: 5px;
  font-size: 0.8rem;
  color: #8087b8;
  background-color: var(--card-bg);
  border-radius: 5px;
  z-index: 10;
}
.rate-info-in-result {
  color: var(--accent-color);
  font-weight: 500;
  font-style: italic;
  font-size: 0.85rem;
  transition: all 0.3s ease;
  opacity: 0.7;
}
.rate-info-in-result:hover {
  opacity: 1;
}
.input-card {
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--input-border);
  margin-bottom: 15px;
  background-color: var(--card-bg);
  transition: all 0.3s ease;
}
.input-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(100, 120, 200, 0.3);
  border-color: var(--accent-color);
}
.input-card label {
  margin-top: 0;
}

/* RTL Support */
html[dir="rtl"] body {
  text-align: right;
}
html[dir="rtl"] .language-selector-container {
  right: auto;
  left: 15px;
}
html[dir="rtl"] .language-selector {
  flex-direction: row-reverse;
}
html[dir="rtl"] .language-selector select {
  background-position: left 8px center;
  padding-right: 12px;
  padding-left: 30px;
}
html[dir="rtl"] input[type="number"],
html[dir="rtl"] select {
  text-align: right;
}
html[dir="rtl"] .input-with-button input {
  padding-right: 12px;
  padding-left: 40px;
}
html[dir="rtl"] .refresh-btn {
  right: auto;
  left: 8px;
}
html[dir="rtl"] .refresh-btn:hover {
  transform: translateY(-50%) rotate(-180deg);
  color: var(--button-bg);
}
html[dir="rtl"] .result {
  text-align: right;
}
html[dir="rtl"] label:hover {
  transform: translateX(-5px);
}
html[dir="rtl"] .input-card:hover {
  transform: translateY(-2px);
}

@media (max-width: 600px) {
  h1 { font-size: 22px; }
  body > div.content {
    margin: 20px 10px;
  }
  .card {
    padding: 15px;
  }
  select, input, button {
    padding: 10px;
  }
  .language-selector-container {
    top: 10px;
    right: 10px;
  }
  .language-selector {
    gap: 5px;
  }
  .direction-btn {
    padding: 6px 10px;
  }
  .input-with-button {
    position: relative;
    display: flex;
    align-items: center;
  }
  .refresh-btn {
    position: absolute;
    right: 8px;
    width: 24px !important;
    height: 24px !important;

  }
}

.result:empty {
  padding: 0;
  border: none;
  box-shadow: none;
  margin: 0;
}
.result:not(:empty) {
  animation: fadeIn 0.5s;
  padding: 20px;
}

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

/* Theme Toggle Switch */
.theme-toggle {
  position: fixed;
  top: 15px;
  left: 15px;
  width: 60px;
  height: 30px;
  background-color: #3b4da0;
  border-radius: 30px;
  cursor: pointer;
  padding: 4px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  z-index: 1000;
}
.theme-toggle:hover {
  box-shadow: 0 4px 15px rgba(100, 120, 200, 0.5);
  transform: translateY(-2px);
}
.theme-toggle .toggle-icon {
  width: 24px;
  height: 24px;
  font-size: 16px;
  color: white;
  position: absolute;
}
.theme-toggle .toggle-ball {
  position: absolute;
  width: 22px;
  height: 22px;
  background-color: white;
  border-radius: 50%;
  left: 4px;
  transition: transform 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}
.light-theme .theme-toggle .toggle-ball {
  transform: translateX(30px);
}
.light-theme .theme-toggle {
  background-color: #e67e22;
}

/* Particle.js */
#particles-js {
  width: 100%;
  height: 100vh;
  position: fixed;
  top: 0;
}

  html[dir="rtl"] .direction-btn {
  transform: scaleX(-1);
  transition: transform 0.3s;
}

html[dir="rtl"] .fa-calculator,
html[dir="rtl"] .fa-money-bill-wave {
    margin-right: 0;
  margin-left: 8px;
}

html[dir="rtl"] .refresh-btn {
  transform: rotate(-180deg);
  transition: all 0.3s ease;
}

html[dir="rtl"] .refresh-btn:hover {
  transform: rotate(0deg);
}

html[dir="rtl"] .result {
  direction: rtl;
}

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

#result:not(:empty) {
  animation: fadeIn 0.5s;
  padding: 20px;
  margin-bottom: 30px;
}

input:disabled, button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background-color: var(--input-bg);
  box-shadow: none;
  transform: none;
}

.card {
  background-color: var(--card-bg);
  box-shadow: var(--card-shadow);
  transition: all 0.3s ease;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--card-hover-shadow);
}

/* Focus styles for accessibility */
.input:focus, .select:focus {
  outline: 2px solid var(--accent-color);
  box-shadow: 0 0 0 3px rgba(100, 120, 200, 0.25);
}

/* Animation delay for results section */
#result {
  transition: opacity 0.5s ease;
  min-height: 20px;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .card {
    padding: 15px;
    margin-bottom: 15px;
  }
  .card-body {
    padding: 10px;
  }
  .text-3xl {
    font-size: 1.5rem;
    line-height: 2rem;
  }
  /* Ensure stacked layout on mobile */
  .form-section, .result-section {
    width: 100%;
  }
  .result-section {
    margin-top: 20px;
  }
  
  /* 移动端结果内容自适应优化 */
  .hologram-effect .result-content {
    padding: 15px 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* 移动端结果文本优化 */
  .result-content h2 {
    font-size: 1.1rem;
    margin-bottom: 10px;
  }
  
  /* 移动端结果内容文本优化 */
  .result-content .result {
    font-size: 0.95rem;
    padding: 10px 8px;
    word-break: break-word;
    overflow-wrap: break-word;
  }
  
  /* 移动端表格样式优化 */
  .result-content table {
    width: 100%;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .result-content table td,
  .result-content table th {
    white-space: nowrap;
    padding: 6px 4px;
  }
  
  /* 移动端价格显示优化 */
  .result-content .text-lg {
    font-size: 1.1rem;
    margin: 5px 0;
  }
  
  /* 移动端结果项间距优化 */
  .result-content .flex-col > div {
    margin-bottom: 8px;
  }
  
  /* 移动端结果项文本换行优化 */
  .result-content .result div {
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
  }
  
  /* 移动端结果项内的行间距优化 */
  .result-content .result p,
  .result-content .result div {
    line-height: 1.4;
    margin-bottom: 6px;
  }
  
  /* 移动端结果项内的强调文本优化 */
  .result-content .result strong,
  .result-content .result b {
    display: inline-block;
    margin-bottom: 2px;
  }
  
  /* JS添加的移动端特定类样式 */
  .mobile-result-content {
    padding: 12px 8px !important;
    max-width: 100%;
    overflow-x: hidden;
  }
  
  .mobile-result {
    font-size: 0.9rem;
  }
  
  .mobile-card {
    margin-bottom: 12px;
    padding: 8px 6px;
  }
  
  .mobile-card .card-body {
    padding: 10px 8px;
  }
  
  .mobile-card .card-title {
    font-size: 0.9rem;
    margin-bottom: 8px;
  }
  
  /* 移动端卡片内价格显示优化 */
  .mobile-card .flex.items-center.gap-2 {
    margin: 5px 0;
  }
  
  /* 移动端扫描线高度自适应 */
  .scan-line {
    animation: scanAnimation 2s linear infinite;
  }
  
  @keyframes scanAnimation {
    0% {
      transform: translateY(0);
      opacity: 1;
    }
    90% {
      opacity: 1;
    }
    100% {
      transform: translateY(var(--scan-height, 400px));
      opacity: 0;
    }
  }
}

/* Tablet layout adjustments */
@media (min-width: 769px) and (max-width: 1023px) {
  body > div.content {
    max-width: 90%;
    margin: 20px auto;
  }
  
  .form-section, .result-section {
    width: 100%;
  }
  
  .result-section {
    margin-top: 20px;
  }
  
  .card {
    margin-bottom: 20px;
  }
}

/* Dark mode particle colors */
body.dark .particles-js-canvas-el {
  filter: brightness(0.8) contrast(1.2);
}

/* Light mode particle colors */
body.light .particles-js-canvas-el {
  filter: brightness(1.1) contrast(0.9);
}

/* PC left-right layout */
@media (min-width: 1024px) {
  body > div.content {
    max-width: 1200px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0 20px;
    margin-top: 15px;
  }

  .content > h1 {
    width: 100%;
    margin-top: 10px;
    margin-bottom: 10px;
    font-size: 1.75rem;
  }

  .current-time-container {
    width: 100%;
    margin-bottom: 15px;
    padding: 6px;
  }

  /* Compact form layout */
  .form-section {
    width: 48%;
  }

  .form-card {
    height: auto;
    margin-bottom: 0;
    padding: 15px;
  }

  .form-card .card-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 0;
  }

  .form-card .card-title {
    grid-column: 1 / -1;
    margin-bottom: 5px;
    padding-bottom: 0;
  }

  .form-card .card-title h2 {
    margin: 0;
  }

  .form-card .form-control {
    margin-top: 0;
    margin-bottom: 0;
  }

  .form-card .form-control.full-width {
    grid-column: 1 / -1;
  }

  .form-card button {
    grid-column: 1 / -1;
    margin-top: 10px;
  }

  .form-card label {
    margin-top: 0;
    margin-bottom: 2px;
  }

  .form-card .label {
    padding: 0 0 2px 0;
    min-height: auto;
  }

  .form-card input, 
  .form-card select {
    padding: 6px 10px;
    height: 34px;
    font-size: 0.95rem;
  }

  .form-card .btn {
    padding: 6px;
    height: 36px;
    margin-top: 8px;
  }

  /* Adjust spacing for rate info */
  .form-card #rate-info {
    font-size: 0.7rem;
    margin-top: 2px;
  }

  .result-section {
    width: 48%;
    margin-top: 55px; /* Align with the form card title */
    display: flex;
    flex-direction: column;
  }

  .result-section h2 {
    margin-top: 0;
    margin-bottom: 15px;
  }

  .result {
    min-height: 300px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    max-height: 900px;
  }
  
  .result:empty {
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px dashed var(--input-border);
    background: var(--card-bg);
    opacity: 0.7;
  }
  
  .result:empty::after {
    content: attr(data-empty-text, "等待输入参数计算结果");
    color: var(--text-color);
    opacity: 0.5;
    font-style: italic;
  }
  
  /* Improve card styling for PC */
  .card {
    margin-bottom: 0;
  }

  /* Adjust theme toggle and language selector */
  .theme-toggle {
    top: 10px;
  }
  
  .language-selector-container {
    top: 10px;
  }
}

/* 中央居中布局和动画效果 */
.content-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 0;
  box-sizing: border-box;
  position: relative;
  transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.content {
    width: 100%;
  max-width: 1200px;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  margin: 0 auto;
  transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.content > h1 {
  text-align: center;
  margin-top: 0;
  margin-bottom: 15px;
  position: absolute;
  top: 20px;
  left: 0;
  right: 0;
  transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.current-time-container {
  max-width: 600px;
  width: 100%;
  margin-bottom: 20px;
  padding: 6px;
  position: absolute;
  top: 70px;
  transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.main-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 120px);
  position: relative;
  flex-wrap: wrap;
  transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  width: 100%;
  margin-top: 120px;
}

.form-container {
  --initial-top: 50%;
  --initial-left: 50%;
  width: 100%;
  max-width: 600px;
  transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transform-origin: center center;
}

.result-container {
  width: 100%;
  max-width: 48%;
  position: relative;
  opacity: 0;
  visibility: hidden;
  transform: translateX(50px);
  transition: opacity 0.5s ease, visibility 0.5s ease, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  height: auto;
  display: flex;
  flex-direction: column;
  overflow: visible;
}

/* 活动状态下的样式 - 表单从中心移到左侧 */
.form-active .form-container {
  position: relative;
  top: 0;
  left: 0;
  transform: none;
  max-width: 48%;
  transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

/* 添加关键帧动画 */
@keyframes moveFromCenterToLeft {
  0% {
    position: absolute;
    top: var(--initial-top);
    left: var(--initial-left);
    transform: translate(-50%, -50%);
    max-width: 600px;
  }
  100% {
    position: relative;
    top: 0;
    left: 0;
    transform: none;
    max-width: 48%;
  }
}

/* 应用动画 */
.form-active .form-container {
  animation: moveFromCenterToLeft 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.form-active .content > h1 {
  position: relative;
  top: auto;
  transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.form-active .current-time-container {
  position: relative;
  top: auto;
  left: auto;
  transform: none;
  transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.form-active .main-container {
  min-height: auto;
  justify-content: space-between;
  margin-top: 120px;
  transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  align-items: flex-start;
  height: auto;
  display: flex;
  flex-wrap: nowrap;
}

@media (min-width: 1024px) {
  .form-active .main-container {
    min-height: auto;
    height: auto;
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
  }
}

/* 全息投影效果 */
.hologram-effect {
  position: relative;
  overflow: visible;
  border-radius: 16px;
  box-shadow: 
    0 0 20px rgba(100, 120, 200, 0.15),
    0 0 40px rgba(0, 200, 255, 0.05);
  background: var(--card-bg);
  min-height: auto;
  border: 1px solid rgba(100, 120, 200, 0.1);
  height: auto;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.hologram-effect::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: transparent;
  z-index: 5;
}

.hologram-effect::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: transparent;
  z-index: 5;
}

/* 科技感网格背景 */
.hologram-effect .result-content {
  position: relative;
  padding: 20px;
  opacity: 1;
  background-image: 
    linear-gradient(rgba(0, 200, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 200, 255, 0.03) 1px, transparent 1px);
  background-size: 20px 20px;
  width: 100%;
  height: auto;
  overflow: visible;
  /* 添加弹性布局以便更好地在移动端显示 */
  display: flex;
  flex-direction: column;
}

@media (min-width: 1024px) {
  .hologram-effect .result-content {
    min-height: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow: visible;
  }
}

/* 增强全息投影效果的结果内容 */
.result {
  position: relative;
  min-height: auto;
  overflow-y: visible;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  backdrop-filter: blur(2px);
  /* 添加弹性布局和自动换行以适应移动设备 */
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
}

.result h3 {
  color: rgba(0, 200, 255, 0.8);
  text-shadow: 0 0 5px rgba(0, 200, 255, 0.5);
}

.result .card {
  border: 1px solid rgba(0, 200, 255, 0.2);
  background: rgba(0, 30, 60, 0.2);
  backdrop-filter: blur(5px);
  transition: all 0.3s ease;
}

.result .card:hover {
  border-color: rgba(0, 200, 255, 0.5);
  box-shadow: 0 0 15px rgba(0, 200, 255, 0.3);
}

.result:not(:empty) {
  padding: 15px 10px;
  border-top: 1px solid rgba(100, 120, 200, 0.2);
  margin-top: 15px;
}

.result:empty {
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--text-color);
  opacity: 0.6;
}

.result:empty::after {
  content: attr(data-empty-text);
}

/* 结果卡片动画 */
.hologram-card {
  opacity: 0;
  transform: translateY(20px);
  animation: cardAppear 0.5s forwards;
  animation-delay: var(--delay, 0s);
  overflow: visible;
  height: auto;
}

@keyframes cardAppear {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 全息投影数值闪烁效果 */
.form-active .result .text-lg {
  animation: numberGlow 2s infinite alternate;
  text-shadow: 0 0 5px rgba(0, 200, 255, 0.7);
  overflow: visible;
}

@keyframes numberGlow {
  0% {
    text-shadow: 0 0 2px rgba(0, 200, 255, 0.3);
  }
  100% {
    text-shadow: 0 0 8px rgba(0, 200, 255, 0.7);
  }
}

/* 全息投影边缘光效 */
.form-active .hologram-effect {
  animation: none;
}

@keyframes borderPulse {
  0% {
    box-shadow: 
      0 0 10px rgba(100, 120, 200, 0.1),
      0 0 20px rgba(0, 200, 255, 0.05);
  }
  100% {
    box-shadow: 
      0 0 15px rgba(100, 120, 200, 0.1),
      0 0 30px rgba(0, 200, 255, 0.05);
  }
}

/* 响应式调整 */
@media (max-width: 1024px) {
  .main-container {
    flex-direction: column;
  }
  
  .form-container,
  .result-container {
    max-width: 100%;
    width: 100%;
  }
  
  .result-container {
    margin-top: 30px;
  }
}

/* 动画状态类 */
.form-active .main-container {
  justify-content: space-between;
}

.form-active .form-container {
  max-width: 48%;
}

.form-active .result-container {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  transition-delay: 0.3s;
  height: auto;
  overflow: visible;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* 扫描线 */
.scan-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(to right, 
    rgba(0, 200, 255, 0), 
    rgba(0, 200, 255, 0.5), 
    rgba(0, 200, 255, 0.8), 
    rgba(0, 200, 255, 0.5), 
    rgba(0, 200, 255, 0)
  );
  box-shadow: 
    0 0 10px rgba(0, 200, 255, 0.5),
    0 0 20px rgba(0, 200, 255, 0.3),
    0 0 30px rgba(0, 200, 255, 0.1);
  z-index: 10;
  opacity: 0;
  transform: translateY(-10px);
}

/* 扫描动画 */
@keyframes scanAnimation {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(400px);
    opacity: 0;
  }
}

/* 移动设备的扫描动画 */
@media (max-width: 768px) {
  @keyframes scanAnimation {
    0% {
      transform: translateY(0);
      opacity: 1;
    }
    90% {
      opacity: 1;
    }
    100% {
      transform: translateY(300px);
      opacity: 0;
    }
  }
}

/* 针对PC的样式调整 */
@media (min-width: 1024px) {
  .content {
    margin-top: 0;
  }
  
  .form-active .content {
    margin-top: 0;
    transition: margin-top 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  }
  
  /* PC端结果容器样式调整 */
  .form-active .result-container {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    transition-delay: 0.3s;
    width: 48%;
    min-width: 500px;
    height: auto;
    display: flex;
    flex-direction: column;
  }
  
  .hologram-effect {
    height: 100%;
    min-height: auto;
    display: flex;
    flex-direction: column;
  }
}

/* 移动设备样式调整 */
@media (max-width: 768px) {
  .content-wrapper {
    align-items: flex-start;
  }
  
  .content > h1 {
    position: relative;
    top: auto;
    margin-top: 70px;
  }
  
  .current-time-container {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    margin-top: 10px;
  }
  
  .form-container {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    margin-top: 20px;
  }
  
  .main-container {
    min-height: auto;
    padding-top: 20px;
    margin-top: 0;
  }
  
  .form-active .main-container {
    min-height: auto;
    flex-direction: column;
    margin-top: 80px;
    height: auto;
  }
  
  /* 移动设备上结果容器也保持全宽 */
  .form-active .result-container {
    max-width: 100%;
    width: 100%;
    margin-top: 20px;
  }
  
  /* 移动设备上禁用动画和保持全宽 */
  .form-active .form-container {
    animation: none;
    max-width: 100%;
    width: 100%;
  }
  
  /* 确保移动设备上的全息效果也能显示 */
  .hologram-effect {
    min-height: 300px;
    box-shadow: 
      0 0 15px rgba(100, 120, 200, 0.4),
      0 0 30px rgba(0, 200, 255, 0.2);
    border: 1px solid rgba(100, 120, 200, 0.3);
  }
  
  /* 保持全息卡片动画效果 */
  .hologram-card {
    animation: cardAppear 0.8s forwards;
    animation-delay: var(--delay, 0s);
  }
  
  /* 保持全息投影数值闪烁效果 */
  .form-active .result .text-lg {
    animation: numberGlow 2s infinite alternate;
  }
  
  /* 保持全息投影边缘光效 */
  .form-active .hologram-effect {
    animation: none;
  }
  
  /* 调整扫描线效果适应移动设备 */
  .scan-line {
    height: 3px;
    box-shadow: 
      0 0 8px rgba(0, 200, 255, 0.5),
      0 0 15px rgba(0, 200, 255, 0.3);
  }
  
  /* 移动端结果内容自适应优化 */
  .hologram-effect .result-content {
    padding: 15px 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* 移动端结果文本优化 */
  .result-content h2 {
    font-size: 1.1rem;
    margin-bottom: 10px;
  }
  
  /* 移动端结果内容文本优化 */
  .result-content .result {
    font-size: 0.95rem;
    padding: 10px 8px;
    word-break: break-word;
    overflow-wrap: break-word;
  }
  
  /* 移动端表格样式优化 */
  .result-content table {
    width: 100%;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .result-content table td,
  .result-content table th {
    white-space: nowrap;
    padding: 6px 4px;
  }
  
  /* 移动端价格显示优化 */
  .result-content .text-lg {
    font-size: 1.1rem;
    margin: 5px 0;
  }
  
  /* 移动端结果项间距优化 */
  .result-content .flex-col > div {
    margin-bottom: 8px;
  }
  
  /* 移动端结果项文本换行优化 */
  .result-content .result div {
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
  }
  
  /* 移动端结果项内的行间距优化 */
  .result-content .result p,
  .result-content .result div {
    line-height: 1.4;
    margin-bottom: 6px;
  }
  
  /* 移动端结果项内的强调文本优化 */
  .result-content .result strong,
  .result-content .result b {
    display: inline-block;
    margin-bottom: 2px;
  }
  
  /* JS添加的超小屏幕特定类样式 */
  .small-mobile-result-content {
    padding: 10px 6px !important;
  }
  
  .small-mobile-result {
    font-size: 0.85rem;
  }
  
  /* 超小屏幕设备上的卡片进一步优化 */
  .mobile-card .card-body {
    padding: 8px 6px;
  }
  
  /* 超小屏幕设备上的垂直布局价格容器 */
  .mobile-card .flex-col.gap-2 {
    align-items: center;
    margin: 6px 0;
  }
  
  /* 超小屏幕设备上的价格文本 */
  .small-mobile-result .text-lg {
    font-size: 0.95rem;
  }
  
  /* 超小屏幕设备上的标签文本 */
  .small-mobile-result .text-xs {
    font-size: 0.7rem;
  }
}

/* 超小屏幕设备（小型手机）的额外优化 */
@media (max-width: 480px) {
  /* 超小屏幕结果内容进一步优化 */
  .hologram-effect .result-content {
    padding: 12px 8px;
  }
  
  /* 超小屏幕结果标题优化 */
  .result-content h2 {
    font-size: 1rem;
    margin-bottom: 8px;
  }
  
  /* 超小屏幕结果内容文本进一步优化 */
  .result-content .result {
    font-size: 0.9rem;
    padding: 8px 6px;
  }
  
  /* 超小屏幕价格显示进一步优化 */
  .result-content .text-lg {
    font-size: 1rem;
    margin: 4px 0;
  }
  
  /* 调整全息效果最小高度 */
  .hologram-effect {
    min-height: 250px;
  }
  
  /* 优化扫描线效果 */
  .scan-line {
    height: 2px;
  }
}

/* 阿拉伯语文本方向样式 */
.rtl-text {
  direction: rtl;
  text-align: right;
}

/* 保持布局不变，只改变文本方向 */
html[dir="rtl"] .card,
html[dir="rtl"] .form-control,
html[dir="rtl"] .btn,
html[dir="rtl"] .main-container,
html[dir="rtl"] .content-wrapper,
html[dir="rtl"] .form-container,
html[dir="rtl"] .result-container {
  direction: ltr;
}

/* 方向指示器样式 */
#direction-indicator,
#direction-indicator-mobile {
  font-size: 0.8rem;
  padding: 0.2rem 0.5rem;
}

/* 移除旧的主题切换器和语言选择器样式 */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 25px;
  background: rgba(30, 30, 60, 0.6);
  border-radius: 25px;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 5px;
  z-index: 100;
  backdrop-filter: blur(5px);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.language-selector-container {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* 内容区域顶部边距，为固定导航栏留出空间 */
.content-wrapper {
  padding-top: 4rem;
}

body.light-theme .card {
  background: linear-gradient(145deg, #f8fcf5, #e8f4df);
  border-radius: 30px;
  border: 4px solid rgba(255, 255, 255, 0.7);
  transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(0.17, 0.67, 0.83, 0.67),
              box-shadow 0.5s cubic-bezier(0.17, 0.67, 0.83, 0.67),
              border-radius 0.5s cubic-bezier(0.17, 0.67, 0.83, 0.67);
  position: relative;
  overflow: hidden;
}

body.light-theme .card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.1) 2px, transparent 5px),
    radial-gradient(circle at 80% 70%, rgba(255,255,255,0.15) 3px, transparent 7px);
  background-size: 60px 40px;
  z-index: 1;
  pointer-events: none;
}

body.light-theme .card:hover {
  border-radius: 35px 25px 30px 40px;
  transform: translateY(-8px) translateZ(20px);
}

body.light-theme .form-container .card {
  transform-style: preserve-3d;
}

body.light-theme .form-card:hover {
  transform: translateY(-8px) translateZ(20px);
  box-shadow: var(--card-hover-shadow);
}

body.light-theme h1 {
  background: linear-gradient(45deg, #186037, #0d8043);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.05);
  letter-spacing: 1px;
}

body.light-theme .card-title h2 {
  color: #61381d; /* 深棕色 */
  font-weight: 600;
}

body.light-theme label {
  color: #186037;
  font-weight: bold;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

body.light-theme label:hover {
  transform: translateX(8px) scale(1.05);
}

body.light-theme select, body.light-theme input {
  background: linear-gradient(145deg, #fff, #f7faf4);
  border: 2px solid rgba(13, 128, 67, 0.3);
  border-radius: 20px;
  padding: 5px 18px;
  color: #186037;
  box-shadow:
    inset 4px 4px 8px rgba(13, 128, 67, 0.08),
    inset -4px -4px 8px rgba(255, 255, 255, 0.7);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

body.light-theme select:hover, body.light-theme input:hover {
  border-color: rgba(13, 128, 67, 0.6);
  box-shadow: 
    inset 4px 4px 8px rgba(13, 128, 67, 0.12),
    inset -4px -4px 8px rgba(255, 255, 255, 0.8),
    0 0 0 3px rgba(13, 128, 67, 0.15);
  transform: translateY(-5px);
}

body.light-theme select:focus, body.light-theme input:focus {
  outline: none;
  border-color: rgba(13, 128, 67, 0.8);
  box-shadow: 
    inset 6px 6px 10px rgba(13, 128, 67, 0.15),
    inset -6px -6px 10px rgba(255, 255, 255, 0.9),
    0 0 0 3px rgba(13, 128, 67, 0.2);
  transform: translateY(-5px) translateZ(10px);
}

body.light-theme button {
  background: linear-gradient(145deg, #0d8043, #076a33);
  color: white;
  border-radius: 30px;
  box-shadow:
    10px 10px 20px rgba(13, 128, 67, 0.4),
    -6px -6px 12px rgba(13, 128, 67, 0.25),
    inset 3px 3px 6px rgba(255, 255, 255, 0.3),
    inset -3px -3px 6px rgba(7, 60, 30, 0.2);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-style: preserve-3d;
  overflow: hidden;
  position: relative;
}

body.light-theme button:hover {
  transform: translateY(-8px) translateZ(10px);
  box-shadow:
    15px 15px 30px rgba(13, 128, 67, 0.45),
    -10px -10px 20px rgba(13, 128, 67, 0.25),
    inset 4px 4px 8px rgba(255, 255, 255, 0.4),
    inset -4px -4px 8px rgba(7, 60, 30, 0.25);
}

body.light-theme button:active {
  transform: translateY(2px) scale(0.97);
  box-shadow:
    4px 4px 8px rgba(13, 128, 67, 0.4),
    -2px -2px 4px rgba(13, 128, 67, 0.2),
    inset 8px 8px 16px rgba(7, 60, 30, 0.25);
  border-radius: 25px 35px 35px 25px;
}

body.light-theme .hologram-effect {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.8), rgba(240, 247, 235, 0.6));
  border-radius: 30px;
  padding: 5px;
  box-shadow:
    10px 10px 20px rgba(13, 128, 67, 0.15),
    -10px -10px 20px rgba(248, 252, 245, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.5);
  overflow: hidden;
}

body.light-theme .form-active .hologram-effect {
  animation: none;
}

body.light-theme .result {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.7), rgba(240, 247, 235, 0.5));
  border-radius: 25px;
  padding: 30px 25px;
  color: #186037;
  box-shadow:
    inset 8px 8px 16px rgba(13, 128, 67, 0.1),
    inset -8px -8px 16px rgba(255, 255, 255, 0.7),
    5px 5px 10px rgba(13, 128, 67, 0.1);
  transform-style: preserve-3d;
}

body.light-theme .result:hover {
  box-shadow:
    12px 12px 24px rgba(13, 128, 67, 0.25),
    -8px -8px 16px rgba(248, 252, 245, 0.7),
    inset 8px 8px 16px rgba(13, 128, 67, 0.15),
    inset -8px -8px 16px rgba(255, 255, 255, 0.8);
  transform: translateY(-5px) translateZ(10px);
}

body.light-theme .form-active .result .text-lg {
  color: #186037;
  text-shadow: 0 0 5px rgba(13, 128, 67, 0.3);
}

body.light-theme .scan-line {
  background: transparent;
  box-shadow: none;
}

@keyframes borderPulse {
  0% {
    border-color: rgba(255, 255, 255, 0.7);
    box-shadow:
      15px 15px 30px rgba(13, 128, 67, 0.25),
      -15px -15px 30px rgba(248, 252, 245, 0.7),
      inset 5px 5px 10px rgba(255, 255, 255, 0.7),
      inset -5px -5px 10px rgba(13, 128, 67, 0.1);
  }
  100% {
    border-color: rgba(13, 128, 67, 0.3);
    box-shadow:
      15px 15px 30px rgba(13, 128, 67, 0.35),
      -15px -15px 30px rgba(248, 252, 245, 0.8),
      inset 5px 5px 10px rgba(255, 255, 255, 0.8),
      inset -5px -5px 10px rgba(13, 128, 67, 0.2);
  }
}

body.light-theme .refresh-btn {
  color: #0d8043;
}

body.light-theme .refresh-btn:hover {
  color: #076a33;
}

body.light-theme .result h3 {
  color: #2c4770;
}

.card-body {
  padding: 10px;
  overflow: visible;
  height: auto;
}

/* 价格显示的统一样式 */
.flex-col.items-center {
  min-width: 120px;
  text-align: center;
}

.text-xs.font-medium.mb-1 {
  color: var(--text-color);
  opacity: 0.7;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.text-lg.font-bold {
  margin-top: 2px;
}

/* 确保"TT"文本标签的宽度一致 */
.text-xs.font-medium:first-child {
  min-width: 80px;
}

/* 确保夜间模式下标签颜色正确 */
[data-theme="dark"] .text-xs.font-medium.mb-1 {
  color: var(--text-color);
}

/* 确保白天模式下标签颜色正确 */
body.light-theme .text-xs.font-medium.mb-1 {
  color: var(--text-primary);
}

/* 主题平滑过渡 */
html, body {
  transition: background-color 0.5s ease, color 0.5s ease;
}

/* 确保所有颜色相关属性平滑过渡 */
*, *::before, *::after {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* 避免影响UI动画和用户交互 */
button, input, select, textarea, a {
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* 基础样式 */ 