/* 遊戲共用樣式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  min-height: 100vh;
  color: #fff;
}

.game-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

.game-header {
  text-align: center;
  padding: 20px 0;
  border-bottom: 2px solid rgba(255,255,255,0.1);
  margin-bottom: 20px;
}

.game-header h1 {
  font-size: 2rem;
  margin-bottom: 10px;
  background: linear-gradient(90deg, #00d2ff, #3a7bd5);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.game-header .description {
  color: #aaa;
  font-size: 0.95rem;
}

.game-header .knowledge-tip {
  background: rgba(58, 123, 213, 0.2);
  border-left: 3px solid #3a7bd5;
  padding: 10px 15px;
  margin-top: 15px;
  border-radius: 0 8px 8px 0;
  font-size: 0.9rem;
  text-align: left;
}

.game-area {
  background: rgba(255,255,255,0.05);
  border-radius: 16px;
  padding: 30px;
  min-height: 400px;
  position: relative;
}

.game-stats {
  display: flex;
  justify-content: space-around;
  padding: 15px;
  background: rgba(0,0,0,0.2);
  border-radius: 12px;
  margin-bottom: 20px;
}

.stat-item {
  text-align: center;
}

.stat-item .label {
  font-size: 0.8rem;
  color: #888;
  margin-bottom: 5px;
}

.stat-item .value {
  font-size: 1.5rem;
  font-weight: bold;
  color: #00d2ff;
}

.btn {
  padding: 12px 30px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
}

.btn-primary {
  background: linear-gradient(90deg, #00d2ff, #3a7bd5);
  color: #fff;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(0, 210, 255, 0.4);
}

.btn-secondary {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.2);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* 評價系統 */
.rating-section {
  margin-top: 40px;
  padding: 30px;
  background: rgba(255,255,255,0.03);
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.1);
}

.rating-section h3 {
  margin-bottom: 20px;
  font-size: 1.2rem;
}

.rating-locked {
  text-align: center;
  padding: 30px;
}

.rating-locked .lock-icon {
  font-size: 3rem;
  margin-bottom: 15px;
}

.rating-locked .countdown {
  font-size: 2rem;
  color: #00d2ff;
  margin: 15px 0;
}

.rating-locked .hint {
  color: #888;
  font-size: 0.9rem;
}

/* 提前回饋按鈕（鎖定畫面） */
.early-feedback-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
  align-items: center;
}

.btn-too-difficult {
  padding: 12px 24px;
  background: rgba(245, 158, 11, 0.15);
  border: 2px solid rgba(245, 158, 11, 0.5);
  color: #f59e0b;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-too-difficult:hover {
  background: rgba(245, 158, 11, 0.25);
  border-color: #f59e0b;
  transform: scale(1.02);
}

.btn-report-issue {
  padding: 10px 20px;
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #ef4444;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.3s ease;
}

.btn-report-issue:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: #ef4444;
}

.rating-unlocked {
  display: none;
}

.rating-unlocked.active {
  display: block;
}

/* 管理員模式提示 */
.admin-hint {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.2));
  border: 1px solid rgba(99, 102, 241, 0.4);
  border-radius: 8px;
  padding: 10px 15px;
  margin-bottom: 15px;
  font-size: 0.85rem;
  color: #a5b4fc;
  text-align: center;
}

.stars {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 20px 0;
}

.star {
  font-size: 2.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #444;
}

.star:hover,
.star.active {
  color: #ffd700;
  transform: scale(1.2);
}

.rating-comment {
  width: 100%;
  padding: 15px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  background: rgba(0,0,0,0.2);
  color: #fff;
  font-size: 1rem;
  resize: vertical;
  min-height: 100px;
  margin: 15px 0;
}

.rating-comment::placeholder {
  color: #666;
}

/* 回饋選項（無法遊玩 / 太難了） */
.feedback-options {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.feedback-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  background: rgba(255,255,255,0.05);
  border: 2px solid rgba(255,255,255,0.15);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.feedback-option:hover {
  border-color: rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.1);
}

.feedback-option input[type="checkbox"] {
  display: none;
}

.feedback-option input[type="checkbox"]:checked + .option-icon {
  transform: scale(1.2);
}

.feedback-option:has(input:checked) {
  border-color: #6366f1;
  background: rgba(99, 102, 241, 0.2);
}

/* 無法遊玩樣式 */
.feedback-option:has(#cant-play:checked) {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.2);
}

/* 太難了樣式 */
.feedback-option:has(#too-difficult:checked) {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.2);
}

