/* ȫ�ֻ��� */
*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --gradient-top:    #13d8a7;
  --gradient-upper:  #10cdb0;
  --gradient-mid:    #0cc0b6;
  --gradient-lower:  #06adb5;
  --gradient-bottom: #039fb3;
  --gradient-bar:    #0a7c91;
}

body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: #333;
  background: #fff;
}

a {
  text-decoration: none;
  color: inherit;
}

/* �̶������� */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(
    180deg,
    rgba(46, 207, 168, 0.97) 0%,
    rgba(29, 185, 154, 0.95) 100%
  );
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 12px rgba(6, 92, 98, 0.18);
}

.site-header .header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 40px;
}

.site-header .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.site-header .logo-icon {
  width: 36px;
  height: 36px;
  background: #fff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.site-header .logo-text {
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 1px;
}

.site-header .main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  flex: 1;
}

.site-header .nav-link {
  color: #fff;
  font-size: 15px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: opacity 0.2s;
}

.site-header .nav-link:hover {
  opacity: 0.85;
}

.site-header .nav-badge {
  font-size: 10px;
  background: #ff4d4f;
  color: #fff;
  padding: 1px 5px;
  border-radius: 3px;
  line-height: 1.4;
  font-weight: 500;
}

.site-header .nav-arrow {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #fff;
  margin-left: 2px;
}

.site-header .user-center {
  margin-left: auto;
  position: relative;
}

.site-header .user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: 15px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.site-header .user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.site-header .user-dropdown {
  position: absolute;
  left: 24px;
  right: auto;
  top: calc(100% + 8px);
  width: 160px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: all 0.2s;
}

.site-header .user-center:hover .user-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.site-header .dropdown-item {
  display: block;
  padding: 10px 16px;
  font-size: 14px;
  color: #555;
  transition: background 0.15s;
}

.site-header .dropdown-item:hover {
  background: #f5f5f5;
}

.site-header .dropdown-item.danger {
  color: #ff4d4f;
}

/* ����ռλ */
.header-spacer {
  height: 64px;
}

/* Hero ����������ɫ���䵽��ɫ�����϶��� */
.hero-zone {
  background: linear-gradient(
    180deg,
    var(--gradient-top)    0%,
    var(--gradient-upper)  20%,
    var(--gradient-mid)    50%,
    var(--gradient-lower)  78%,
    var(--gradient-bottom) 100%
  );
}

/* ��ҳ Hero ������ */
.hero {
  position: relative;
  padding: 178px 24px 154px;
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 90% 50% at 50% 0%, rgba(255, 255, 255, 0.22) 0%, transparent 60%);
  pointer-events: none;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero-title {
  color: #fff;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  margin: 0 0 26px;
}

.hero-subtitle {
  color: rgba(255, 255, 255, 0.92);
  font-size: 20px;
  margin: 0 0 46px;
}

.hero-subtitle span + span::before {
  content: " · ";
  margin: 0 14px;
}

