body {
  padding: 0;
}

.mini-games-container {
  width: 100%;
  max-width: 1600px;
  margin: 0;
  padding: 2rem;
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  position: relative;
  overflow: hidden;
}

.mini-games-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='3'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  z-index: 1;
}

.games-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: white;
  margin: 0 0 0.5rem 0;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: center;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 5;
}

.games-subtitle {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1.5rem;
  font-weight: 500;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 5;
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: rgba(255, 255, 255, 0.9);
  color: #2c3e50;
  text-decoration: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  position: relative;
  z-index: 5;
}

.back-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
  position: relative;
  z-index: 5;
  width: 1100px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
  z-index: 5;
  width: 100%;
  box-sizing: border-box;
}

.points-display-top {
  position: fixed;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.95);
  color: #2c3e50;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 4px;
}

.points-icon {
  font-size: 1rem;
}

.daily-limit-progress {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 15px;
  padding: 1.25rem;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.limit-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.limit-header h4 {
  margin: 0;
  color: #2c3e50;
  font-size: 1rem;
  font-weight: 700;
}

.reset-timer {
  font-size: 0.8rem;
  color: #7f8c8d;
  background: #f8f9fa;
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
  font-weight: 500;
}

.progress-bar {
  width: 100%;
  height: 10px;
  background: #ecf0f1;
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #27ae60, #2ecc71);
  transition: width 0.3s ease;
  border-radius: 5px;
}

.progress-fill.warning {
  background: linear-gradient(90deg, #f39c12, #e67e22);
}

.progress-fill.danger {
  background: linear-gradient(90deg, #e74c3c, #c0392b);
}

.progress-text {
  font-size: 0.8rem;
  color: #7f8c8d;
  text-align: center;
  font-weight: 500;
}

.limit-details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #ecf0f1;
}

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

.detail-item .label {
  display: block;
  color: #7f8c8d;
  font-weight: 500;
}

.detail-item .value {
  font-weight: 700;
  color: #2c3e50;
  font-size: 1rem;
}

.detail-item .value.exhausted {
  color: #e74c3c;
}

.weekly-info {
  margin-top: 0.75rem;
}

.weekly-period {
  font-size: 0.9rem;
  color: #2c3e50;
  text-align: center;
  font-weight: bold;
  font-weight: 600;
  text-align: center;
  margin-bottom: 1rem;
  padding: 0.5rem;
  background: rgba(52, 152, 219, 0.1);
  border-radius: 8px;
}

.weekly-rewards {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.reward-item {
  flex: 1;
  text-align: center;
  padding: 0.75rem 0.5rem;
  background: rgba(248, 249, 250, 0.8);
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.reward-rank {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 0.25rem;
}

.reward-points {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: #27ae60;
}

.games-main-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
  z-index: 5;
  box-sizing: border-box;
}

.daily-limit-warning {
  background: rgba(255, 193, 7, 0.9);
  color: #856404;
  padding: 1rem;
  border-radius: 12px;
  text-align: center;
  border: 1px solid rgba(255, 193, 7, 0.3);
  font-weight: 600;
  font-size: 0.9rem;
  backdrop-filter: blur(10px);
}

.games-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  width: 100%;
}

.game-card {
  flex: 0 1 280px;
  max-width: 320px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  cursor: pointer;
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.game-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.game-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  border-color: #667eea;
}

.game-card:hover::before {
  transform: scaleX(1);
}

.game-icon {
  font-size: 3.5rem;
  text-align: center;
  margin-bottom: 1.25rem;
}

.game-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #2c3e50;
  text-align: center;
  margin-bottom: 0.75rem;
}

.game-description {
  color: #7f8c8d;
  text-align: center;
  margin-bottom: 1.25rem;
  line-height: 1.5;
  font-size: 0.9rem;
}

.game-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding: 1.25rem;
  background: rgba(248, 249, 250, 0.8);
  border-radius: 15px;
  backdrop-filter: blur(5px);
}

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

