/* 全局样式和变量 */
:root {
  --primary-color: #f06292;
  --primary-hover: #ec407a;
  --secondary-color: #66bb6a;
  --secondary-hover: #4caf50;
  --error-color: #ff7043;
  --warning-color: #ffca28;
  --background-color: #fce4ec;
  --card-bg: #ffffff;
  --text-color: #5d4037;
  --text-light: #8d6e63;
  --border-color: #f8bbd0;
  --box-shadow: 0 4px 15px rgba(240, 98, 146, 0.15);
  --transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --radius: 12px;
  --font-family: 'Noto Sans SC', 'Mochiy Pop One', sans-serif;
}

/* 基本重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  font-family: var(--font-family);
}

body {
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
}

/* 二次元背景元素 */
.anime-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('https://i.imgur.com/fmFbUXk.png');
  background-size: 100px;
  background-repeat: repeat;
  opacity: 0.05;
  z-index: -1;
}

/* 应用容器 */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
  position: relative;
}

/* 标题和Logo */
.app-header {
  text-align: center;
  margin-bottom: 40px;
  padding: 20px 0;
  position: relative;
}

.logo-container {
  position: relative;
  display: inline-block;
}

.mascot {
  position: absolute;
  top: -70px;
  right: -80px;
  width: 120px;
  height: 120px;
  background-image: url('https://i.imgur.com/7X9vIEw.png');
  background-size: contain;
  background-repeat: no-repeat;
  transform: rotate(10deg);
  animation: floatAnimation 3s ease-in-out infinite;
}

@keyframes floatAnimation {
  0%, 100% { transform: translateY(0) rotate(10deg); }
  50% { transform: translateY(-10px) rotate(5deg); }
}

.logo-container h1 {
  font-size: 2.8rem;
  color: var(--primary-color);
  margin-bottom: 5px;
  text-shadow: 3px 3px 0 rgba(255, 192, 203, 0.5);
  font-family: 'Mochiy Pop One', sans-serif;
  letter-spacing: 1px;
}

.logo-container p {
  color: var(--text-light);
  font-size: 1.1rem;
  font-weight: 500;
}

/* 主要内容区 */
.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

/* 通用卡片样式 */
.auth-section, .upload-section, .results-section {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--box-shadow);
  padding: 30px;
  margin-bottom: 30px;
  width: 100%;
  max-width: 700px;
  transition: var(--transition);
  border: 2px solid var(--border-color);
  position: relative;
}

.auth-section::before, .upload-section::before, .results-section::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 20px;
  width: 30px;
  height: 30px;
  background-color: var(--primary-color);
  border-radius: 50%;
  z-index: -1;
  opacity: 0.3;
}

.auth-section::after, .upload-section::after, .results-section::after {
  content: '';
  position: absolute;
  bottom: -15px;
  right: 40px;
  width: 40px;
  height: 40px;
  background-color: var(--secondary-color);
  border-radius: 50%;
  z-index: -1;
  opacity: 0.2;
}

/* 标题 */
h2 {
  margin-bottom: 25px;
  color: var(--primary-color);
  font-weight: 600;
  text-align: center;
  position: relative;
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
  padding-bottom: 10px;
}

h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 25%;
  width: 50%;
  height: 3px;
  background-color: var(--primary-color);
  border-radius: 10px;
}

/* 按钮 */
.btn {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  font-size: 1rem;
  font-weight: 500;
  outline: none;
  box-shadow: 0 4px 6px rgba(240, 98, 146, 0.2);
  position: relative;
  overflow: hidden;
}

.btn::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: 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn:hover {
  background-color: var(--primary-hover);
  transform: translateY(-3px);
  box-shadow: 0 7px 14px rgba(240, 98, 146, 0.3);
}

.btn-primary {
  background-color: var(--secondary-color);
  box-shadow: 0 4px 6px rgba(102, 187, 106, 0.2);
}

.btn-primary:hover {
  background-color: var(--secondary-hover);
  box-shadow: 0 7px 14px rgba(102, 187, 106, 0.3);
}

/* 输入组件 */
.input-group {
  display: flex;
  margin-bottom: 20px;
  width: 100%;
}

.input-group input {
  flex: 1;
  padding: 14px 16px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius) 0 0 var(--radius);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
  background-color: #fff5f8;
}

.input-group input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(240, 98, 146, 0.2);
  background-color: white;
}

.input-group button {
  border-radius: 0 var(--radius) var(--radius) 0;
}

.auth-tip {
  text-align: center;
  color: var(--text-light);
  font-size: 0.9rem;
  margin-top: 15px;
  background-color: #fff5f8;
  padding: 10px;
  border-radius: var(--radius);
  border: 1px dashed var(--border-color);
}

.auth-tip i {
  margin-right: 5px;
  color: var(--warning-color);
}

/* 上传区域 */
.upload-container {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
  background-color: #fff5f8;
  position: relative;
}

.upload-container:hover {
  border-color: var(--primary-color);
  background-color: #fff0f5;
  transform: scale(1.01);
}

.upload-container.drag-over {
  border-color: var(--primary-color);
  background-color: #fff0f5;
  transform: scale(1.03);
}

