body {
  margin: 0;
  font-family: 'Noto Sans TC', 'Source Sans Pro', sans-serif;
  background: #f6f8fb;
  color: #2C3E50;
}

/* ===== 主內容 ===== */
main {
  padding-top: 53px; /* 為了避開固定的 header */
}

.hero-section {
  min-height: 90vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: radial-gradient(circle at 30% 30%, #3a7bd5, #2C3E50);
  color: white;
  text-align: center;
  flex-direction: column;
  padding: 40px 20px;
}

.container {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  padding: 40px 35px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  max-width: 520px;
  width: 90%;
  color: #2C3E50;
  animation: fadeIn 0.8s ease;
}

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

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

.subtitle {
  color: #555;
  margin-bottom: 25px;
  font-size: 16px;
}

.input-group {
  display: flex;
  border: 1px solid #ccc;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

input[type="url"] {
  flex-grow: 1;
  padding: 12px 14px;
  border: none;
  outline: none;
  font-size: 15px;
}

input.error {
  border: 2px solid #e74c3c;
}

button {
  background: linear-gradient(135deg, #007bff, #0056b3);
  color: white;
  border: none;
  padding: 12px 20px;
  cursor: pointer;
  font-size: 15px;
  transition: all 0.2s ease-in-out;
}

button:hover {
  background: linear-gradient(135deg, #0056b3, #004494);
  transform: scale(1.05);
}

#result {
  display: none;
  margin-top: 25px;
  padding: 15px;
  background-color: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  word-break: break-word;
  animation: fadeIn 0.5s ease;
}

#result a {
  color: #007bff;
  text-decoration: none;
  font-weight: 600;
}

#result a.copyShortURL {
  margin-left: 8px;
  border: 1px solid #007bff;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 13px;
  background: #ffffff;
  transition: 0.2s;
}

#result a.copyShortURL:hover {
  background: #007bff;
  color: white;
}

#qrcode-container {
  display: none;
  margin-top: 20px;
  text-align: center;
}

p.error {
  color: #d9534f;
  font-weight: bold;
}

/* ===== Loading Spinner ===== */
.loading-spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  animation: spin 0.8s linear infinite;
  margin: 10px auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ===== Feature 區塊 ===== */
.feature-section {
  background: #fff;
  padding: 80px 20px;
  text-align: center;
}

.feature-section h2 {
  font-size: 24px;
  margin-bottom: 15px;
}

/* ===== 未來功能區 (卡片設計優化版) ===== */
#future {
  background: linear-gradient(180deg, #f3f6fb 0%, #ffffff 100%);
  padding: 80px 20px;
  text-align: center;
}

#future h2 {
  font-size: 26px;
  margin-bottom: 10px;
  color: #1f2d3d;
}

.section-intro {
  color: #555;
  margin-bottom: 45px;
  font-size: 15px;
}

/* 卡片容器 */
.card-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  max-width: auto;
  margin: 0 auto;
}

/* 卡片本體 */
.feature-card {
  background: linear-gradient(145deg, #ffffff, #f5f8fc);
  border-radius: 16px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
  padding: 28px 22px;
  width: 260px;
  transition: all 0.25s ease;
  text-align: left;
  border: 1px solid rgba(0, 123, 255, 0.1);
  position: relative;
  overflow: hidden;
}

/* 小亮邊（hover 時出現） */
.feature-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 200%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0,123,255,0.08), transparent);
  transition: 0.5s;
}

.feature-card:hover::before {
  left: 100%;
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
  border-color: rgba(0, 123, 255, 0.25);
}

.feature-card h3 {
  color: #007bff;
  margin-bottom: 10px;
  font-size: 18px;
}

.feature-card p {
  color: #2C3E50;
  font-size: 14px;
  line-height: 1.7;
}

/* 可選：根據卡片順序輕微調色，增加層次 */
.feature-card:nth-child(2n) {
  background: linear-gradient(145deg, #ffffff, #f3f6fb);
}
.feature-card:nth-child(3n) {
  background: linear-gradient(145deg, #ffffff, #eef4fb);
}

/* RWD */
@media (max-width: 1300px) {
  .card-grid {
    max-width: 800px;
  }
}
@media (max-width: 768px) {
  .feature-card {
    width: 100%;
    max-width: 420px;
  }  
}