.option-icon {
  font-size: 1.5rem;
  transition: transform 0.2s ease;
}

.option-text {
  font-size: 0.9rem;
  color: #e2e8f0;
}

/* 歷史評價中的太難了標籤 */
.ratings-list .too-difficult {
  color: #f59e0b;
  font-size: 0.85rem;
  margin-right: 8px;
}

/* 舊版相容 */
.cant-play-option {
  text-align: center;
  margin-bottom: 20px;
  padding: 15px;
  background: rgba(239, 68, 68, 0.1);
  border-radius: 8px;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.cant-play-option label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  color: #ef4444;
}

.cant-play-option input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

/* 星星禁用狀態 */
.stars.disabled {
  opacity: 0.3;
  pointer-events: none;
}

/* 字數計數器 */
.comment-wrapper {
  position: relative;
}

.char-counter {
  position: absolute;
  bottom: 25px;
  right: 15px;
  font-size: 0.8rem;
  color: #ef4444;
}

.char-counter.valid {
  color: #4ade80;
}

/* 模式進度 */
.mode-warning {
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
  text-align: center;
  color: #fbbf24;
}

.mode-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}

.mode-item {
  padding: 5px 12px;
  background: rgba(255,255,255,0.1);
  border-radius: 20px;
  font-size: 0.85rem;
  color: #888;
}

.mode-item.done {
  background: rgba(74, 222, 128, 0.2);
  color: #4ade80;
}

.rating-submit {
  width: 100%;
  margin-top: 10px;
}

.rating-success {
  display: none;
  text-align: center;
  padding: 30px;
  color: #4ade80;
}

.rating-success .checkmark {
  font-size: 3rem;
  margin-bottom: 15px;
}

/* 歷史評價 */
.past-ratings {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.past-ratings h4 {
  margin-bottom: 15px;
  color: #94a3b8;
  font-size: 0.95rem;
}

.ratings-list {
  max-height: 300px;
  overflow-y: auto;
}

.ratings-list .rating-item {
  padding: 12px 15px;
  background: rgba(0,0,0,0.2);
  border-radius: 8px;
  margin-bottom: 10px;
}

.ratings-list .rating-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.ratings-list .stars {
  font-size: 0.9rem;
}

.ratings-list .cant-play {
  color: #ef4444;
  font-size: 0.85rem;
}

.ratings-list .time {
  font-size: 0.75rem;
  color: #64748b;
}

.ratings-list .comment {
  font-size: 0.85rem;
  color: #cbd5e1;
  line-height: 1.4;
}

.ratings-list .no-ratings,
.ratings-list .loading {
  color: #64748b;
  text-align: center;
  padding: 20px;
}

/* 返回按鈕 */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #888;
  text-decoration: none;
  margin-bottom: 20px;
  transition: color 0.3s;
}

.back-link:hover {
  color: #fff;
}

/* 遊戲列表 */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  padding: 20px 0;
}

.game-card {
  background: rgba(255,255,255,0.05);
  border-radius: 16px;
  padding: 25px;
  transition: all 0.3s ease;
  border: 1px solid rgba(255,255,255,0.1);
  text-decoration: none;
  color: inherit;
  display: block;
}

.game-card:hover {
  transform: translateY(-5px);
  background: rgba(255,255,255,0.1);
  border-color: rgba(0, 210, 255, 0.3);
}

.game-card .icon {
  font-size: 3rem;
  margin-bottom: 15px;
}

.game-card h3 {
  margin-bottom: 10px;
  font-size: 1.2rem;
}

.game-card p {
  color: #888;
  font-size: 0.9rem;
  line-height: 1.5;
}

.game-card .tags {
  margin-top: 15px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.game-card .tag {
  padding: 4px 10px;
  background: rgba(0, 210, 255, 0.2);
  border-radius: 20px;
  font-size: 0.75rem;
  color: #00d2ff;
}

/* 日期標題 */
.day-section {
  margin: 40px 0 20px;
}

.day-section h2 {
  font-size: 1.5rem;
  color: #00d2ff;
  border-bottom: 2px solid rgba(0, 210, 255, 0.3);
  padding-bottom: 10px;
}

/* 響應式 */
@media (max-width: 600px) {
  .game-container {
    padding: 15px;
  }
  
  .game-area {
    padding: 20px;
  }
  
  .game-header h1 {
    font-size: 1.5rem;
  }
  
  .stat-item .value {
    font-size: 1.2rem;
  }
}
