:root {
  --bg-gradient-light: linear-gradient(135deg, #b3d9ff 0%, #e6f2ff 100%);
  --bg-gradient-dark: linear-gradient(135deg, #1a2a6c 0%, #2c3e50 100%);
  --card-bg-light: #ffffff;
  --card-bg-dark: #1e1e2f;
  --text-primary-light: #333333;
  --text-primary-dark: #e0e0e0;
  --text-secondary-light: #666666;
  --text-secondary-dark: #aaaaaa;
  --text-tertiary-light: #999999;
  --text-tertiary-dark: #888888;
  --btn-bg-light: #e3f2fd;
  --btn-bg-dark: #2d2d42;
  --btn-hover-light: #bbdefb;
  --btn-hover-dark: #3d3d5c;
  --friend-item-bg-light: #f8f8f8;
  --friend-item-bg-dark: #2d2d42;
  --border-light: #f0f0f0;
  --border-dark: #3d3d5c;
  --contact-btn-bg: #f8f8f8;
  --contact-btn-hover: #f0f0f0;
  --friend-btn-bg: #ff9f40;
  --friend-btn-hover: #ff8a18;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: var(--bg-gradient-light);
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  transition: background 0.3s ease;
}

body.dark-mode {
  background: var(--bg-gradient-dark);
}

.profile-card {
  width: 90%;
  max-width: 480px;
  background: var(--card-bg-light);
  border-radius: 20px;
  padding: 40px 20px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  position: relative;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.dark-mode .profile-card {
  background: var(--card-bg-dark);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding: 0 5px;
}
.top-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary-light);
  transition: color 0.3s ease;
}
.dark-mode .top-title {
  color: var(--text-primary-dark);
}

.avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 3px solid var(--border-light);
  margin-bottom: 20px;
  transition: border-color 0.3s ease;
}
.dark-mode .avatar {
  border-color: var(--border-dark);
}

.nickname {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary-light);
  margin-bottom: 8px;
  transition: color 0.3s ease;
}
.dark-mode .nickname {
  color: var(--text-primary-dark);
}

.signature {
  font-size: 14px;
  color: var(--text-secondary-light);
  margin-bottom: 20px;
  transition: color 0.3s ease;
  overflow: hidden;
  white-space: nowrap;
  animation: typing 3s steps(30, end) forwards, blink-caret 0.75s step-end infinite;
  border-right: 2px solid var(--text-secondary-light);
  display: inline-block;
}
.dark-mode .signature {
  color: var(--text-secondary-dark);
  border-right-color: var(--text-secondary-dark);
}

@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}
@keyframes blink-caret {
  from, to { border-color: transparent }
  50% { border-color: var(--text-secondary-light); }
}
.dark-mode .signature {
  border-right-color: var(--text-secondary-dark);
}

.clock {
  font-family: "Courier New", monospace;
  font-size: 32px;
  font-weight: bold;
  letter-spacing: 3px;
  color: var(--text-primary-light);
  margin-bottom: 8px;
  transition: color 0.3s ease;
}
.dark-mode .clock {
  color: var(--text-primary-dark);
}

.date-week {
  font-size: 12px;
  color: var(--text-tertiary-light);
  margin-bottom: 20px;
  transition: color 0.3s ease;
}
.dark-mode .date-week {
  color: var(--text-tertiary-dark);
}

.contact-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}
.contact-btn {
  width: 100px;
  height: 45px;
  border-radius: 25px;
  background: var(--contact-btn-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--text-primary-light);
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  text-decoration: none;
}
.dark-mode .contact-btn {
  background: var(--btn-bg-dark);
  color: var(--text-primary-dark);
}
.contact-btn:hover {
  background: var(--contact-btn-hover);
}
.dark-mode .contact-btn:hover {
  background: var(--btn-hover-dark);
}
.contact-btn img {
  width: 24px;
  height: 24px;
}

