/* GameBoy Platform - עיצוב ראשי */
:root {
  --primary-color: #4CAF50;
  --secondary-color: #45a049;
  --accent-color: #FF6B6B;
  --dark-color: #2C3E50;
  --light-color: #ECF0F1;
  --success-color: #27AE60;
  --warning-color: #F39C12;
  --danger-color: #E74C3C;
  --info-color: #3498DB;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  direction: rtl;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding-bottom: 80px;
}

/* כותרת */
.header {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.points-badge {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #333;
  padding: 8px 15px;
  border-radius: 20px;
  font-weight: bold;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* קונטיינר ראשי */
.container {
  max-width: 1200px;
  margin: 30px auto;
  padding: 0 20px;
}

/* כרטיסים */
.card {
  background: white;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  padding: 25px;
  margin-bottom: 25px;
  transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.card-title {
  font-size: 22px;
  color: var(--dark-color);
  margin-bottom: 15px;
  font-weight: bold;
}

/* כפתורים */
.btn {
  padding: 12px 25px;
  border: none;
  border-radius: 25px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
}

.btn-primary:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

.btn-success {
  background: linear-gradient(135deg, var(--success-color), #229954);
  color: white;
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger-color), #C0392B);
  color: white;
}

.btn-warning {
  background: linear-gradient(135deg, var(--warning-color), #E67E22);
  color: white;
}

.btn-info {
  background: linear-gradient(135deg, var(--info-color), #2980B9);
  color: white;
}

.btn-secondary {
  background: #95A5A6;
  color: white;
}

/* טופס */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  color: var(--dark-color);
}

.form-control {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #ddd;
  border-radius: 10px;
  font-size: 16px;
  transition: border-color 0.3s;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
}

.form-select {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #ddd;
  border-radius: 10px;
  font-size: 16px;
  background: white;
}

/* רשת משחקים */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.game-card {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  transition: transform 0.3s;
  cursor: pointer;
}

.game-card:hover {
  transform: scale(1.05);
}

.game-icon {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
}

.game-info {
  padding: 20px;
}

.game-title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 10px;
  color: var(--dark-color);
}

.game-price {
  color: var(--primary-color);
  font-weight: bold;
  font-size: 18px;
}

.game-price.free {
  color: var(--success-color);
}

/* משחק האכל את החיה */
.animal-game {
  text-align: center;
}

.animal-display {
  width: 200px;
  height: 200px;
  margin: 20px auto;
  background: linear-gradient(135deg, #FFD700, #FFA500);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 100px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  position: relative;
}

.animal-stats {
  display: flex;
  justify-content: space-around;
  margin: 20px 0;
  flex-wrap: wrap;
  gap: 15px;
}

.stat-item {
  background: #f8f9fa;
  padding: 15px 20px;
  border-radius: 10px;
  min-width: 120px;
}

.stat-label {
  font-size: 14px;
  color: #666;
  margin-bottom: 5px;
}

.stat-value {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
}

.food-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.food-item {
  background: white;
  border: 2px solid #ddd;
  border-radius: 10px;
  padding: 15px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
}

.food-item:hover {
  border-color: var(--primary-color);
  transform: scale(1.05);
}

.food-item.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.food-emoji {
  font-size: 40px;
  margin-bottom: 10px;
}

.food-name {
  font-weight: bold;
  margin-bottom: 5px;
}

.food-price {
  color: var(--primary-color);
  font-size: 14px;
}

/* Toast */
.toast-container {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 9999;
  max-width: 400px;
}

.toast {
  background: white;
  border-radius: 10px;
  padding: 15px 20px;
  margin-bottom: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  gap: 15px;
  animation: slideIn 0.3s;
}

@keyframes slideIn {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(-100%);
    opacity: 0;
  }
}

.toast.success {
  border-right: 4px solid var(--success-color);
}

.toast.error {
  border-right: 4px solid var(--danger-color);
}

.toast.warning {
  border-right: 4px solid var(--warning-color);
}

.toast.info {
  border-right: 4px solid var(--info-color);
}

/* פאנל ניהול */
.admin-panel {
  background: #f8f9fa;
  min-height: 100vh;
}

.admin-sidebar {
  background: var(--dark-color);
  color: white;
  min-height: 100vh;
  padding: 20px 0;
  position: fixed;
  width: 250px;
  top: 0;
  right: 0;
}

.admin-sidebar a {
  color: white;
  text-decoration: none;
  display: block;
  padding: 15px 25px;
  transition: background 0.3s;
}

.admin-sidebar a:hover {
  background: rgba(255,255,255,0.1);
}

.admin-content {
  margin-right: 250px;
  padding: 30px;
}

.admin-card {
  background: white;
  border-radius: 10px;
  padding: 25px;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
}

.table th,
.table td {
  padding: 12px;
  text-align: right;
  border-bottom: 1px solid #ddd;
}

.table th {
  background: #f8f9fa;
  font-weight: bold;
  color: var(--dark-color);
}

.table tr:hover {
  background: #f8f9fa;
}

/* רספונסיביות */
@media (max-width: 768px) {
  .games-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
  
  .admin-sidebar {
    width: 100%;
    position: relative;
    min-height: auto;
  }
  
  .admin-content {
    margin-right: 0;
  }
  
  .header-content {
    flex-direction: column;
    gap: 15px;
  }
  
  .animal-stats {
    flex-direction: column;
  }
  
  .food-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }
}

/* אנימציות */
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.pulse {
  animation: pulse 1s infinite;
}

/* טעינה */
.loading {
  text-align: center;
  padding: 40px;
}

.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