/* ������ */
.search-box {
  max-width: 720px;
  margin: 0 auto 16px;
  display: flex;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.search-box .search-icon {
  display: flex;
  align-items: center;
  padding: 0 16px;
  color: #bbb;
}

.search-box input {
  flex: 1;
  border: none;
  outline: none;
  padding: 16px 0;
  font-size: 15px;
  color: #333;
}

.search-box input::placeholder {
  color: #bbb;
}

.search-box .search-btn {
  background: linear-gradient(180deg, #0fa08e 0%, #087076 100%);
  color: #fff;
  border: none;
  padding: 0 28px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: filter 0.2s;
  white-space: nowrap;
}

.search-box .search-btn:hover {
  filter: brightness(1.1);
}

/* �������� */
.hot-tags {
  max-width: 720px;
  margin: 0 auto 40px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.hot-tags .label {
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
}

.hot-tags a {
  color: #fff;
  font-size: 13px;
  padding: 4px 14px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 20px;
  transition: background 0.2s;
}

.hot-tags a:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* �����ܿ�Ƭ */
.feature-cards {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  background: #fff;
  border-radius: 12px;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.feature-card .card-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.feature-card .card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.feature-card .card-icon.teal   { background: #e4f8f4; color: #0fa08e; }
.feature-card .card-icon.purple { background: #f3eeff; color: #7c5cfc; }
.feature-card .card-icon.orange { background: #fff3e6; color: #ff8c2a; }

.feature-card h3 {
  margin: 0 0 4px;
  font-size: 17px;
  color: #222;
}

.feature-card p {
  margin: 0;
  font-size: 13px;
  color: #999;
}

.feature-card .card-arrow {
  color: #ccc;
  flex-shrink: 0;
}

/* ����ͨ�� */
.advantages {
  background: var(--gradient-bar);
  padding: 22px 24px;
  position: relative;
  z-index: 2;
}

.advantages-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.advantage-item {
  text-align: center;
}

.advantage-item .adv-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 10px;
  color: #fff;
}

.advantage-item h4 {
  margin: 0 0 6px;
  font-size: 16px;
  color: #fff;
  font-weight: 600;
}

.advantage-item p {
  margin: 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
}

/* ģ������ */
.templates-section {
  background: #fff;
  padding: 56px 24px 72px;
}

.templates-section .section-header {
  text-align: center;
  margin-bottom: 40px;
}

.templates-section h2 {
  margin: 0 0 12px;
  font-size: 2rem;
  color: #222;
  font-weight: 700;
}

.templates-section .section-desc {
  margin: 0;
  font-size: 16px;
  color: #999;
}

.templates-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.template-card {
  cursor: pointer;
  position: relative;
}

.template-preview {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  aspect-ratio: 3 / 4.2;
  position: relative;
}

.template-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: top center;
  position: relative;
  transition: box-shadow 0.3s;
}

.template-card:hover .template-preview {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.template-preview .preview-inner {
  padding: 16px;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.template-preview .preview-bar {
  height: 8px;
  border-radius: 4px;
  background: #0fa08e;
}

.template-preview .preview-bar.short  { width: 60%; }
.template-preview .preview-bar.medium { width: 80%; }

.template-preview .preview-line {
  height: 4px;
  border-radius: 2px;
  background: #eee;
}

.template-preview .preview-line:nth-child(odd)  { width: 90%; }
.template-preview .preview-line:nth-child(even) { width: 70%; }

.template-card .use-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 160, 142, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
  border-radius: 8px;
}

.template-card:hover .use-overlay {
  opacity: 1;
}

.template-card .use-btn {
  background: #fff;
  color: #0fa08e;
  border: none;
  padding: 10px 28px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.template-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.template-tags span {
  font-size: 12px;
  color: #ff8c2a;
  background: #fff3e6;
  padding: 2px 8px;
  border-radius: 4px;
}

/* �Ҳม����ť */
.float-sidebar {
  position: fixed;
  right: 24px;
  bottom: 120px;
  z-index: 900;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.float-btn {
  width: 48px;
  height: 48px;
  background: linear-gradient(180deg, #0fa08e 0%, #087076 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(8, 112, 118, 0.4);
  transition: filter 0.2s, transform 0.2s;
}

.float-btn:hover {
  filter: brightness(1.12);
  transform: scale(1.05);
}

.float-btn.hidden {
  opacity: 0;
  pointer-events: none;
}

/* 模板选择页 */
.template-list-page {
  min-height: 100vh;
  background: #7d879f;
}

.template-library {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 24px 72px;
}

.template-library-header {
  text-align: center;
  color: #fff;
  margin-bottom: 28px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
}

.template-library-header h1 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 600;
}

.template-library-header p {
  margin: 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.78);
}

.library-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px 24px;
}

.library-card {
  display: block;
  background: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s, box-shadow 0.2s;
}

.library-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}

.library-preview {
  position: relative;
  aspect-ratio: 3 / 4.2;
  overflow: hidden;
  background: #fff;
}

.library-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: top center;
}

.library-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 160, 142, 0.72);
  opacity: 0;
  transition: opacity 0.25s;
}

.library-card:hover .library-overlay {
  opacity: 1;
}

.library-overlay span {
  color: #0fa08e;
  background: #fff;
  border-radius: 4px;
  padding: 10px 28px;
  font-size: 15px;
  font-weight: 600;
}

.library-info {
  padding: 12px 12px 14px;
}

.library-info h3 {
  margin: 0 0 8px;
  color: #555;
  font-size: 14px;
  font-weight: 500;
}

.library-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.library-tags span {
  color: #ff8c2a;
  background: #fff3e6;
  border: 1px solid #ffd8ae;
  border-radius: 3px;
  padding: 2px 7px;
  font-size: 12px;
}

@media (max-width: 1024px) {
  .library-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .library-grid {
    grid-template-columns: 1fr;
  }
}

/* ��Ӧʽ */
@media (max-width: 1024px) {
  .feature-cards {
    grid-template-columns: 1fr;
    max-width: 480px;
  }

  .advantages-inner {
    grid-template-columns: repeat(2, 1fr);
  }

  .templates-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .site-header .main-nav {
    display: none;
  }
}

@media (max-width: 640px) {
  .advantages-inner {
    grid-template-columns: 1fr;
  }

  .templates-grid {
    grid-template-columns: 1fr;
    max-width: 320px;
  }

  .search-box {
    flex-direction: column;
  }

  .search-box .search-btn {
    padding: 14px;
  }
}

/* Home auth dropdown and modal */
.site-header button.dropdown-item {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
}
.home-auth-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, .42);
}
.home-auth-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2001;
  width: 360px;
  max-width: calc(100vw - 32px);
  padding: 26px 28px 24px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 22px 70px rgba(0, 0, 0, .28);
}
.home-auth-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  font-size: 24px;
  color: #999;
  cursor: pointer;
}
.home-auth-modal h3 {
  margin: 0 0 8px;
  font-size: 22px;
  color: #222;
}
.home-auth-tip {
  margin: 0 0 18px;
  color: #777;
  font-size: 13px;
}
.home-auth-form label {
  display: block;
  margin-bottom: 12px;
}
.home-auth-form label span {
  display: block;
  margin-bottom: 6px;
  color: #444;
  font-size: 13px;
}
.home-auth-form input {
  width: 100%;
  height: 40px;
  border: 1px solid #dcdfe6;
  border-radius: 8px;
  padding: 0 12px;
  outline: none;
}
.home-auth-form input:focus {
  border-color: #19c9a5;
  box-shadow: 0 0 0 3px rgba(25, 201, 165, .12);
}
.home-auth-error {
  min-height: 20px;
  color: #f04444;
  font-size: 13px;
  margin: 2px 0 10px;
}
.home-auth-submit {
  width: 100%;
  height: 42px;
  border: 0;
  border-radius: 8px;
  background: #19c9a5;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.home-auth-form p {
  margin: 14px 0 0;
  color: #777;
  text-align: center;
  font-size: 13px;
}
.home-auth-form p button {
  border: 0;
  background: transparent;
  color: #19bfa4;
  cursor: pointer;
}
.home-auth-captcha-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 12px;
}
.home-auth-captcha-row label {
  flex: 1;
  margin-bottom: 0;
}
.home-auth-captcha-img {
  width: 130px;
  height: 40px;
  border: 1px solid #dcdfe6;
  border-radius: 8px;
  object-fit: cover;
  cursor: pointer;
  background: #f6fbfa;
}
.home-field-status {
  min-height: 18px;
  margin: -6px 0 8px;
  font-size: 13px;
  line-height: 18px;
  color: #999;
}
.home-field-status.success {
  color: #16a36f;
}
.home-field-status.error {
  color: #f04444;
}
.home-field-status.checking {
  color: #7a8599;
}
.home-field-status.success:not(:empty)::before {
  content: "✓";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  margin-right: 5px;
  border-radius: 50%;
  background: #16a36f;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  vertical-align: 1px;
}
.home-field-status.error:not(:empty)::before {
  content: "!";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  margin-right: 5px;
  border-radius: 50%;
  background: #f04444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  vertical-align: 1px;
}
.home-password-field {
  position: relative;
  display: block;
  width: calc(100% - 10px);
}
.home-password-field input {
  padding-right: 42px;
}
.home-eye-btn {
  position: absolute;
  right: 1px;
  top: 1px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 38px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #8792a2;
  cursor: pointer;
}
.home-eye-btn:hover {
  color: #19bfa4;
}
.home-eye-icon {
  position: relative;
  width: 18px;
  height: 12px;
  border: 1.8px solid currentColor;
  border-radius: 50% / 60%;
}
.home-eye-icon::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  transform: translate(-50%, -50%);
}
.home-eye-icon::after {
  content: "";
  position: absolute;
  left: -4px;
  top: 5px;
  width: 26px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transform: rotate(-38deg);
}
.home-eye-btn.is-visible .home-eye-icon::after {
  display: none;
}
.home-auth-form label {
  margin-bottom: 6px;
}
.home-field-status {
  min-height: 20px;
  margin: 4px 0 10px;
  font-size: 13px;
  line-height: 18px;
}
.home-password-field {
  width: 100%;
}
.home-password-field input,
.home-auth-form > label > input {
  width: 100%;
}
.home-auth-captcha-row {
  margin-top: 0;
}
.site-header .header-inner {
  position: relative;
  justify-content: center;
}
.site-header .logo {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.site-header .user-center {
  margin-left: auto;
}
/* Home header corner layout: remove floating top bar, keep logo/user buttons. */
.site-header {
  position: absolute;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}
.site-header .header-inner {
  max-width: none;
  height: 58px;
  padding: 0;
  position: relative;
}
.site-header .logo {
  position: absolute;
  left: 32px;
  top: 10px;
  transform: none;
}
.site-header .user-center {
  position: absolute;
  right: 40px;
  top: 13px;
  margin-left: 0;
}
.header-spacer {
  display: none;
  height: 0;
}
.advantage-item .adv-icon {
  width: 32px;
  height: 32px;
  margin-bottom: 6px;
}
.advantage-item .adv-icon svg {
  width: 32px;
  height: 32px;
}
.advantage-item h4 {
  margin-bottom: 4px;
  font-size: 14px;
}
.advantage-item p {
  font-size: 12px;
}
.site-header .user-center {
  right: 72px;
}
.site-header .user-dropdown {
  left: auto;
  right: 0;
}
.user-avatar[class*="avatar-"] {
  color: #fff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.16);
}
.user-avatar[class*="avatar-"] span {
  position: relative;
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
}
.user-avatar[class*="avatar-"] span::before,
.user-avatar[class*="avatar-"] span::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: currentColor;
}
.user-avatar[class*="avatar-"] span::before {
  width: 7px;
  height: 7px;
  left: 5.5px;
  top: 3px;
}
.user-avatar[class*="avatar-"] span::after {
  width: 12px;
  height: 6px;
  left: 3px;
  bottom: 2px;
  border-radius: 8px 8px 4px 4px;
}
.user-avatar.avatar-1 { background: linear-gradient(135deg, #16c7a7, #0b8fa5); color: #0b8fa5; }
.user-avatar.avatar-2 { background: linear-gradient(135deg, #6c8cff, #8a5cf6); color: #6c63ff; }
.user-avatar.avatar-3 { background: linear-gradient(135deg, #ffb84d, #ff7a59); color: #f07818; }
.user-avatar.avatar-4 { background: linear-gradient(135deg, #35d07f, #11998e); color: #11998e; }
.user-avatar.avatar-5 { background: linear-gradient(135deg, #ff6b9d, #c445ff); color: #d63384; }
.user-avatar.avatar-6 { background: linear-gradient(135deg, #4facfe, #00c6fb); color: #0984c6; }
.user-avatar.avatar-7 { background: linear-gradient(135deg, #ffd166, #ef476f); color: #d9480f; }
.user-avatar.avatar-8 { background: linear-gradient(135deg, #7bdff2, #b2f7ef); color: #087f8c; }
.account-page {
  min-height: 100vh;
  background: linear-gradient(180deg, #13d8a7 0%, #039fb3 100%);
}
.account-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.account-card {
  width: min(720px, 100%);
  background: rgba(255, 255, 255, 0.96);
  border-radius: 22px;
  box-shadow: 0 24px 70px rgba(0, 80, 100, 0.22);
  padding: 34px;
}
.account-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}
.account-card h1 {
  margin: 0 0 8px;
  color: #12263f;
  font-size: 28px;
}
.account-card p {
  margin: 0;
  color: #667085;
}
.account-back {
  color: #0a7c91;
  font-weight: 600;
  white-space: nowrap;
}
.account-form {
  display: grid;
  gap: 18px;
}
.account-form label,
.account-avatar-section {
  display: grid;
  gap: 8px;
}
.account-form label span,
.account-label {
  color: #344054;
  font-weight: 600;
}
.account-form input {
  width: 100%;
  height: 44px;
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  padding: 0 14px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.account-form input:focus {
  border-color: #13bfa8;
  box-shadow: 0 0 0 3px rgba(19, 191, 168, 0.14);
}
.account-avatar-grid {
  display: grid;
  grid-template-columns: repeat(8, 42px);
  gap: 12px;
}
.account-avatar-option {
  width: 42px;
  height: 42px;
  border: 3px solid transparent;
  padding: 0;
  cursor: pointer;
}
.account-avatar-option.selected {
  border-color: #0a7c91;
  box-shadow: 0 0 0 3px rgba(10, 124, 145, 0.18);
}
.account-password-tip {
  padding: 10px 12px;
  border-radius: 10px;
  background: #f0fffb;
  color: #0a7c91;
  font-size: 14px;
}
.account-message {
  min-height: 22px;
  color: #667085;
  font-size: 14px;
}
.account-message.success {
  color: #079455;
}
.account-message.error {
  color: #d92d20;
}
.account-submit {
  height: 46px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #13d8a7, #039fb3);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(3, 159, 179, 0.24);
}
.account-submit:hover {
  filter: brightness(1.03);
}
@media (max-width: 620px) {
  .account-card {
    padding: 24px;
  }
  .account-card-header {
    flex-direction: column;
  }
  .account-avatar-grid {
    grid-template-columns: repeat(4, 42px);
  }
}
.site-header .user-center {
  right: 132px;
}
.site-header .user-dropdown {
  left: 40px;
  right: auto;
  max-width: calc(100vw - 56px);
}
.user-avatar.avatar-image {
  background: #fff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.14);
}
.user-avatar.avatar-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.account-avatar-option.avatar-image {
  overflow: hidden;
}


/* ====== Mobile Responsive (max-width: 768px) ====== */

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  flex-direction: column;
  gap: 5px;
  margin-left: auto;
}
.mobile-menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.mobile-menu-btn.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-menu-btn.is-open span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 768px) {
  html { overflow-x: hidden; }
  body { overflow-x: hidden; }

  /* Header mobile */
  .site-header .header-inner {
    padding: 0 16px;
    height: 56px;
    gap: 12px;
  }
  .site-header .logo-text { font-size: 18px; }
  .mobile-menu-btn { display: flex; }
  .site-header .main-nav {
    display: none;
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, rgba(29, 185, 154, 0.98), rgba(6, 92, 98, 0.98));
    flex-direction: column;
    padding: 16px 20px;
    gap: 4px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    z-index: 999;
    max-height: calc(100vh - 56px);
    overflow-y: auto;
  }
  .site-header .main-nav.mobile-open { display: flex; }
  .site-header .main-nav .nav-link {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 15px;
  }
  .site-header .main-nav .nav-link:hover { background: rgba(255,255,255,0.1); }
  .site-header .user-center { position: static; margin-left: 0; }
  .header-spacer { height: 56px; }

  /* Hero zone */
  .hero-zone { padding-top: 20px; }
  .hero { padding: 24px 16px; text-align: center; }
  .hero-title { font-size: 22px; line-height: 1.4; }
  .hero-subtitle { font-size: 13px; flex-wrap: wrap; justify-content: center; gap: 8px; }

  /* Feature cards - vertical stack */
  .feature-cards {
    flex-direction: column;
    gap: 12px;
    padding: 0 16px;
  }
  .feature-card {
    width: 100%;
    padding: 16px 20px;
  }

  /* Advantages - 2x2 grid */
  .advantages-inner {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 24px 16px;
  }
  .advantage-item { padding: 16px 12px; }
  .advantage-item h4 { font-size: 14px; }
  .advantage-item p { font-size: 12px; }

  /* Templates grid */
  .templates-section { padding: 24px 16px; }
  .section-header h2 { font-size: 20px; }
  .templates-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .template-card { width: 100%; }

  /* Auth modal */
  .home-auth-modal {
    width: calc(100vw - 32px);
    max-width: 100%;
    max-height: 90vh;
    overflow-y: auto;
  }

  /* Float sidebar */
  .float-sidebar { right: 12px; bottom: 12px; }
}


/* ====== Mobile Responsive (max-width: 768px) ====== */

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  flex-direction: column;
  gap: 5px;
  margin-left: auto;
}
.mobile-menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.mobile-menu-btn.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-menu-btn.is-open span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 768px) {
  html { overflow-x: hidden; }
  body { overflow-x: hidden; }

  /* Header mobile */
  .site-header .header-inner {
    padding: 0 16px;
    height: 56px;
    gap: 12px;
  }
  .site-header .logo-text { font-size: 18px; }
  .mobile-menu-btn { display: flex; }
  .site-header .main-nav {
    display: none;
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, rgba(29, 185, 154, 0.98), rgba(6, 92, 98, 0.98));
    flex-direction: column;
    padding: 16px 20px;
    gap: 4px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    z-index: 999;
    max-height: calc(100vh - 56px);
    overflow-y: auto;
  }
  .site-header .main-nav.mobile-open { display: flex; }
  .site-header .main-nav .nav-link {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 15px;
  }
  .site-header .main-nav .nav-link:hover { background: rgba(255,255,255,0.1); }
  .site-header .user-center { position: static; margin-left: 0; }
  .header-spacer { height: 56px; }

  /* Hero zone */
  .hero-zone { padding-top: 20px; }
  .hero { padding: 24px 16px; text-align: center; }
  .hero-title { font-size: 22px; line-height: 1.4; }
  .hero-subtitle { font-size: 13px; flex-wrap: wrap; justify-content: center; gap: 8px; }

  /* Feature cards - vertical stack */
  .feature-cards {
    flex-direction: column;
    gap: 12px;
    padding: 0 16px;
  }
  .feature-card {
    width: 100%;
    padding: 16px 20px;
  }

  /* Advantages - 2x2 grid */
  .advantages-inner {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 24px 16px;
  }
  .advantage-item { padding: 16px 12px; }
  .advantage-item h4 { font-size: 14px; }
  .advantage-item p { font-size: 12px; }

  /* Templates grid */
  .templates-section { padding: 24px 16px; }
  .section-header h2 { font-size: 20px; }
  .templates-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .template-card { width: 100%; }

  /* Auth modal */
  .home-auth-modal {
    width: calc(100vw - 32px);
    max-width: 100%;
    max-height: 90vh;
    overflow-y: auto;
  }

  /* Float sidebar */
  .float-sidebar { right: 12px; bottom: 12px; }
}


/* Keep generated navigation only for mobile hamburger menu */
@media (min-width: 769px) {
  .site-header .main-nav {
    display: none !important;
  }
}


/* Header: keep only home logo and user center on all devices */
.site-header .logo {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}
.site-header .user-center {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}
.site-header .main-nav,
.mobile-menu-btn {
  display: none !important;
}
@media (max-width: 768px) {
  .site-header .logo {
    position: absolute;
    left: 16px;
    top: 10px;
  }
  .site-header .user-center {
    position: absolute !important;
    right: 12px !important;
    top: 9px !important;
    margin-left: 0 !important;
  }
}


/* Fix mobile overflow - prevent horizontal scroll */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }
  * {
    max-width: 100vw;
  }
  .hero-title {
    font-size: 20px !important;
    word-break: break-word !important;
    padding: 0 12px !important;
  }
  .hero-subtitle {
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 6px !important;
    font-size: 12px !important;
    padding: 0 12px !important;
  }
  .hero-zone,
  .hero,
  .feature-cards,
  .advantages-inner,
  .templates-section,
  .section-header,
  .templates-grid {
    max-width: 100% !important;
    overflow: hidden !important;
  }
  .site-header .header-inner {
    max-width: 100% !important;
    overflow: visible !important;
  }
}


/* Mobile user dropdown visibility */
@media (max-width: 768px) {
  .site-header {
    overflow: visible !important;
  }
  .site-header .header-inner {
    overflow: visible !important;
  }
  .site-header .user-dropdown {
    position: absolute;
    right: 0;
    left: auto;
    top: 100%;
    z-index: 9999;
    min-width: 140px;
  }
}


/* Dropdown toggle via JS click instead of hover on mobile */
@media (max-width: 768px) {
  .site-header .user-center:hover .user-dropdown {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
  }
  .site-header .user-center.dropdown-open .user-dropdown {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
  }
}


/* Mobile: fix hero title no-wrap + advantages horizontal layout */
@media (max-width: 768px) {
  .hero-title {
    font-size: 17px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .advantage-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }
  .advantage-item .adv-icon {
    display: inline-block !important;
    margin: 0 auto 4px !important;
  }
}



/* Mobile advantages FINAL */
@media (max-width: 768px) {
  .advantages-inner {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    padding: 10px 16px !important;
    gap: 0 !important;
  }
  .advantage-item {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
  }
  .advantage-item .adv-icon {
    width: 14px !important;
    height: 14px !important;
    min-width: 14px !important;
    margin: 0 !important;
    opacity: 0.75;
  }
  .advantage-item .adv-icon svg {
    width: 14px !important;
    height: 14px !important;
  }
  .advantage-item h4 {
    font-size: 12px !important;
    font-weight: normal !important;
    color: rgba(202, 228, 184, 0.85) !important;
    margin: 0 !important;
    white-space: nowrap !important;
  }
  .advantage-item p {
    display: none !important;
  }
}


/* Mobile: more breathing room in green hero zone */
@media (max-width: 768px) {
  .hero-zone {
    padding-top: 60px !important;
    padding-bottom: 10px !important;
  }
  .hero {
    padding: 30px 16px 24px !important;
  }
  .hero-title {
    margin-bottom: 12px !important;
  }
  .hero-subtitle {
    margin-bottom: 24px !important;
  }
  .feature-cards {
    padding: 0 16px !important;
    gap: 14px !important;
    margin-bottom: 16px !important;
  }
}


/* Mobile: hero top spacing + remove bg after advantages */
@media (max-width: 768px) {
  .hero {
    padding-top: 44px !important;
  }
  .hero-zone {
    padding-bottom: 0 !important;
  }
  .templates-section {
    background: #fff !important;
  }
}

/* Mobile template list top spacing */
@media (max-width: 640px) {
  .template-list-page .template-library {
    padding-top: 128px !important;
  }
}
