/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  width: 100%;
  background: url("../images/bg.png") no-repeat center center;
  background-size: cover;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header Styles */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
}

.logo {
  width: 123px;
  height: 30.69px;
  background: url("../images/logo.png") no-repeat center center;
  background-size: contain;
}

.nav {
  width: 32px;
  height: 32px;
  background: url("../images/menu.png") no-repeat center center;
  background-size: contain;
  cursor: pointer;
}

/* Main Content */
.main {
  padding-top: 80px;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.content-grid {
  width: 1200px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.memories-card {
  width: 345.62px;
  height: 523px;
  background: url("../images/banner1.png") no-repeat center center;
  background-size: contain;
}

.playback-card {
  width: 345.62px;
  height: 523px;
  background: url("../images/banner2.png") no-repeat center center;
  background-size: contain;
}

.cta-section {
  width: 276px;
  /* height: 209px; */
  /* background: url("../images/banner3.png") no-repeat center center; */
  background-size: contain;
  /* cursor: pointer; */
  font-size: 40px;
  font-weight: 600;
  line-height: 54px;
  word-spacing: 5px;
}

/* Footer */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 0;
}

.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  text-decoration: underline;
  color: #000000ff;
  font-size: 20px;
}

.footer-link {
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s ease;

  width: 120px;
  height: 60px;
  text-align: center;
  line-height: 60px;
  cursor: pointer;
}

.separator {
  width: 1px;
  height: 15px;
  background: #000000ff;
}

.footer-link:hover {
  color: #000000cc;
}

/* Login Modal Styles */
.login-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  width: 460px;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  padding: 0;
  overflow: hidden;
  z-index: 10001;
}

/* 关闭按钮样式 */
.close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 24px;
  height: 24px;
  background: url("../images/close.png") no-repeat center center;
  background-size: contain;
  cursor: pointer;
}

.close-icon {
  width: 16px;
  height: 16px;
  opacity: 0.8;
  transition: opacity 0.3s ease;
  cursor: pointer;
}

.close-btn:hover .close-icon {
  opacity: 1;
}

.modal-body {
  padding: 60px 40px 40px;
  text-align: center;
}

.modal-title {
  font-size: 32px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 16px;
  line-height: 1.2;
}

.modal-tips {
  font-size: 16px;
  color: #666;
  margin-bottom: 60px;
  line-height: 1.4;
}

/* 自定义Google登录按钮样式 */
.custom-google-btn {
  width: 263px;
  height: 50px;
  background: #000000;
  border-radius: 14px 14px 14px 14px;
  color: #fff;
  line-height: 50px;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  cursor: pointer;
}

.google-icon {
  width: 34px;
  height: 34px;
  background: url("../images/Google.png") no-repeat center center;
  background-size: contain;
  margin: 8px;
}

.btn-text {
  color: #fff;
}

/* 渐变动画 */
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* 添加光泽效果 */
.g_id_signin::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.6s ease;
  z-index: 1;
  pointer-events: none;
}

.g_id_signin:hover::before {
  left: 100%;
}

/* Show modal */
.login-modal.show {
  display: flex;
}

/* 用户详情弹框样式 */
.user-detail-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.user-detail-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 320px;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  padding: 40px 30px 30px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.user-detail-body {
  text-align: center;
}

.user-greeting {
  font-size: 28px;
  font-weight: 600;
  color: #333;
  margin: 0 0 30px 0;
  text-align: left;
}

