:root {
  --one-ink: #07101d;
  --one-text: #102033;
  --one-muted: #647789;
  --one-glass: rgba(248, 253, 255, 0.78);
  --one-glass-strong: rgba(255, 255, 255, 0.9);
  --one-line: rgba(255, 255, 255, 0.45);
  --one-cyan: #24d8c4;
  --one-blue: #7cb8ff;
  --one-orange: #ffb052;
  --one-green: #17b890;
  --one-red: #ff5c7a;
  --one-shadow: 0 34px 90px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.72);
  --one-radius: 30px;
}

html,
body {
  color: #f7fbff !important;
  background:
    radial-gradient(circle at 18% 18%, rgba(36, 216, 196, 0.3), transparent 25rem),
    radial-gradient(circle at 82% 8%, rgba(124, 184, 255, 0.28), transparent 28rem),
    #07101d url("./assets/liquid_energy_background.png") center / cover fixed no-repeat !important;
  font-family: ui-rounded, "SF Pro Display", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif !important;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, rgba(2, 8, 20, 0.78), rgba(6, 21, 33, 0.22) 48%, rgba(1, 8, 18, 0.7)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.026) 0 1px, transparent 1px 92px);
  z-index: -2;
}

body::after {
  content: "";
  position: fixed;
  width: 42rem;
  height: 42rem;
  right: -14rem;
  top: 6rem;
  border: 1px solid rgba(109, 245, 226, 0.2);
  border-radius: 50%;
  box-shadow: inset 0 0 60px rgba(109, 245, 226, 0.08);
  animation: oneDrift 12s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: -1;
}

.app-header {
  margin: 22px auto 0 !important;
  width: min(1180px, calc(100vw - 44px)) !important;
  min-height: 84px !important;
  padding: 14px 16px 14px 18px !important;
  border: 1px solid rgba(255, 255, 255, 0.28) !important;
  border-radius: 28px !important;
  background: rgba(255, 255, 255, 0.13) !important;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.32) !important;
  backdrop-filter: blur(28px) saturate(1.45) !important;
}

.app-title {
  color: #f7fbff !important;
  font-size: 19px !important;
  letter-spacing: 0 !important;
}

.brand-orb {
  width: 54px;
  height: 54px;
  display: inline-grid;
  place-items: center;
  border-radius: 18px;
  color: #103049;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(196, 246, 238, 0.74));
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  font-weight: 900;
  font-size: 15px;
}

.main-tabs {
  gap: 6px !important;
  max-width: 720px;
  overflow-x: auto;
  background: rgba(255, 255, 255, 0.12) !important;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px !important;
  padding: 5px !important;
}

.main-tab-btn {
  min-height: 42px !important;
  padding: 0 15px !important;
  border-radius: 999px !important;
  color: rgba(235, 248, 255, 0.78) !important;
  font-size: 13px !important;
  background: transparent !important;
  white-space: nowrap;
}

.main-tab-btn:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.12) !important;
}

.main-tab-btn.active {
  color: #102033 !important;
  background: rgba(255, 255, 255, 0.86) !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.panels-container {
  width: min(1180px, calc(100vw - 44px)) !important;
  margin: 20px auto 34px !important;
  height: calc(100vh - 140px) !important;
  min-height: 600px;
}

.tool-panel.active {
  animation: oneRise 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.simple-container,
.data-section,
.doc-editor-container,
.doc-sidebar,
.data-sidebar,
.data-main-area,
.doc-main-area,
#a4-content-container {
  color: var(--one-text) !important;
  border: 1px solid var(--one-line) !important;
  border-radius: var(--one-radius) !important;
  background: linear-gradient(135deg, var(--one-glass-strong), rgba(235, 249, 255, 0.68)) !important;
  box-shadow: var(--one-shadow) !important;
  backdrop-filter: blur(32px) saturate(1.42) !important;
}

.simple-container {
  position: relative;
  max-width: 1080px !important;
  margin: 0 auto !important;
  padding: 32px !important;
  overflow: hidden;
}

.simple-container::before,
.data-section::before,
.doc-editor-container::before,
.doc-sidebar::before,
.data-sidebar::before {
  content: "";
  position: absolute;
  inset: 1px 1px auto;
  height: 38%;
  border-radius: calc(var(--one-radius) - 2px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.38), transparent);
  pointer-events: none;
}

.simple-container h2 {
  color: #102033 !important;
  font-size: 28px !important;
  margin-bottom: 24px !important;
  letter-spacing: 0 !important;
}

.input-row,
.file-readout,
.data-summary-table,
.data-excel-table,
.doc-drop-zone,
.wind-input,
.wind-output,
.result-box,
.doc-editor-content,
#a4-drop-zone {
  border-color: rgba(20, 80, 110, 0.13) !important;
  border-radius: 22px !important;
  background: rgba(255, 255, 255, 0.62) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.input-row {
  padding: 14px !important;
  margin-bottom: 12px !important;
}

