:root {
  --primary-color: #667eea;
  --primary-dark: #5a67d8;
  --primary-light: #7c3aed;
  --secondary-color: #f093fb;
  --success-color: #10b981;
  --error-color: #ef4444;
  --bg-gradient-start: #0f172a;
  --bg-gradient-end: #1e1b4b;
  --card-bg: rgba(255, 255, 255, 0.08);
  --card-border: rgba(255, 255, 255, 0.15);
  --text-color: #f1f5f9;
  --text-secondary: #94a3b8;
  --rain-color: rgba(102, 126, 234, 0.4);
  --glow: 0 0 20px rgba(102, 126, 234, 0.3);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
  color: var(--text-color);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  background-attachment: fixed;
}

/* 雨滴动画 */
.rain-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
  opacity: 0.6;
}

.raindrop {
  position: absolute;
  width: 2px;
  height: 30px;
  background: linear-gradient(to bottom, transparent, var(--rain-color));
  animation: fall linear infinite;
  border-radius: 50%;
}

@keyframes fall {
  to {
    transform: translateY(100vh);
  }
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem;
  position: relative;
  z-index: 2;
}

header {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

h1 {
  font-size: 3rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  background: linear-gradient(135deg, #667eea 0%, #f093fb 50%, #667eea 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: titleShimmer 4s linear infinite;
  letter-spacing: -0.02em;
}

@keyframes titleShimmer {
  to {
    background-position: 200% center;
  }
}

.icon {
  font-size: 3rem;
  filter: drop-shadow(0 0 20px rgba(102, 126, 234, 0.6));
  display: inline-block;
  transition: transform 0.3s ease;
}

.icon:hover {
  transform: scale(1.1) rotate(5deg);
}

.lang-btn {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-color);
  padding: 0.625rem 1.25rem;
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(20px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.lang-btn::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    115deg,
    transparent 40%,
    rgba(255, 255, 255, 0.1) 50%,
    transparent 60%
  );
  animation: shimmer 8s linear infinite;
}

.lang-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--primary-color);
  transform: translateY(calc(-50% - 3px));
  box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3);
}

.card {
  background: var(--card-bg);
  backdrop-filter: blur(30px);
  border-radius: 24px;
  padding: 3rem;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.4),
    0 0 1px rgba(255, 255, 255, 0.1) inset;
  border: 1px solid var(--card-border);
  margin-bottom: 2.5rem;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 
    0 28px 70px rgba(0, 0, 0, 0.5),
    0 0 1px rgba(255, 255, 255, 0.15) inset;
  border-color: rgba(102, 126, 234, 0.3);
}

.card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    115deg,
    transparent 20%,
    rgba(255, 255, 255, 0.05) 40%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0.05) 60%,
    transparent 80%
  );
  animation: shimmer 8s linear infinite;
}

@keyframes shimmer {
  0% {
    transform: translate(-100%, -100%) rotate(30deg);
  }
  100% {
    transform: translate(100%, 100%) rotate(30deg);
  }
}

.card h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
  color: var(--text-color);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  font-weight: 500;
}

input[type="url"],
input[type="text"]#urlInput {
  width: 100%;
  padding: 1rem 1.25rem;
  border: 2px solid var(--card-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-color);
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 500;
}

input[type="url"]:focus,
input[type="text"]#urlInput:focus {
  outline: none;
  border-color: var(--primary-color);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 
    0 0 0 4px rgba(102, 126, 234, 0.1),
    0 8px 16px rgba(102, 126, 234, 0.2);
  transform: translateY(-2px);
}

input[type="url"]::placeholder,
input[type="text"]#urlInput::placeholder {
  color: var(--text-secondary);
  opacity: 0.7;
}

.type-info {
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(240, 147, 251, 0.15));
  border-radius: 12px;
  color: #c7d2fe;
  font-size: 0.9rem;
  line-height: 1.6;
  border: 1px solid rgba(102, 126, 234, 0.3);
  position: relative;
  overflow: hidden;
}

.type-info::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
}

.btn-primary {
  width: 100%;
  padding: 1.125rem 2rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1.125rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 8px 20px rgba(102, 126, 234, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  letter-spacing: 0.02em;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 
    0 12px 28px rgba(102, 126, 234, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.2) inset;
}

.btn-primary:active {
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.error-message,
.success-message {
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  animation: slideIn 0.3s ease;
}

.error-message {
  background: rgba(255, 77, 79, 0.1);
  border: 1px solid var(--error-color);
  color: var(--error-color);
}

.success-message {
  background: rgba(82, 196, 26, 0.1);
  border: 1px solid var(--success-color);
  color: var(--success-color);
}

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

.result-section {
  margin-bottom: 1.5rem;
}

.result-section:last-of-type {
  margin-bottom: 1rem;
}

.result-section h4 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.result {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.result-header h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.result-url {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.result-url input {
  flex: 1;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid var(--card-border);
  color: var(--text-color);
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.result-url input:focus {
  border-color: var(--primary-color);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.btn-copy {
  padding: 1rem 1.75rem;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-copy:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.btn-copy:active {
  transform: translateY(0);
}

.result-info {
  color: var(--success-color);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(16, 185, 129, 0.1);
  border-radius: 12px;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.feature-card {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  padding: 2rem;
  border-radius: 20px;
  border: 1px solid var(--card-border);
  text-align: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    115deg,
    transparent 30%,
    rgba(102, 126, 234, 0.1) 50%,
    transparent 70%
  );
  animation: shimmer 8s linear infinite;
}

.feature-card:hover {
  transform: translateY(-12px) scale(1.02);
  border-color: var(--primary-color);
  box-shadow: 
    0 24px 48px rgba(102, 126, 234, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.2) inset;
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1.25rem;
  filter: drop-shadow(0 0 15px rgba(102, 126, 234, 0.5));
  display: inline-block;
  transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
  transform: scale(1.1) translateY(-5px);
}

.feature-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--text-color);
  font-weight: 700;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
}

footer {
  text-align: center;
  padding: 2.5rem 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
}

.divider {
  margin: 0 0.5rem;
  opacity: 0.5;
}

@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }
  
  .lang-btn {
    position: static;
    margin-top: 1rem;
  }
  
  header {
    flex-direction: column;
    padding: 0;
  }
  
  .card {
    padding: 1.5rem;
  }
  
  .features {
    grid-template-columns: 1fr;
  }
  
  .result-url {
    flex-direction: column;
  }
  
  .btn-copy {
    width: 100%;
  }
}
