/* 
 * ADKS - Eğitici Afet Oyunları Modülü Stilleri
 * Modern, Responsive ve Canlı Tasarım
 */

/* Modal Card Customization */
.games-modal-card {
  padding: 24px !important;
  display: flex;
  flex-direction: column;
  max-height: 85vh;
  overflow: hidden;
}

.game-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Certificate Area Styling */
.certificate-box {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.1) 0%, rgba(245, 158, 11, 0.15) 100%);
  border: 2px dashed rgba(234, 179, 8, 0.4);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  animation: shine-glow 2s infinite alternate;
  position: relative;
  overflow: hidden;
}

@keyframes shine-glow {
  0% { box-shadow: 0 0 5px rgba(234, 179, 8, 0.2); }
  100% { box-shadow: 0 0 15px rgba(234, 179, 8, 0.4); }
}

.cert-gold-shield {
  width: 48px;
  height: 48px;
  background-color: #EAB308;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(234, 179, 8, 0.3);
  animation: pulse-scale 2s infinite;
}

@keyframes pulse-scale {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.cert-details {
  flex: 1;
}

.cert-details h4 {
  font-size: 14px;
  font-weight: 800;
  color: #B45309;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.cert-details p {
  font-size: 11px;
  color: #78350F;
  font-weight: 500;
  line-height: 1.3;
}

.cert-reset-btn {
  background: none;
  border: none;
  color: #D97706;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.cert-reset-btn:hover {
  background-color: rgba(234, 179, 8, 0.2);
  transform: rotate(-45deg);
}

/* Games Grid */
.games-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 4px;
}

@media (max-width: 480px) {
  .games-grid {
    grid-template-columns: 1fr;
  }
  .games-modal-card {
    max-height: 92vh;
    padding: 16px !important;
  }
}

.game-item-card {
  background-color: var(--bg-main);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: var(--transition);
  position: relative;
}

.game-item-card:hover {
  border-color: var(--primary-border);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.game-card-icon-badge {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

/* Disaster Category Colors */
.color-deprem { background: linear-gradient(135deg, #F97316 0%, #EA580C 100%); }
.color-sel { background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%); }
.color-yangin { background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%); }
.color-heyelan { background: linear-gradient(135deg, #A16207 0%, #78350F 100%); }
.color-cig { background: linear-gradient(135deg, #06B6D4 0%, #0891B2 100%); }
.color-ilkyardim { background: linear-gradient(135deg, #10B981 0%, #059669 100%); }

.game-card-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.game-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}

.game-status-text {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 1px;
}

.game-status-text.completed {
  color: var(--success);
}

.btn-play-game {
  background-color: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-light);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition);
  outline: none;
}

.game-item-card.completed {
  border-color: rgba(16, 185, 129, 0.3);
  background-color: rgba(16, 185, 129, 0.02);
}

.game-item-card.completed .btn-play-game {
  background-color: var(--success);
  color: white;
  border-color: var(--success);
}

.btn-play-game:hover {
  background-color: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Game Play Styles */
.game-play-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 14px;
}

.btn-back-menu {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: var(--transition);
}

.btn-back-menu:hover {
  color: var(--text-main);
  background-color: var(--bg-main);
}

.game-hearts {
  display: flex;
  gap: 4px;
}

.heart-icon {
  width: 18px;
  height: 18px;
  color: var(--border-light);
}

.heart-icon.filled {
  color: #EF4444;
  fill: #EF4444;
  animation: beat 0.3s ease;
}

@keyframes beat {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.game-play-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.game-play-badge {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background-color: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

#game-play-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
}

/* Play Screen UI Content */
.game-question-box {
  background-color: var(--bg-main);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
  border: 1px solid var(--border-light);
}

.game-question-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.5;
}

.game-options-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 8px;
}

.game-option-btn {
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 12px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 10px;
}

.game-option-btn:hover {
  border-color: var(--primary-border);
  background-color: var(--primary-light);
}

.game-option-btn .option-indicator {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border-light);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 800;
  color: var(--text-muted);
}

/* Drag-and-drop / Multi select UI for items */
.game-items-pack-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.pack-item-card {
  background-color: var(--bg-card);
  border: 1.5px solid var(--border-light);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  user-select: none;
}

.pack-item-card:hover {
  border-color: var(--primary-border);
  background-color: var(--primary-light);
}

.pack-item-card.selected {
  border-color: var(--primary);
  background-color: var(--primary-light);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.08);
  transform: translateY(-2px);
}

.pack-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background-color: var(--bg-main);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.pack-item-card.selected .pack-item-icon {
  background-color: var(--primary);
  color: white;
}

.pack-item-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-main);
}

/* Feedback Cards */
.game-feedback-overlay {
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 16px;
  border: 1px solid var(--border-light);
  margin-top: 10px;
  animation: slide-up 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@keyframes slide-up {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.feedback-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.feedback-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.feedback-badge.success { background-color: var(--success); }
.feedback-badge.error { background-color: var(--primary); }

.feedback-title {
  font-size: 13px;
  font-weight: 700;
}

.feedback-title.success { color: var(--success); }
.feedback-title.error { color: var(--primary); }

.feedback-text {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Game Finish States */
.game-finish-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px 16px;
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  animation: zoom-in 0.3s ease;
}

@keyframes zoom-in {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.finish-icon-badge {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  margin-bottom: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.finish-icon-badge.success {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
}

.finish-icon-badge.error {
  background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
}

.finish-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 6px;
}

.finish-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.5;
  max-width: 300px;
}

.finish-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Hide modal close button during gameplay to avoid overlap with hearts */
.in-game #btn-close-videos-modal {
  display: none !important;
}