.nav-buttons {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 30px;
}
.nav-btn {
  height: 45px;
  border-radius: 12px;
  background: var(--btn-bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #1976d2;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  text-decoration: none;
}
.nav-btn:hover {
  background: var(--btn-hover-light);
  color: #0d47a1;
}
.dark-mode .nav-btn {
  background: #303f9f;
  color: #bbdefb;
}
.dark-mode .nav-btn:hover {
  background: #1a237e;
  color: #e3f2fd;
}

.friend-btn {
  width: 40%;
  height: 45px;
  border-radius: 12px;
  background: var(--friend-btn-bg);
  color: #fff;
  border: none;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 0 auto 20px;
  display: block;
}
.friend-btn:hover {
  background: var(--friend-btn-hover);
}

.footer-info {
  margin-top: 20px;
  font-size: 12px;
  color: var(--text-tertiary-light);
  text-align: center;
  line-height: 1.8;
  transition: color 0.3s ease;
}
.dark-mode .footer-info {
  color: var(--text-tertiary-dark);
}
.footer-info .info-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
  cursor: pointer;
}
.footer-info .info-item:hover {
  color: #1976d2;
}
.dark-mode .footer-info .info-item:hover {
  color: #bbdefb;
}
.footer-info .info-icon {
  width: 16px;
  height: 16px;
}

.theme-toggle {
  display: flex;
  align-items: center;
  gap: 5px;
}
.toggle-label {
  font-size: 12px;
  color: var(--text-secondary-light);
}
.dark-mode .toggle-label {
  color: var(--text-secondary-dark);
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 20px;
}
.toggle-switch input {
  opacity: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 20px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 16px; width: 16px;
  left: 2px; bottom: 2px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}
input:checked + .slider {
  background-color: #ff9f40;
}
input:checked + .slider:before {
  transform: translateX(20px);
}

.friend-modal .modal-content {
  background: var(--card-bg-light);
  border-radius: 15px;
}
.dark-mode .friend-modal .modal-content {
  background: var(--card-bg-dark);
}
.friend-modal .modal-title {
  color: var(--text-primary-light);
}
.dark-mode .friend-modal .modal-title {
  color: var(--text-primary-dark);
}
.friend-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px 10px;
  border-radius: 10px;
  background: var(--friend-item-bg-light);
  margin-bottom: 12px;
}
.dark-mode .friend-item {
  background: var(--friend-item-bg-dark);
}
.friend-name {
  font-size: 16px;
  color: var(--text-primary-light);
}
.dark-mode .friend-name {
  color: var(--text-primary-dark);
}
.friend-desc {
  font-size: 12px;
  color: var(--text-secondary-light);
}
.dark-mode .friend-desc {
  color: var(--text-secondary-dark);
}
.friend-avatar {
  width: 50px; height: 50px; border-radius: 50%;
}

.wx-modal .modal-content {
  background: var(--card-bg-light);
  border-radius: 15px;
}
.dark-mode .wx-modal .modal-content {
  background: var(--card-bg-dark);
}
.wx-qrcode {
  width: 100%; max-width: 250px; margin: 0 auto; display: block;
}

.global-loader {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(255,255,255,0.9);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  transition: all 0.4s ease;
  opacity: 1;
  pointer-events: auto;
}
.global-loader.hidden {
  opacity: 0;
  pointer-events: none;
}
.loader-spinner {
  border: 6px solid #e0e0e0;
  border-top: 6px solid #2196F3;
  border-radius: 50%;
  width: 60px; height: 60px;
  animation: spinner-rotate 1s linear infinite;
  margin-bottom: 16px;
}
@keyframes spinner-rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.loader-text {
  font-size: 16px; color: #666;
}
.cywl {
	    position: fixed!important;
	    position: absolute;
	    width: 70px;
	    height: 75px;
	    z-index: 9;
	    right: 0;
	    bottom: 0;
	    top: expression(offsetParent.scrollTop+offsetParent.clientHeight-150);
	    cursor: pointer;
	}