:root {
  --primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  --bg-color: #0f172a;
  --card-bg: rgba(30, 41, 59, 0.7);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --border-color: rgba(255, 255, 255, 0.1);
  --accent-color: #818cf8;
}

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

body {
  font-family: "Inter", sans-serif;
  background-color: var(--bg-color);
  background-image:
    radial-gradient(
      circle at 20% 20%,
      rgba(99, 102, 241, 0.15) 0%,
      transparent 40%
    ),
    radial-gradient(
      circle at 80% 80%,
      rgba(168, 85, 247, 0.15) 0%,
      transparent 40%
    );
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.glass-container {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  width: 100%;
  max-width: 800px;
  padding: 40px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

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

h1 {
  font-family: "Outfit", sans-serif;
  font-size: 2.5rem;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.drop-zone {
  border: 2px dashed var(--border-color);
  border-radius: 16px;
  padding: 40px;
  text-align: center;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
}

.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--accent-color);
  background: rgba(99, 102, 241, 0.05);
  transform: translateY(-2px);
}

.drop-zone.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
  filter: grayscale(1);
}

.icon-upload {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  background: var(--text-secondary);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='激M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12' /%3E%3C/svg%3E")
    no-repeat center;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12' /%3E%3C/svg%3E")
    no-repeat center;
}

.file-label {
  display: inline-block;
  margin-top: 12px;
  padding: 10px 24px;
  background: var(--primary-gradient);
  border-radius: 30px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.file-label:hover {
  opacity: 0.9;
}

.status-container {
  margin-top: 30px;
  animation: fadeIn 0.5s ease;
}

.status-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 0.9rem;
}

.progress-bar-bg {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--primary-gradient);
  background-size: 30px 30px;
  background-image: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.15) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.15) 50%,
    rgba(255, 255, 255, 0.15) 75%,
    transparent 75%,
    transparent
  );
  transition: width 0.3s ease;
  animation: progress-animation 2s linear infinite;
}

@keyframes progress-animation {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 60px 0;
  }
}

.result-container {
  margin-top: 40px;
  animation: fadeIn 0.5s ease;
}

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

h2 {
  font-size: 1.25rem;
  font-weight: 600;
}

.copy-btn {
  padding: 6px 16px;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--text-secondary);
}

textarea {
  width: 100%;
  height: 300px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.6;
  resize: none;
  outline: none;
}

textarea:focus {
  border-color: var(--accent-color);
}

footer {
  margin-top: 40px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.hidden {
  display: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .glass-container {
    padding: 24px;
  }
  h1 {
    font-size: 2rem;
  }
}
