* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #18191C;
  background-color: #ffffff;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 48px;
}

.header {
  background: white;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 72px;
  width: 100%;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 30px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-svg {
  height: 38px;
  width: auto;
}

.logo-text {
  font-size: 19px;
  font-weight: 700;
  color: #18191C;
}

.nav-link {
  text-decoration: none;
  color: #4B5363;
  font-size: 15px;
  font-weight: 400;
  transition: color 0.2s;
  position: relative;
  padding-bottom: 4px;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: #7A38EB;
  transition: width 0.3s ease;
}

.nav-link:hover {
  color: #7A38EB;
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link.active {
  color: #7A38EB;
}

.nav-link.active::after {
  width: 100%;
}

.auth-buttons {
  display: flex;
  gap: 12px;
}

.btn {
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary {
  background: linear-gradient(135deg, #7A38EB, #BF24D1);
  color: white;
  border-radius: 9px;
  height: 38px;
  font-size: 14px;
  font-weight: 600;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(122, 56, 235, 0.3);
}

.btn-secondary {
  background: white;
  color: #7A38EB;
  border: 1px solid #7A38EB;
  border-radius: 10px;
  font-weight: 600;
}

.btn-secondary:hover {
  background: #F3ECFF;
}

.header-divider {
  height: 1px;
  background: #EAEBF2;
}

.hero-section {
  padding: 24px 0 40px;
  background: white;
}

.hero-content {
  display: flex;
  max-width: 1280px;
  margin: 0 auto;
  align-items: center;
  padding: 0 48px;
  box-sizing: border-box;
}

.hero-text {
  width: 50%;
  padding-right: 60px;
  box-sizing: border-box;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 16px;
  background: #F3ECFF;
  border-radius: 15px;
  color: #7A38EB;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 22px;
}

.hero-text h1 {
  font-size: 46px;
  font-weight: 700;
  color: #18191C;
  line-height: 58px;
  margin-bottom: 22px;
}

.hero-text .hero-desc {
  font-size: 16px;
  font-weight: 400;
  color: #6B7280;
  line-height: 26px;
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  align-items: center;
}

.btn-hero-primary {
  background: linear-gradient(135deg, #7A38EB, #BF24D1);
  color: white;
  border-radius: 10px;
  height: 48px;
  padding: 0 28px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-hero-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(122, 56, 235, 0.35);
}

.btn-hero-secondary {
  background: white;
  color: #7A38EB;
  border: 1px solid #7A38EB;
  border-radius: 10px;
  height: 48px;
  padding: 0 28px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-hero-secondary:hover {
  background: #F3ECFF;
}

.hero-preview-wrapper {
  width: 50%;
  display: flex;
  justify-content: flex-end;
}

.hero-preview {
  width: 560px;
  height: 412px;
  flex-shrink: 0;
  background: white;
  border: 1px solid #E6EAF0;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.browser-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 16px;
  background: #F7F8FA;
  flex-shrink: 0;
}

.browser-dots {
  display: flex;
  gap: 10px;
}

.browser-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.browser-dot.red { background: #FF5F57; }
.browser-dot.yellow { background: #FEBC2E; }
.browser-dot.green { background: #28C840; }

.browser-url {
  width: 320px;
  height: 22px;
  background: white;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #9CA3AF;
}

.browser-content {
  flex: 1;
  background: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 0 24px;
  gap: 12px;
}

.preview-avatar {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7A38EB, #BF24D1);
  margin-top: 0;
}

.preview-name {
  font-size: 19px;
  font-weight: 700;
  color: #18191C;
}

.preview-title {
  font-size: 13px;
  font-weight: 400;
  color: #6B7280;
}

.preview-bio {
  font-size: 12px;
  font-weight: 400;
  color: #9CA3AF;
  text-align: center;
  max-width: 240px;
}

.preview-tags {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.preview-tag {
  background: #F3ECFF;
  color: #7A38EB;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
}

.preview-view-btn {
  background: linear-gradient(135deg, #7A38EB, #BF24D1);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 8px 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 14px;
}

.templates-section {
  padding: 44px 0 50px;
  background: #F7F8FA;
}

.section-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 26px;
}

.section-title-main {
  font-size: 24px;
  font-weight: 700;
  color: #18191C;
}

.section-subtitle-right {
  font-size: 14px;
  font-weight: 400;
  color: #6B7280;
}

.templates-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.template-card {
  background: white;
  border-radius: 14px;
  border: 1px solid #E6EAF0;
  overflow: hidden;
  transition: all 0.3s;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.template-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.1);
}

.template-thumb {
  height: 168px;
  margin: 14px;
  border-radius: 8px;
}

.thumb-simple-white { background: linear-gradient(135deg, #F4F7FA, #DCE1EC); }
.thumb-onyx-black { background: linear-gradient(135deg, #1A1A20, #2E3038); }
.thumb-tech-blue { background: linear-gradient(135deg, #2E7EFF, #1F5ECC); }
.thumb-future-purple { background: linear-gradient(135deg, #7A38EB, #BF24D1); }

.template-info {
  padding: 6px 18px 20px;
}

.template-name {
  font-size: 16px;
  font-weight: 700;
  color: #18191C;
  margin-bottom: 6px;
}

.template-desc {
  font-size: 13px;
  font-weight: 400;
  color: #6B7280;
}

.footer {
  background: white;
  color: #9CA3AF;
  padding: 20px 0;
  text-align: center;
  border-top: 1px solid #EAEBF2;
}

.footer-text {
  font-size: 12px;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: white;
  border-radius: 16px;
  padding: 32px;
  width: 400px;
  max-width: 90%;
  transform: scale(0.9);
  transition: transform 0.3s;
}

.modal-overlay.active .modal {
  transform: scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.modal-title {
  font-size: 20px;
  font-weight: 600;
  color: #18191C;
}

.modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: #F7F8FA;
  border-radius: 8px;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #334155;
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #E6EAF0;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: #7A38EB;
}

.form-error {
  color: #EF4444;
  font-size: 12px;
  margin-top: 4px;
}

.form-switch {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
}

.form-switch a {
  color: #7A38EB;
  text-decoration: none;
}

.form-switch a:hover {
  text-decoration: underline;
}

.modal-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  background: #F7F8FA;
  border-radius: 8px;
  padding: 4px;
}

.modal-tab {
  flex: 1;
  text-align: center;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 500;
  color: #6B7280;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.modal-tab:hover {
  color: #334155;
}

.modal-tab.active {
  background: white;
  color: #7A38EB;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.sms-input-row {
  display: flex;
  gap: 10px;
}

.sms-code-input {
  flex: 1;
}

.btn-sms {
  white-space: nowrap;
  padding: 12px 16px;
  border: 1px solid #7A38EB;
  background: white;
  color: #7A38EB;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 120px;
}

.btn-sms:hover:not(:disabled) {
  background: #7A38EB;
  color: white;
}

.btn-sms:disabled {
  border-color: #D1D5DB;
  color: #9CA3AF;
  background: #F7F8FA;
  cursor: not-allowed;
}

.form-switch-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
}

.form-switch-row .form-switch {
  margin-top: 0;
  text-align: left;
}

.forgot-link {
  color: #7A38EB;
  text-decoration: none;
  font-size: 14px;
  cursor: pointer;
}

.forgot-link:hover {
  text-decoration: underline;
}

.toast {
  position: fixed;
  top: 80px;
  right: 20px;
  padding: 16px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  z-index: 2000;
  transform: translateX(400px);
  transition: transform 0.3s;
}

.toast.show {
  transform: translateX(0);
}

.toast-success {
  background: #dcfce7;
  color: #166534;
}

.toast-error {
  background: #fee2e2;
  color: #991b1b;
}

.user-avatar-container {
  position: relative;
  display: inline-block;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.2s;
}

.user-avatar:hover {
  border-color: #7A38EB;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 240px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.25s ease;
  z-index: 200;
  overflow: hidden;
}

.user-avatar-container:hover .user-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-dropdown-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: white;
  border-bottom: 1px solid #E6EAF0;
}

.user-dropdown-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.user-dropdown-info {
  flex: 1;
  min-width: 0;
}

.user-dropdown-name {
  font-size: 15px;
  font-weight: 600;
  color: #18191C;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-dropdown-id {
  font-size: 12px;
  color: #6B7280;
  margin-top: 2px;
}

.user-dropdown-items {
  padding: 8px;
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 14px;
  color: #334155;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.user-dropdown-item:hover {
  background: #F3ECFF;
  color: #7A38EB;
}

.user-dropdown-item.logout {
  color: #EF4444;
}

.user-dropdown-item.logout:hover {
  background: #FEF2F2;
  color: #EF4444;
}

.user-dropdown-divider {
  height: 1px;
  background: #E6EAF0;
  margin: 4px 0;
}

@media (max-width: 1200px) {
  .hero-content {
    flex-direction: column;
    gap: 40px;
  }

  .hero-text {
    width: 100%;
    padding-right: 0;
  }

  .hero-preview-wrapper {
    width: 100%;
    justify-content: center;
  }

  .hero-preview {
    width: 100%;
    max-width: 560px;
    flex-shrink: 1;
  }

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

@media (max-width: 900px) {
  .hero-text h1 {
    font-size: 32px;
    line-height: 42px;
  }

  .hero-preview {
    height: auto;
    min-height: 350px;
  }

  .browser-url {
    width: 200px;
  }
}

@media (max-width: 600px) {
  .container {
    padding: 0 20px;
  }

  .hero-content {
    padding: 0 20px;
    gap: 24px;
  }

  .hero-text {
    width: 100%;
    padding-right: 0;
  }

  .hero-preview-wrapper {
    width: 100%;
    justify-content: center;
  }

  .hero-preview {
    width: 100%;
    height: auto;
    min-height: 380px;
    flex-shrink: 1;
  }

  .header-content {
    height: 60px;
  }

  .header-right {
    gap: 16px;
  }

  .nav-link {
    font-size: 14px;
  }

  .hero-section {
    padding: 24px 0;
  }

  .hero-text h1 {
    font-size: 28px;
    line-height: 36px;
  }

  .hero-text .hero-desc {
    font-size: 14px;
  }

  .hero-actions {
    flex-direction: row;
    align-items: center;
  }

  .btn-hero-primary {
    flex: 2;
  }

  .btn-hero-secondary {
    flex: 1;
  }

  .browser-url {
    width: 140px;
    font-size: 10px;
  }

  .templates-grid {
    grid-template-columns: 1fr;
  }

  .section-header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}