.upload-icon {
  font-size: 3.5rem;
  color: var(--primary-color);
  margin-bottom: 15px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.upload-container p {
  margin-bottom: 15px;
  color: var(--text-color);
  font-weight: 500;
}

.upload-limits {
  font-size: 0.8rem;
  margin-top: 20px;
  color: var(--text-light);
  background-color: white;
  padding: 8px;
  border-radius: 20px;
  display: inline-block;
  border: 1px solid var(--border-color);
}

/* 进度条 */
.progress-container {
  width: 100%;
  margin: 25px 0;
}

.progress-bar {
  height: 8px;
  background-color: #fff0f5;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border-color);
}

.progress-bar::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: var(--progress, 0%);
  background: linear-gradient(90deg, var(--primary-color), #f48fb1);
  transition: width 0.3s ease;
  border-radius: 20px;
}

#progressText {
  text-align: center;
  font-size: 0.95rem;
  color: var(--primary-color);
  margin-top: 10px;
  font-weight: 500;
}

/* 结果区域 */
.result-image-container {
  margin: 25px 0;
  text-align: center;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  max-height: 400px;
  border: 3px solid var(--border-color);
  position: relative;
}

.result-image-container::before {
  content: '✨';
  position: absolute;
  top: -15px;
  left: -15px;
  font-size: 24px;
  z-index: 1;
}

.result-image-container::after {
  content: '✨';
  position: absolute;
  bottom: -15px;
  right: -15px;
  font-size: 24px;
  z-index: 1;
}

.result-image-container img {
  max-width: 100%;
  max-height: 400px;
  object-fit: contain;
}

.image-info {
  margin-top: 25px;
}

.info-group {
  margin-bottom: 18px;
}

.info-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--primary-color);
  position: relative;
  padding-left: 20px;
}

.info-group label::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-size: 1.5rem;
  top: -7px;
}

.copy-field {
  display: flex;
  width: 100%;
}

.copy-field input {
  flex: 1;
  padding: 12px;
  border: 2px solid var(--border-color);
  border-right: none;
  border-radius: var(--radius) 0 0 var(--radius);
  font-size: 0.9rem;
  background-color: #fff5f8;
}

.copy-btn {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 0 18px;
  border-radius: 0 var(--radius) var(--radius) 0;
  cursor: pointer;
  transition: var(--transition);
}

.copy-btn:hover {
  background-color: var(--primary-hover);
  transform: translateX(3px);
}

.file-info {
  background-color: #fff5f8;
  border-radius: var(--radius);
  padding: 18px;
  margin: 25px 0;
  border: 1px solid var(--border-color);
}

.info-item {
  display: flex;
  margin-bottom: 10px;
  font-size: 0.95rem;
  align-items: center;
}

.info-item:last-child {
  margin-bottom: 0;
}

.info-item .label {
  font-weight: 500;
  width: 100px;
  color: var(--primary-color);
}

#uploadAnother {
  width: 100%;
  margin-top: 25px;
}

/* 页脚 */
.app-footer {
  text-align: center;
  margin-top: 40px;
  padding: 25px 0;
  color: var(--text-light);
  font-size: 0.9rem;
  position: relative;
}

.app-footer::before {
  content: '♡';
  display: block;
  text-align: center;
  color: var(--primary-color);
  font-size: 1.5rem;
  margin-bottom: 10px;
}

/* 通知 */
.notifications {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.notification {
  background-color: white;
  border-radius: var(--radius);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  padding: 15px 20px;
  margin-top: 12px;
  max-width: 350px;
  display: flex;
  align-items: center;
  animation: slideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  border: 2px solid transparent;
}

.notification.success {
  border-left: 4px solid var(--secondary-color);
  border-color: var(--secondary-color);
}

.notification.error {
  border-left: 4px solid var(--error-color);
  border-color: var(--error-color);
}

.notification.warning {
  border-left: 4px solid var(--warning-color);
  border-color: var(--warning-color);
}

.notification-icon {
  margin-right: 15px;
  font-size: 1.2rem;
}

.notification.success .notification-icon {
  color: var(--secondary-color);
}

.notification.error .notification-icon {
  color: var(--error-color);
}

.notification.warning .notification-icon {
  color: var(--warning-color);
}

.notification-close {
  margin-left: 15px;
  color: var(--text-light);
  cursor: pointer;
  font-size: 0.85rem;
}

.notification-close:hover {
  color: var(--text-color);
}

@keyframes slideIn {
  from {
    transform: translateX(100%) scale(0.8);
    opacity: 0;
  }
  to {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
  to {
    transform: translateX(100%) scale(0.8);
    opacity: 0;
  }
}

/* 工具类 */
.hidden {
  display: none !important;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .app-container {
    padding: 15px;
  }
  
  .auth-section, .upload-section, .results-section {
    padding: 20px;
  }
  
  .upload-container {
    padding: 25px;
  }
  
  .logo-container h1 {
    font-size: 2rem;
  }

  .mascot {
    width: 80px;
    height: 80px;
    top: -40px;
    right: -40px;
  }
  
  .info-item {
    flex-direction: column;
  }
  
  .info-item .label {
    width: auto;
    margin-bottom: 2px;
  }
}

/* 粘贴提示样式 */
.paste-indicator {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 4px 20px rgba(240, 98, 146, 0.2);
  text-align: center;
  border: 2px solid var(--primary-color);
  animation: scaleIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  z-index: 10;
}

.paste-icon {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.paste-text {
  color: var(--text-color);
  font-weight: 500;
}

.paste-indicator.fade-out {
  animation: fadeOut 0.3s ease forwards;
}

@keyframes scaleIn {
  from {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
  }
  to {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.paste-tip {
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--primary-color);
  background-color: white;
  padding: 8px 15px;
  border-radius: 20px;
  display: inline-block;
  border: 1px dashed var(--border-color);
}

.paste-tip i {
  margin-right: 5px;
} 