.game-stat-value {
  font-weight: 700;
  color: #2c3e50;
  font-size: 1.1rem;
}

.game-stat-label {
  font-size: 0.85rem;
  color: #7f8c8d;
  margin-top: 0.25rem;
  font-weight: 500;
}

.play-button {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
  color: white;
  border: none;
  border-radius: 15px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(46, 204, 113, 0.4);
}

.play-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(46, 204, 113, 0.5);
}

.play-button:disabled {
  background: #bdc3c7;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.loading {
  text-align: center;
  padding: 3rem;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  position: relative;
  z-index: 5;
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.error-message {
  background: #fdf2f2;
  color: #c0392b;
  padding: 1.5rem;
  border-radius: 15px;
  text-align: center;
  border: 2px solid #e74c3c;
  font-weight: 600;
  backdrop-filter: blur(10px);
  position: relative;
  z-index: 5;
}

@media (max-width: 1200px) {
  .content-wrapper {
    flex-direction: column;
    gap: 2rem;
  }

  .sidebar {
    order: 1;
  }

  .games-main-content {
    order: 2;
  }
}

@media (max-width: 768px) {
  .mini-games-container {
    padding: 1rem;
  }

  .content-wrapper {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .games-title {
    font-size: 2.5rem;
  }

  .games-subtitle {
    font-size: 1.1rem;
  }

  .sidebar {
    width: 100%;
    margin: 0;
  }

  .points-display-top {
    top: 15px;
    right: 15px;
    padding: 6px 12px;
    font-size: 0.8rem;
  }

  .games-grid {
    justify-content: center;
  }

  .games-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .game-card {
    padding: 1.5rem;
  }

  .game-icon {
    font-size: 3rem;
  }

  .game-title {
    font-size: 1.3rem;
  }

  .game-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .daily-limit-progress {
    padding: 1.5rem;
  }

  .limit-details {
    gap: 0.5rem;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .mini-games-container {
    padding: 0.5rem;
  }

  .content-wrapper {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    gap: 10px;
  }

  .games-header {
    margin-bottom: 1.5rem;
    padding: 1rem 1.5rem;
  }

  .games-title {
    font-size: 2rem;
  }

  .games-subtitle {
    font-size: 1rem;
  }

  .sidebar {
    width: 100%;
    margin: 0;
  }

  .points-display-top {
    top: 10px;
    right: 10px;
    padding: 5px 10px;
    font-size: 0.75rem;
  }

  .games-grid {
    gap: 1rem;
  }

  .game-card {
    flex: 0 1 240px;
    max-width: 280px;
  }

  .games-grid {
    gap: 1rem;
  }

  .game-card {
    padding: 1rem;
  }

  .game-icon {
    font-size: 2.5rem;
  }

  .game-title {
    font-size: 1.1rem;
  }

  .game-description {
    font-size: 0.8rem;
  }

  .play-button {
    padding: 1rem;
    font-size: 1rem;
    margin-top: 0px;
  }

  .back-button {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    margin-bottom: 1rem;
  }

  .daily-limit-progress {
    padding: 1rem;
    margin-bottom: 1.5rem;
  }

  .limit-header h4 {
    font-size: 1rem;
  }

  .reset-timer {
    font-size: 0.8rem;
    padding: 0.25rem 0.75rem;
  }
  .detail-item .label{
    font-size: 0.8rem;
  }
  .game-stats {
    margin-bottom: 1rem;
  }
}

@media (max-width: 360px) {
  .games-title {
    font-size: 1.8rem;
  }

  .points-display-top {
    top: 8px;
    right: 8px;
    padding: 4px 8px;
    font-size: 0.7rem;
  }

  .game-card {
    padding: 0.75rem;
  }

  .game-icon {
    font-size: 2rem;
  }

  .game-title {
    font-size: 1rem;
  }
}
