/* ============================================
   極簡設計 - 每個元素都有溝通意義
   配色：深灰、藍、白
   ============================================ */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft JhengHei', '微軟正黑體', Arial, sans-serif;
  background: #f5f5f5;
  min-height: 100vh;
  padding: 24px;
  color: #1a202c;
  line-height: 1.5;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  background: #ffffff;
  padding: 32px;
}

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

h1 {
  color: #1a202c;
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 32px;
}

/* 平台設定區 */
.settings-section {
  margin-bottom: 32px;
}

.settings-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.settings-row:last-child {
  grid-template-columns: 1fr;
}

.setting-card {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  padding: 20px 16px;
}

.setting-label {
  font-size: 18px;
  font-weight: 600;
  color: #3182ce;
  margin-bottom: 12px;
  text-align: center;
}

.url-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.url-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #e0e0e0;
  font-size: 14px;
  font-family: inherit;
  background: #ffffff;
  color: #1a202c;
}

.url-input:focus {
  outline: none;
  border-color: #3182ce;
}

.url-input::placeholder {
  color: #999;
}

.btn-open-url {
  padding: 8px 16px;
  background: #3182ce;
  color: #ffffff;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.btn-open-url:hover {
  background: #2563eb;
}

/* 自我介紹文字輸入框 */
.self-intro-card {
  width: 100%;
}

.self-intro-textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #e0e0e0;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  background: #ffffff;
  color: #1a202c;
  line-height: 1.5;
  min-height: 200px;
}

.self-intro-textarea:focus {
  outline: none;
  border-color: #3182ce;
}

.self-intro-textarea::placeholder {
  color: #999;
}

/* 30天日曆視圖 */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.day-card {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.day-card:hover {
  border-color: #3182ce;
}

.day-number {
  font-size: 18px;
  font-weight: 600;
  color: #3182ce;
  margin-bottom: 8px;
  flex-shrink: 0;
}

.day-status {
  font-size: 12px;
  padding: 4px 8px;
  display: inline-block;
  margin: 6px auto 0;
  flex-shrink: 0;
}

.day-status.待審核 {
  background: #f0f0f0;
  color: #666;
}

.day-status.可以發 {
  background: #e3f2fd;
  color: #1976d2;
}

.day-status.需要修改,
.day-status.建議調整 {
  background: #ffebee;
  color: #c62828;
}

.day-status.無資料 {
  color: #999;
}

.day-preview {
  font-size: 11px;
  color: #666;
  margin-top: 10px;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: normal;
  text-align: left;
  flex: 1;
  min-height: 32px;
}

/* Modal 視窗 */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  overflow-y: auto;
}

.modal-content {
  background-color: #ffffff;
  margin: 40px auto;
  width: 90%;
  max-width: 800px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px;
  border-bottom: 1px solid #e0e0e0;
}

.modal-header h2 {
  margin: 0;
  color: #1a202c;
  font-size: 20px;
  font-weight: 600;
}

.close {
  color: #666;
  font-size: 24px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close:hover {
  color: #1a202c;
}

.modal-body {
  padding: 32px;
}

.modal-footer {
  padding: 20px 32px;
  border-top: 1px solid #e0e0e0;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* 表單區塊 */
.form-section {
  margin-bottom: 32px;
}

.form-section:last-child {
  margin-bottom: 0;
}

.section-title {
  font-size: 16px;
  font-weight: 600;
  color: #1a202c;
  margin-bottom: 12px;
}

.form-textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #e0e0e0;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  background: #ffffff;
  color: #1a202c;
  line-height: 1.5;
}

.form-textarea:focus {
  outline: none;
  border-color: #3182ce;
}

.form-textarea::placeholder {
  color: #999;
}

/* 照片上傳區域 */
.image-upload-area {
  margin-top: 12px;
}

.image-preview-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.image-preview-item {
  position: relative;
  width: 100%;
  padding-top: 100%;
  background: #f5f5f5;
  overflow: hidden;
  border: 1px solid #e0e0e0;
}

.image-preview-item img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-preview-item .remove-image {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-preview-item .remove-image:hover {
  background: rgba(0, 0, 0, 0.9);
}

.image-preview-item .upload-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(0, 0, 0, 0.1);
}

.image-preview-item .upload-progress-bar {
  height: 100%;
  background: #3182ce;
  width: 0%;
  transition: width 0.3s;
}

/* 拖曳上傳區域 */
.drag-drop-area {
  border: 2px dashed #ccc;
  padding: 48px 20px;
  text-align: center;
  cursor: pointer;
  background: #fafafa;
}

.drag-drop-area:hover {
  border-color: #3182ce;
  background: #f0f0f0;
}

.drag-drop-area.drag-over {
  border-color: #3182ce;
  background: #e3f2fd;
}

.drag-text {
  font-size: 14px;
  color: #666;
  margin: 0;
}

/* 審核狀態按鈕 */
.status-group {
  margin-bottom: 24px;
}

.status-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #1a202c;
  margin-bottom: 12px;
}