.user-id-section {
  margin-bottom: 40px;
  padding: 15px 20px;
  background: rgba(240, 240, 240, 0.6);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.user-id-label {
  font-size: 16px;
  color: #666;
  font-weight: 500;
}

.user-id-value {
  font-size: 16px;
  color: #333;
  font-weight: 600;
}

.user-actions {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 20px;
}

.delete-account-btn,
.logout-btn {
  width: 100%;
  padding: 15px 20px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.delete-account-btn {
  background: rgba(220, 220, 220, 0.8);
  color: #666;
}

.delete-account-btn:hover {
  background: rgba(200, 200, 200, 0.9);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.logout-btn {
  background: rgba(220, 220, 220, 0.8);
  color: #666;
}

.logout-btn:hover {
  background: rgba(200, 200, 200, 0.9);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.delete-warning {
  font-size: 12px;
  color: #ff6b6b;
  line-height: 1.4;
  margin-top: 15px;
}

/* 删除确认弹框样式 */
.delete-confirm-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10001;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.delete-confirm-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 280px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  padding: 30px 25px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.delete-confirm-body {
  text-align: center;
}

.delete-confirm-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin: 0 0 30px 0;
  line-height: 1.4;
}

.delete-confirm-actions {
  display: flex;
  gap: 15px;
}

.cancel-btn,
.ok-btn {
  flex: 1;
  padding: 12px 20px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.cancel-btn {
  background: rgba(220, 220, 220, 0.8);
  color: #666;
}

.cancel-btn:hover {
  background: rgba(200, 200, 200, 0.9);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.ok-btn {
  background: rgba(220, 220, 220, 0.8);
  color: #666;
}

.ok-btn:hover {
  background: rgba(200, 200, 200, 0.9);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

/* 删除成功弹框样式 */
.delete-success-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10002;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.delete-success-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 300px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  padding: 40px 30px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.delete-success-body {
  text-align: center;
}

.success-icon {
  margin: 0 auto 20px;
  display: flex;
  justify-content: center;
  width: 100px;
  height: 100px;
  background: url(../images/success.png) no-repeat center center;
  background-size: 100px 100px;
}

.success-title {
  font-size: 20px;
  font-weight: 600;
  color: #333;
  margin: 0 0 10px 0;
}

.success-message {
  font-size: 14px;
  color: #999;
  margin: 0;
  line-height: 1.4;
}

/* ========== 移动端响应式样式 ========== */

/* 平板设备 (768px - 1024px) */
@media screen and (max-width: 1024px) {
  .container {
    max-width: 100%;
    padding: 0 15px;
  }

  .content-grid {
    width: 100%;
    flex-direction: column;
    gap: 30px;
    padding: 20px 0;
  }

  .memories-card,
  .playback-card {
    width: 280px;
    height: 424px;
    order: 2;
  }

  .cta-section {
    /* height: 167px; */
    width: 250px;
    order: 1;
    font-size: 34px;
    word-spacing: 0;
    text-align: center;
    line-height: 43px;
  }

  .footer {
    padding: 15px 0;
    position: relative;
  }
}

/* 手机设备 (最大宽度 768px) */
@media screen and (max-width: 768px) {
  /* 基础布局调整 */
  .container {
    padding: 0 10px;
  }

  /* 头部样式调整 */
  .header .container {
    padding: 10px 15px;
  }

  .logo {
    width: 100px;
    height: 25px;
  }

  .nav {
    width: 28px;
    height: 28px;
    cursor: pointer;
  }

  /* 主内容区域调整 */
  .main {
    padding-top: 60px;
  }

  .content-grid {
    flex-direction: column;
    gap: 25px;
    align-items: center;
    padding: 15px 0;
  }

  .memories-card,
  .playback-card {
    width: 250px;
    height: 378px;
  }

  .cta-section {
    width: 250px;
    /* height: 152px; */
  }

  /* 底部样式调整 */
  .footer {
    padding: 15px 0;
    position: relative;
  }

  .footer-links {
    font-size: 16px;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
  }

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

  /* 登录弹框移动端优化 */
  .modal-content {
    width: 90%;
    max-width: 380px;
    margin: 0 20px;
    border-radius: 20px;
  }

  .modal-body {
    padding: 40px 25px 30px;
  }

  .modal-title {
    font-size: 26px;
    margin-bottom: 12px;
  }

  .modal-tips {
    font-size: 14px;
    margin-bottom: 40px;
  }

  .custom-google-btn {
    width: 100%;
    max-width: 280px;
    height: 48px;
    font-size: 16px;
  }

  .google-icon {
    width: 30px;
    height: 30px;
  }

  /* 用户详情弹框移动端优化 */
  .user-detail-content {
    width: 90%;
    max-width: 300px;
    padding: 30px 20px 25px;
    border-radius: 20px;
  }

  .user-greeting {
    font-size: 24px;
    margin-bottom: 25px;
  }

  .user-id-section {
    margin-bottom: 30px;
    padding: 12px 15px;
  }

  .user-id-label,
  .user-id-value {
    font-size: 14px;
  }

  .delete-account-btn,
  .logout-btn {
    padding: 12px 15px;
    font-size: 14px;
  }

  .delete-warning {
    font-size: 11px;
    margin-top: 12px;
  }

  /* 删除确认弹框移动端优化 */
  .delete-confirm-content {
    width: 90%;
    max-width: 260px;
    padding: 25px 20px;
    border-radius: 20px;
  }

  .delete-confirm-title {
    font-size: 16px;
    margin-bottom: 25px;
  }

  .cancel-btn,
  .ok-btn {
    padding: 10px 15px;
    font-size: 14px;
  }

  /* 删除成功弹框移动端优化 */
  .delete-success-content {
    width: 90%;
    max-width: 280px;
    padding: 30px 20px;
    border-radius: 20px;
  }

  .success-icon {
    width: 80px;
    height: 80px;
    background-size: 80px 80px;
    margin-bottom: 15px;
  }

  .success-title {
    font-size: 18px;
    margin-bottom: 8px;
  }

  .success-message {
    font-size: 13px;
  }
}

/* 小屏手机设备 (最大宽度 480px) */
@media screen and (max-width: 480px) {
  /* 进一步缩小元素尺寸 */
  .memories-card,
  .playback-card {
    width: 220px;
    height: 333px;
  }

  .cta-section {
    width: 200px;
    font-size: 28px;
    /* height: 134px; */
  }

  .modal-content {
    width: 95%;
    margin: 0 10px;
  }

  .modal-body {
    padding: 30px 20px 25px;
  }

  .modal-title {
    font-size: 22px;
  }

  .custom-google-btn {
    width: 100%;
    height: 44px;
    font-size: 15px;
    cursor: pointer;
  }

  .google-icon {
    width: 26px;
    height: 26px;
  }

  .footer-links {
    font-size: 14px;
  }

  .footer-link {
    font-size: 11px;
  }
}

/* 超小屏设备 (最大宽度 360px) */
@media screen and (max-width: 360px) {
  .memories-card,
  .playback-card {
    width: 200px;
    height: 302px;
  }

  .cta-section {
    width: 176px;
    font-size: 25px;
    line-height: 30px;
  }

  .content-grid {
    gap: 20px;
  }

  .main {
    padding-bottom: 80px;
  }
}

/* ========== 移动端触摸优化 ========== */

/* 增加触摸目标大小 */
@media screen and (max-width: 768px) {
  /* 确保所有可点击元素有足够的触摸区域 */
  .nav,
  .close-btn,
  .custom-google-btn,
  .delete-account-btn,
  .logout-btn,
  .cancel-btn,
  .ok-btn,
  .footer-link,
  .cta-section {
    min-height: 30px;
    min-width: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* 优化点击反馈 */
  .nav:active,
  .close-btn:active,
  .custom-google-btn:active,
  .delete-account-btn:active,
  .logout-btn:active,
  .cancel-btn:active,
  .ok-btn:active,
  .cta-section:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
  }

  /* 防止文本选择 */
  .nav,
  .close-btn,
  .custom-google-btn,
  .delete-account-btn,
  .logout-btn,
  .cancel-btn,
  .ok-btn,
  .cta-section {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
  }

  /* 优化弹框在移动端的显示 */
  .login-modal,
  .user-detail-modal,
  .delete-confirm-modal,
  .delete-success-modal {
    padding: 20px;
    box-sizing: border-box;
  }

  /* 确保弹框内容不会被键盘遮挡 */
  .modal-content,
  .user-detail-content,
  .delete-confirm-content,
  .delete-success-content {
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* 优化滚动体验 */
  body.modal-open {
    position: fixed;
    width: 100%;
    overflow: hidden;
  }
}

/* ========== 横屏模式优化 ========== */
@media screen and (max-width: 768px) and (orientation: landscape) {
  .main {
    padding-top: 50px;
    padding-bottom: 60px;
  }

  .content-grid {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
  }

  .memories-card,
  .playback-card {
    width: 180px;
    height: 272px;
  }

  .cta-section {
    width: 140px;
    height: 106px;
    order: 3;
    flex-basis: 100%;
  }

  .footer {
    padding: 10px 0;
  }

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

  .footer-link {
    font-size: 10px;
  }
}
