* {

  margin: 0;

  padding: 0;

  box-sizing: border-box;

}

body {

  background: #eef1f8;

  font-family:

    -apple-system,

    BlinkMacSystemFont,

    "PingFang SC",

    sans-serif;

  color: #222;

}

.app {

  display: flex;

  min-height: 100vh;

}

/* 左侧导航 */

.sidebar {

  width: 240px;

  background: white;

  padding: 30px 20px;

  box-shadow: 2px 0 10px rgba(0,0,0,0.05);

}

.logo {

  font-size: 28px;

  font-weight: bold;

  margin-bottom: 40px;

}

.menu {

  display: flex;

  flex-direction: column;

  gap: 12px;

}

.menu-item {

  padding: 14px 18px;

  border-radius: 14px;

  cursor: pointer;

  transition: 0.2s;

}

.menu-item:hover {

  background: #f3f5fb;

}

.menu-item.active {

  background: linear-gradient(

    135deg,

    #4f8cff,

    #7b61ff

  );

  color: white;

}

/* 主内容 */

.content {

  flex: 1;

  padding: 50px;

}

.page-header h1 {

  font-size: 42px;

  margin-bottom: 10px;

}

.page-header p {

  color: #777;

  margin-bottom: 40px;

}

.card {

  background: white;

  border-radius: 24px;

  padding: 30px;

  margin-bottom: 30px;

  box-shadow:

    0 10px 30px rgba(0,0,0,0.05);

}

textarea {

  width: 100%;

  height: 220px;

  border: none;

  outline: none;

  resize: none;

  font-size: 20px;

  line-height: 1.8;

}

button {

  margin-top: 20px;

  width: 100%;

  height: 60px;

  border: none;

  border-radius: 18px;

  background: linear-gradient(

    135deg,

    #4f8cff,

    #7b61ff

  );

  color: white;

  font-size: 22px;

  font-weight: bold;

  cursor: pointer;

}

.result {

  margin-top: 20px;

  font-size: 28px;

  line-height: 1.8;

}

/* 手机端适配 */

@media (max-width: 768px) {

  .app {

    flex-direction: column;

  }

  .sidebar {

    width: 100%;

    padding: 20px;

  }

  .menu {

    flex-direction: row;

    overflow-x: auto;

  }

  .content {

    padding: 20px;

  }

  .page-header h1 {

    font-size: 32px;

  }

}



.currency-grid {

  display: flex;

  flex-direction: column;

  gap: 24px;

}

.currency-row {

  display: grid;

  grid-template-columns: 120px 1fr 180px;

  align-items: center;

  gap: 20px;

}

.currency-row label {

  font-size: 30px;

  font-weight: 600;

}

.currency-row input {

  padding: 18px;

  border: none;

  border-radius: 16px;

  font-size: 28px;

  outline: none;

  background: #f7f7f7;

}

.currency-row button {

  border: none;

  border-radius: 16px;

  background: linear-gradient(

    135deg,

    #4f8cff,

    #7b5cff

  );

  color: white;

  font-size: 22px;

  font-weight: bold;

  cursor: pointer;

  height: 64px;

}



.exchange-layout {

  display: flex;

  gap: 40px;

  align-items: center;

}

.exchange-left {

  flex: 1;

}

.exchange-right {

  width: 220px;

  display: flex;

  justify-content: center;

  align-items: center;

}

#exchangeClearBtn {

  width: 200px;

  height: 100px;

  font-size: 34px;

  border-radius: 24px;

}

/* 手机适配 */

@media (max-width: 900px) {

  .exchange-layout {

    flex-direction: column;

  }

  .exchange-right {

    width: 100%;

  }

  #exchangeClearBtn {

  width: 100%;

  height: 70px;

  font-size: 26px;

}

}



.locked-input {

  opacity: 0.7;

  cursor: pointer;

}




.currency-row label {

  display: flex;

  flex-direction: column;

  justify-content: center;

  gap: 4px;

  min-width: 140px;

}

.unit-cn {

  font-size: 26px;

  font-weight: 600;

  white-space: nowrap;

}

.unit-en {

  font-size: 16px;

  color: #888;

  letter-spacing: 1px;

}



/* =========================
   设置页
========================= */

.settings-card {

  background: white;

  border-radius: 24px;

  padding: 30px;

  margin-top: 20px;

}

.setting-item {

  display: flex;

  justify-content: space-between;

  align-items: center;

}

.setting-info h3 {

  font-size: 24px;

  margin-bottom: 8px;

}

.setting-info p {

  color: #888;

  font-size: 16px;

}

/* 开关 */

.switch {

  position: relative;

  display: inline-block;

  width: 64px;

  height: 34px;

}

.switch input {

  opacity: 0;

  width: 0;

  height: 0;

}

.slider {

  position: absolute;

  cursor: pointer;

  inset: 0;

  background: #ccc;

  transition: .3s;

  border-radius: 34px;

}

.slider::before {

  position: absolute;

  content: "";

  height: 26px;

  width: 26px;

  left: 4px;

  top: 4px;

  background: white;

  transition: .3s;

  border-radius: 50%;

}

input:checked + .slider {

  background: linear-gradient(

    90deg,

    #4f8cff,

    #7b61ff

  );

}

input:checked + .slider::before {

  transform: translateX(30px);

}

/* =========================
   深色模式
========================= */

body.dark-mode {

  background: #111827;

  color: white;

}

body.dark-mode .sidebar {

  background: #1f2937;

}

body.dark-mode .card,

body.dark-mode .settings-card {

  background: #1f2937;

}

body.dark-mode input,

body.dark-mode textarea {

  background: #374151;

  color: white;

}

body.dark-mode .unit-en,

body.dark-mode p {

  color: #aaa;

}