/* =========================================
   AINFT Platform Governance - Vote Page
   ========================================= */

:root {
  --bg: #FAFAFA;
  --fg: #000000;
  --black: #000000;
  --white: #FFFFFF;
  --pad: 60px;
  --pad-inner: 120px;
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
  --font: 'Inter', 'Helvetica Neue', -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
  --nav-height: 80px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: var(--font);
  font-size: 16px;
  background: var(--bg);
  color: var(--fg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ================= Background Image ================= */
.bg-image {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: url('../assets/votebackgroud.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
  pointer-events: none;
}

/* ================= Logo Styles ================= */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--fg);
  transition: color 600ms var(--ease-soft);
}

.logo__mark {
  width: 24px;
  height: 24px;
  border: 2px solid currentColor;
  transform: rotate(45deg);
  position: relative;
  transition: border-color 600ms var(--ease-soft);
}

.logo__mark::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  background: currentColor;
  transform: translate(-50%, -50%);
  transition: background-color 600ms var(--ease-soft);
}

.logo__text {
  font-weight: 700;
  letter-spacing: 0.1em;
  font-size: 18px;
  transition: color 600ms var(--ease-soft);
}

.logo--white {
  color: #fff;
}

/* ================= Header (与 index.html 一致) ================= */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 100;
  display: grid;
  grid-template-columns: 200px 1fr auto;
  align-items: center;
  padding: 0 var(--pad);
  background: transparent; /* 透明背景 */
  transition: background 0.3s;
}

.topbar__left {
  display: flex;
  align-items: center;
}

.topbar__center {
  display: flex;
  justify-content: flex-end;
  gap: 10px; /* 与 index.html 一致的间隔 */
  padding-right: 30px;
}

.nav-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 20px;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: rgb(0, 0, 0);
  border: 1.5px solid rgba(0, 0, 0, 0.85);
  border-radius: 2px;
  background: transparent;
  white-space: nowrap;
  pointer-events: none;
  cursor: default;
  transition: 
    color 600ms var(--ease-soft),
    border-color 600ms var(--ease-soft),
    background-color 600ms var(--ease-soft);
}

/* 可点击的导航按钮（平台治理） */
.nav-tab-link {
  text-decoration: none;
  pointer-events: auto;
  cursor: pointer;
}

.nav-tab-link:hover {
  background: rgba(0, 0, 0, 0.05);
}

.nav-tab-active {
  background: rgba(0, 0, 0, 0.05);
}

.topbar__right {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 24px; /* 与 index.html 一致的间隔 */
}

.btn-wallet {
  height: 36px;
  padding: 0 20px;
  border: 1.5px solid rgba(0, 0, 0, 0.85);
  border-radius: 2px;
  background: transparent;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: rgb(0, 0, 0);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-wallet:hover {
  background: rgba(0, 0, 0, 0.05);
}

.lang-btn {
  background: none;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  color: var(--fg);
  transition: opacity 0.2s;
}

.lang-btn:hover {
  opacity: 0.7;
}

.menu-btn {
  background: none;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  color: var(--fg);
  display: flex;
  align-items: center;
  gap: 10px;
}

.menu-text {
  font-weight: 600;
  letter-spacing: 0.05em;
}

.menu-icon {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 20px;
}

.menu-icon span {
  width: 100%;
  height: 2px;
  background: var(--fg);
  transition: all 0.3s;
}

.menu-icon--close span:first-child {
  transform: rotate(45deg) translateY(6px);
}

.menu-icon--close span:last-child {
  transform: rotate(-45deg) translateY(-6px);
}

/* ================= Menu Overlay (与 index.html 一致) ================= */
.menuOverlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #0b0c0f;
  color: #fff;
  clip-path: circle(0% at 95% 5%);
  transition: clip-path 0.8s var(--ease-soft);
  display: flex;
  flex-direction: column;
  padding: 0;
}

.menuOverlay:not([hidden]) {
  clip-path: circle(150% at 95% 5%);
}

.menu-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px var(--pad);
  height: var(--nav-height);
}

.menu-close-btn {
  background: none;
  border: none;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  color: #fff;
}

.menuNav {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 40px var(--pad-inner);
  max-width: 800px;
}

.menuLink {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 42px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  transition: transform 600ms var(--ease-soft), opacity 600ms var(--ease-soft);
  opacity: 0;
  transform: translateY(20px);
}

.menuOverlay:not([hidden]) .menuLink {
  opacity: 1;
  transform: translateY(0);
}

.menuLink:nth-child(1) {
  transition-delay: 0.2s;
}

