/* 全域樣式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-orange: #ff6b35;
  --secondary-orange: #ff8c42;
  --light-orange: #ffb88c;
  --purple: #a855f7;
  --pink: #ec4899;
  --blue: #3b82f6;
  --green: #10b981;
  --yellow: #fbbf24;
  --bg-light: #fff8f3;
  --text-dark: #1f2937;
  --text-gray: #6b7280;
  --white: #ffffff;
  --error: #ef4444;
  --shadow: rgba(0, 0, 0, 0.1);
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #fff8f3 0%, #ffe8d6 100%);
  color: var(--text-dark);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* 背景裝飾圖形 */
.background-shapes {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.15;
  animation: float 20s infinite ease-in-out;
}

.shape1 {
  width: 300px;
  height: 300px;
  background: linear-gradient(
    135deg,
    var(--primary-orange),
    var(--secondary-orange)
  );
  top: -100px;
  right: -100px;
  animation-delay: 0s;
}

.shape2 {
  width: 400px;
  height: 400px;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  bottom: -150px;
  left: -150px;
  animation-delay: 5s;
}

.shape3 {
  width: 250px;
  height: 250px;
  background: linear-gradient(135deg, var(--blue), var(--green));
  top: 50%;
  right: -80px;
  animation-delay: 10s;
}

@keyframes float {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
  33% {
    transform: translate(30px, -30px) rotate(120deg);
  }
  66% {
    transform: translate(-20px, 20px) rotate(240deg);
  }
}

/* 容器 */
.container {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

/* 標題區域 */
.header {
  text-align: center;
  margin: 40px 0;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-bottom: 10px;
}

.logo-icon {
  font-size: 48px;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.header h1 {
  font-size: 48px;
  background: linear-gradient(
    135deg,
    var(--primary-orange),
    var(--secondary-orange),
    var(--purple)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: bold;
}

.subtitle {
  font-size: 18px;
  color: var(--text-gray);
  margin-top: 10px;
}

/* 表單容器 */
.form-container {
  background: var(--white);
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 20px 60px var(--shadow);
  margin-bottom: 30px;
  backdrop-filter: blur(10px);
}

.form-header {
  text-align: center;
  margin-bottom: 40px;
}

.form-header h2 {
  font-size: 32px;
  color: var(--text-dark);
  margin-bottom: 10px;
}

.form-header p {
  color: var(--text-gray);
  font-size: 16px;
}

/* 表單樣式 */
.brand-form {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

label {
  font-weight: 600;
  color: var(--text-dark);
  font-size: 15px;
  display: flex;
  align-items: center;
}

.required::after {
  content: "*";
  color: var(--error);
  margin-left: 5px;
  font-size: 18px;
}

input[type="text"],
input[type="url"],
select,
textarea {
  padding: 14px 18px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 15px;
  font-family: inherit;
  transition: all 0.3s ease;
  background: var(--white);
}

input[type="text"]:focus,
input[type="url"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary-orange);
  box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.1);
  transform: translateY(-2px);
}

input[type="text"]:hover,
input[type="url"]:hover,
select:hover,
textarea:hover {
  border-color: var(--secondary-orange);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath fill='%236B7280' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}

/* 社群連結輸入 */
.social-inputs {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.social-input {
  background: linear-gradient(to right, #f9fafb, var(--white));
}

/* 輔助文字 */
.helper-text {
  font-size: 13px;
  color: var(--text-gray);
  margin-top: -4px;
}

.char-count {
  font-size: 13px;
  color: var(--text-gray);
  text-align: right;
  margin-top: -4px;
}

/* 錯誤訊息 */
.error-message {
  font-size: 13px;
  color: var(--error);
  display: none;
  margin-top: -4px;
}

.error-message.show {
  display: block;
}

input.error,
select.error {
  border-color: var(--error);
}

/* 按鈕 */
.form-actions {
  display: flex;
  gap: 15px;
  margin-top: 20px;
  justify-content: flex-end;
}

.btn {
  padding: 14px 32px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(
    135deg,
    var(--primary-orange),
    var(--secondary-orange)
  );
  color: var(--white);
  box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--white);
  color: var(--text-gray);
  border: 2px solid #e5e7eb;
}

.btn-secondary:hover {
  border-color: var(--text-gray);
  color: var(--text-dark);
}

.btn-icon {
  font-size: 20px;
  transition: transform 0.3s ease;
}

.btn-primary:hover .btn-icon {
  transform: translateX(4px);
}

/* 頁尾 */
.footer {
  text-align: center;
  padding: 20px;
  color: var(--text-gray);
  font-size: 14px;
}

/* 成功彈窗 */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(5px);
}

.modal.show {
  display: flex;
}

.modal-content {
  background: var(--white);
  padding: 50px;
  border-radius: 24px;
  text-align: center;
  max-width: 400px;
  animation: slideIn 0.3s ease;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

@keyframes slideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.success-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--green), #34d399);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  margin: 0 auto 20px;
  animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
  from {
    transform: scale(0);
  }
  to {
    transform: scale(1);
  }
}

.modal-content h3 {
  font-size: 28px;
  margin-bottom: 15px;
  color: var(--text-dark);
}

.modal-content p {
  color: var(--text-gray);
  margin-bottom: 25px;
  line-height: 1.6;
}

/* 響應式設計 */
@media (max-width: 768px) {
  .container {
    padding: 15px;
  }

  .header h1 {
    font-size: 36px;
  }

  .logo-icon {
    font-size: 36px;
  }

  .form-container {
    padding: 25px;
    border-radius: 16px;
  }

  .form-header h2 {
    font-size: 24px;
  }

  .form-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .modal-content {
    margin: 20px;
    padding: 35px;
  }
}

@media (max-width: 480px) {
  .header h1 {
    font-size: 28px;
  }

  .form-container {
    padding: 20px;
  }

  input[type="text"],
  input[type="url"],
  select,
  textarea {
    font-size: 16px; /* 防止 iOS 自動縮放 */
  }
}