.status-buttons {
  display: flex;
  gap: 10px;
}

.status-btn {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid;
  background: #ffffff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

/* 待審核狀態 */
.status-pending {
  color: #666;
  border-color: #e0e0e0;
}

.status-pending:hover {
  background: #f5f5f5;
  border-color: #ccc;
}

.status-pending.active {
  background: #f0f0f0;
  border-color: #666;
  color: #333;
}

/* 可以發狀態 */
.status-approved {
  color: #3182ce;
  border-color: #3182ce;
}

.status-approved:hover {
  background: #e3f2fd;
}

.status-approved.active {
  background: #3182ce;
  color: #ffffff;
}

/* 建議調整狀態 */
.status-revision {
  color: #666;
  border-color: #e0e0e0;
}

.status-revision:hover {
  background: #f5f5f5;
  border-color: #ccc;
}

.status-revision.active {
  background: #333;
  border-color: #333;
  color: #ffffff;
}

/* 意見回饋 */
.feedback-group {
  margin-top: 24px;
}

.feedback-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #1a202c;
  margin-bottom: 12px;
}

.feedback-textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #e0e0e0;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  background: #ffffff;
  color: #1a202c;
  line-height: 1.5;
}

.feedback-textarea:focus {
  outline: none;
  border-color: #3182ce;
}

.feedback-textarea::placeholder {
  color: #999;
}

/* 操作按鈕 */
.btn-save {
  padding: 12px 32px;
  background: #3182ce;
  color: #ffffff;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  min-width: 100px;
}

.btn-save:hover {
  background: #2563eb;
}

.btn-cancel {
  padding: 12px 32px;
  background: #ffffff;
  color: #666;
  border: 1px solid #e0e0e0;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  min-width: 100px;
}

.btn-cancel:hover {
  background: #f5f5f5;
  border-color: #ccc;
}

/* 響應式設計 */
@media (max-width: 768px) {
  body {
    padding: 12px;
  }
  
  .container {
    padding: 16px;
  }
  
  h1 {
    font-size: 18px;
    margin-bottom: 20px;
  }
  
  /* 設定區：手機版改為單欄顯示 */
  .settings-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .setting-card {
    padding: 16px;
  }
  
  .setting-label {
    font-size: 16px;
    margin-bottom: 10px;
  }
  
  .url-input-row {
    flex-direction: column;
    gap: 8px;
  }
  
  .url-input {
    width: 100%;
    font-size: 14px;
  }
  
  .btn-open-url {
    width: 100%;
    padding: 10px 16px;
  }
  
  .self-intro-textarea {
    min-height: 150px;
    font-size: 14px;
  }
  
  /* 日曆網格：手機版改為2欄 */
  .calendar-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  
  .day-card {
    padding: 12px 8px;
    min-height: 120px;
  }
  
  .day-number {
    font-size: 14px;
  }
  
  .day-status {
    font-size: 11px;
    padding: 3px 6px;
  }
  
  .day-preview {
    font-size: 10px;
    -webkit-line-clamp: 2;
    min-height: 28px;
  }
  
  /* Modal 視窗：手機版全螢幕 */
  .modal-content {
    width: 100%;
    margin: 0;
    min-height: 100vh;
  }
  
  .modal-header {
    padding: 16px;
    position: sticky;
    top: 0;
    background: #ffffff;
    z-index: 10;
  }
  
  .modal-header h2 {
    font-size: 18px;
  }
  
  .modal-body {
    padding: 16px;
  }
  
  .modal-footer {
    padding: 16px;
    position: sticky;
    bottom: 0;
    background: #ffffff;
    border-top: 1px solid #e0e0e0;
  }
  
  .section-title {
    font-size: 15px;
    margin-bottom: 10px;
  }
  
  .form-textarea {
    font-size: 14px;
    padding: 10px;
  }
  
  /* 照片預覽：手機版改為2欄 */
  .image-preview-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  
  .drag-drop-area {
    padding: 32px 16px;
  }
  
  .drag-text {
    font-size: 13px;
  }
  
  /* 狀態按鈕：手機版垂直排列 */
  .status-buttons {
    flex-direction: column;
    gap: 8px;
  }
  
  .status-btn {
    width: 100%;
    padding: 10px 16px;
  }
  
  .status-label,
  .feedback-label {
    font-size: 14px;
    margin-bottom: 8px;
  }
  
  .feedback-textarea {
    font-size: 14px;
  }
  
  /* 操作按鈕 */
  .btn-save,
  .btn-cancel {
    flex: 1;
    padding: 10px 20px;
    font-size: 14px;
  }
  
  .modal-footer {
    display: flex;
    gap: 8px;
  }
}