input[type="text"],
textarea,
select {
  border: 1px solid rgba(20, 80, 110, 0.14) !important;
  border-radius: 16px !important;
  outline: none !important;
  background: rgba(255, 255, 255, 0.72) !important;
  color: #102033 !important;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

input[type="text"]:focus,
textarea:focus,
select:focus {
  border-color: rgba(36, 216, 196, 0.75) !important;
  box-shadow: 0 0 0 5px rgba(36, 216, 196, 0.13) !important;
}

.btn,
.data-action-btn,
.btn-process,
.btn-add,
.btn-copy,
.btn-doc-copy,
#data-upload-btn,
#data-download-btn {
  border: 0 !important;
  border-radius: 999px !important;
  font-weight: 800 !important;
  box-shadow: 0 18px 42px rgba(10, 62, 79, 0.2);
}

.btn-add,
.btn-process,
#data-upload-btn,
#data-download-btn,
.btn-doc-copy {
  color: #fff !important;
  background: linear-gradient(135deg, #10243a, #0c5d68) !important;
}

.btn-copy {
  color: #0f2c3b !important;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(198, 246, 238, 0.78)) !important;
}

.btn-delete {
  width: 36px;
  height: 36px;
  padding: 0 !important;
  color: #9e2841 !important;
  background: rgba(255, 92, 122, 0.13) !important;
}

.helper-badge {
  border-radius: 999px !important;
  color: #07352f !important;
  background: rgba(36, 216, 196, 0.28) !important;
}

.result-box,
.wind-output {
  color: #103522 !important;
  font-size: 13px !important;
}

.data-sidebar,
.doc-sidebar {
  margin: 0 16px 0 0 !important;
  padding: 18px !important;
  overflow: hidden;
}

.data-sidebar-header {
  color: #102033 !important;
  border: 0 !important;
  border-radius: 24px !important;
  background: rgba(255, 255, 255, 0.5) !important;
}

.data-farm-item,
.doc-file-item,
.a4-summary,
.a4-turbine-btn {
  margin: 6px 0 !important;
  border: 0 !important;
  border-radius: 16px !important;
  color: #244055 !important;
  background: rgba(255, 255, 255, 0.44) !important;
}

.data-farm-item:hover,
.doc-file-item:hover,
.a4-summary:hover,
.a4-turbine-btn:hover {
  background: rgba(255, 255, 255, 0.72) !important;
}

.data-farm-item.active,
.doc-file-item.active,
.a4-turbine-btn.active {
  color: #102033 !important;
  background: rgba(255, 255, 255, 0.9) !important;
  box-shadow: inset 4px 0 0 var(--one-cyan);
}

.data-main-area,
.doc-main-area {
  padding: 24px !important;
  overflow: auto !important;
}

.data-section-title,
.doc-header h2,
#a4-selected-title {
  color: #102033 !important;
  border-left-color: var(--one-cyan) !important;
  font-size: 19px !important;
}

.data-summary-table th,
.data-excel-table tr:first-child,
.data-excel-table thead tr {
  color: #31495a !important;
  background: rgba(245, 250, 253, 0.86) !important;
}

.data-summary-table td,
.data-excel-table td,
.data-excel-table th {
  color: #102033 !important;
  border-color: rgba(20, 80, 110, 0.12) !important;
}

.data-summary-table tr.highlight-row {
  background: rgba(255, 176, 82, 0.17) !important;
}

.data-summary-table tr.highlight-row td {
  color: #8c5200 !important;
}

.data-empty-state {
  color: rgba(241, 250, 255, 0.78) !important;
  margin: 0 !important;
  min-height: 100%;
  display: grid;
  place-content: center;
}

.data-empty-state h2 {
  color: #ffffff !important;
  font-size: 30px;
}

.doc-drop-zone,
#a4-drop-zone {
  border: 1px dashed rgba(36, 216, 196, 0.55) !important;
  color: #38586c !important;
  background:
    radial-gradient(circle at 50% 20%, rgba(36, 216, 196, 0.14), transparent 8rem),
    rgba(255, 255, 255, 0.62) !important;
}

.doc-editor-content {
  background: transparent !important;
  box-shadow: none !important;
}

.doc-header {
  border-bottom-color: rgba(255, 255, 255, 0.5) !important;
}

.doc-main-area,
.data-main-area {
  color: #102033 !important;
}

.a4-compare-col {
  color: #102033 !important;
  background: rgba(36, 216, 196, 0.24) !important;
}

.data-cell-modified {
  color: #086c5b !important;
  background: rgba(36, 216, 196, 0.18) !important;
  border-color: rgba(36, 216, 196, 0.68) !important;
}

::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  background-clip: content-box;
}

::-webkit-scrollbar-track {
  background: transparent;
}

@keyframes oneRise {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes oneDrift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(-42px, 34px, 0) scale(1.06);
  }
}

@media (max-width: 980px) {
  body {
    height: auto !important;
    overflow: auto !important;
  }

  .app-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 14px !important;
  }

  .main-tabs {
    max-width: none !important;
  }

  .panels-container {
    height: auto !important;
    min-height: calc(100vh - 180px);
  }

  .tool-panel.flex-panel.active {
    flex-direction: column !important;
    overflow: visible !important;
  }

  .data-sidebar,
  .doc-sidebar {
    width: 100% !important;
    margin: 0 0 16px !important;
  }
}
