/* Problem Tags */
.problem-tags {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
  max-width: 200px;
}

.tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.company-tag,
.topic-tag {
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  width: auto;
  white-space: normal;
  overflow: hidden;
}

.company-tag {
  background-color: #e6f7ff;
  color: #007acc;
  border: 1px solid #bae7ff;
}

.topic-tag {
  background-color: #f6ffed;
  color: #52c41a;
  border: 1px solid #b7eb8f;
}

/* Tags Container */
.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  position: relative;
}

.more-tags-indicator {
  background-color: #f0f0f0;
  color: #666;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
}

.more-tags-popup {
  display: none;
  position: absolute;
  bottom: 100%;
  right: 0px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 7px;
  box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.15);
  z-index: 100;
  max-width: 365px;
  margin-bottom: 8px;
  width: max-content;
}

.more-tags-popup::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: white transparent transparent transparent;
}

.more-tags-popup.show {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
}

/* Points Badge */
.points-badge {
  background-color: #f0f7ff;
  color: #1a73e8;
  padding: 6px 10px;
  border-radius: 16px;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 8px;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 15px 0;
}

.page-btn {
  border: 1px solid #ddd;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  background: white;
  transition: all 0.2s ease;
}

.page-btn:hover:not(:disabled) {
  background: #f0f7ff;
  border-color: var;
}

.page-btn.active {
  background: #40a944;
  color: white;
  border-color: #40a944;
}

.page-btn:disabled {
  color: #ccc;
  cursor: not-allowed;
}

/* Sort Item */
.sort-item.active {
  background-color: #f0f7ff;
  color: #40a944;
  font-weight: 600;
}

/* Loading Spinner */
.loading-spinner {
  text-align: center;
  padding: 40px;
  color: var(--text-secondary);
  font-size: 16px;
}

.loading-spinner::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 10px;
  vertical-align: middle;
}

/* Difficulty Options */
.difficulty-option {
  transition: all 0.3s ease;
  cursor: pointer;
}

.difficulty-option.accessible {
  background-color: rgba(133, 169, 71, 0.1);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.difficulty-option.accessible:hover {
  background-color: rgba(133, 169, 71, 0.2);
  transform: translateY(-2px);
}

.difficulty-option.active {
  background-color: var(--primary-color);
  color: white;
  border: 2px solid var(--primary-color);
}

.difficulty-option.locked {
  background-color: #f5f5f5;
  color: #999;
  border: 2px solid #ddd;
  cursor: not-allowed;
  position: relative;
}

.difficulty-option.locked::after {
  content: "🔒";
  margin-left: 5px;
  font-size: 12px;
}

.dark-theme .difficulty-option.locked {
  background-color: #2a2a2a;
  color: #666;
  border: 2px solid #444;
}

/* Demo Content */
.demo-content {
  background: white;
  padding: 20px;
  border-radius: 5px;
  margin-top: 20px;
}

/* No Problems Message */
.no-problems {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 40px;
  text-align: center;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  border-radius: 16px;
  margin: 40px 0;
  min-height: 400px;
  position: relative;
  overflow: hidden;
}

.no-problems::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  animation: rotate 20s linear infinite;
}

.no-problems-content {
  position: relative;
  z-index: 2;
}

.no-problems-title {
  font-size: 28px;
  font-weight: 700;
  color: #2c3e50;
  margin: 0 0 12px 0;
  letter-spacing: -0.5px;
}

.no-problems-subtitle {
  font-size: 16px;
  color: #5a6c7d;
  margin: 0 0 30px 0;
  line-height: 1.6;
  max-width: 500px;
}

.no-problems-action {
  margin-top: 30px;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.action-btn {
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.action-btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.action-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

/* Dark Mode Support */
body.dark-mode .no-problems {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

body.dark-mode .no-problems-title {
  color: #e0e0e0;
}

body.dark-mode .no-problems-subtitle {
  color: #a0a0a0;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  
  .problems-header h2 {
    font-size: 15px;
  }

  
  .page-info p {
    font-size: 14px;
  }

  
  .no-problems {
    padding: 60px 24px;
    min-height: 350px;
  }

  .no-problems::after {
    font-size: 70px;
  }

  .no-problems-title {
    font-size: 24px;
  }

  .no-problems-subtitle {
    font-size: 14px;
  }

  .action-btn {
    padding: 10px 20px;
    font-size: 14px;
    width: 100%;
    justify-content: center;
  }

  .no-problems-action {
    flex-direction: column;
    width: 100%;
  }
}