.menuLink:nth-child(2) {
  transition-delay: 0.3s;
}

.menuLink:nth-child(3) {
  transition-delay: 0.4s;
}

.menuLink:nth-child(4) {
  transition-delay: 0.5s;
}

.menuLink:nth-child(5) {
  transition-delay: 0.6s;
}

.menuLink:nth-child(6) {
  transition-delay: 0.7s;
}

.menuLink:nth-child(7) {
  transition-delay: 0.8s;
}

.menuLink:nth-child(8) {
  transition-delay: 0.9s;
}

.menuLink:hover {
  transform: translateX(16px);
  opacity: 0.8;
}

.menuLink__num {
  font-size: 16px;
  font-weight: 400;
  opacity: 0.4;
  min-width: 40px;
  display: inline-block;
}

.menuLink__txt {
  flex: 1;
}

.menuLink__badge {
  background: #ff4b4b;
  color: #fff;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 2px;
  font-weight: 600;
  letter-spacing: 0.05em;
  display: inline-block;
}

/* ================= Main ================= */
main {
  padding-top: calc(var(--nav-height) + 40px);
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 var(--pad-inner) 80px;
}

h1 {
  font-size: 32px;
  font-weight: 600;
  margin: 0;
  color: #111;
}

.desc {
  margin-top: 12px;
  font-size: 13px;
  color: #666;
  max-width: 900px;
  line-height: 1.6;
}

.layout {
  display: flex;
  gap: 32px;
  margin-top: 32px;
}

.left {
  flex: 0 0 68%;
}

.right {
  flex: 0 0 32%;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ================= Cards ================= */
.card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 4px;
  overflow: hidden;
}

.card-header {
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #eee;
  font-weight: 500;
  font-size: 14px;
}

.filter-select {
  padding: 4px 8px;
  border: 1px solid #ddd;
  border-radius: 3px;
  font-size: 13px;
  background: #fff;
  cursor: pointer;
}

.filter-select:hover {
  border-color: #999;
}

.proposal-list {
  max-height: 600px;
  overflow-y: auto;
}

.proposal-item {
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #eee;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
  min-height: 56px;
}

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

.proposal-item:hover {
  background: #fafafa;
}

.proposal-item-left {
  display: flex;
  align-items: center;
  flex: 1;
}

.proposal-item-right {
  font-size: 12px;
  color: #999;
  white-space: nowrap;
  margin-left: 16px;
}

.proposal-info {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 8px;
}

.proposal-meta {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: #999;
  white-space: nowrap;
}

.proposal-title {
  flex: 1;
}

.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 12px;
  margin-right: 8px;
  color: #fff;
  font-weight: 500;
  white-space: nowrap;
}

.tag.pass {
  background: #4fd1c5;
}

.tag.fail {
  background: #f56565;
}

.tag-pass {
  background: #4fd1c5;
}

.tag-fail {
  background: #f56565;
}

.card-body {
  padding: 16px 20px;
  font-size: 13px;
  color: #555;
}

.card-body p {
  margin: 8px 0;
  line-height: 1.8;
}

.balance-text {
  font-size: 14px;
  font-weight: 500;
}

.card-footer {
  padding: 16px 20px;
  display: flex;
  gap: 12px;
  border-top: 1px solid #eee;
}

.btn {
  height: 36px;
  padding: 0 14px;
  border: 1px solid #111;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  border-radius: 2px;
  transition: all 0.2s;
}

.btn:hover {
  background: #f5f5f5;
}

.btn-small {
  height: 28px;
  padding: 0 12px;
  font-size: 12px;
}

.btn-primary {
  background: #4fd1c5;
  border: none;
  color: #fff;
  flex: 1;
}

.btn-primary:hover {
  background: #38b2ac;
}

.btn-secondary {
  background: #fff;
  border: 1px solid #111;
  flex: 1;
}

/* ================= Responsive ================= */
@media (max-width: 1200px) {
  :root {
    --pad: 40px;
    --pad-inner: 60px;
  }
}

@media (max-width: 1024px) {
  .topbar__center {
    display: none;
  }
  
  .menuLink {
    font-size: 32px;
  }
}

@media (max-width: 768px) {
  :root {
    --pad: 24px;
    --pad-inner: 24px;
  }

  .layout {
    flex-direction: column;
    gap: 20px;
  }

  .left,
  .right {
    flex: 1;
  }

  .menuLink {
    font-size: 28px;
    gap: 20px;
  }

  .menuLink__num {
    font-size: 14px;
    min-width: 30px;
  }
}
