/* Actions Queue Page Styling */

.actions-wrapper {
  padding: 24px;
  max-width: 1400px;
  margin: 0 auto;
}

.actions-loading,
.actions-error {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  font-size: 1.2em;
  color: #888;
}

.actions-error {
  color: #ff5c5c;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(232, 193, 90, 0.2);
  border-top-color: #e8c15a;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* HEADER */
.actions-header {
  margin-bottom: 32px;
  text-align: center;
}

.actions-header h1 {
  font-size: 2.5em;
  color: #e8c15a;
  margin: 0 0 16px;
  text-shadow: 0 0 20px rgba(232, 193, 90, 0.3);
  font-weight: 700;
}

.actions-info {
  color: #9c9488;
  line-height: 1.6;
}

.actions-info p {
  margin: 8px 0;
}

.success-info {
  color: #4ade80;
  font-weight: 600;
}

/* TABS */
.actions-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
  border-bottom: 2px solid rgba(232, 193, 90, 0.1);
  padding-bottom: 0;
}

.tab-btn {
  padding: 12px 20px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: #9c9488;
  font-size: 0.95em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.tab-btn:hover {
  color: #e8c15a;
}

.tab-btn.active {
  color: #e8c15a;
  border-bottom-color: #e8c15a;
}

/* GRID */
.actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.actions-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #888;
  font-size: 1.1em;
}

/* ACTION CARD - AVAILABLE */
.action-card {
  background: linear-gradient(135deg, #1a1512 0%, #0f0e0c 100%);
  border: 2px solid #3a352c;
  border-radius: 12px;
  padding: 20px;
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.action-card:hover {
  border-color: #e8c15a;
  box-shadow: 0 0 20px rgba(232, 193, 90, 0.2);
  transform: translateY(-4px);
}

.action-card.available {
  border-color: #3a352c;
}

.action-card.active {
  border-color: #4ade80;
  background: linear-gradient(135deg, rgba(74, 222, 128, 0.05) 0%, rgba(34, 197, 94, 0.02) 100%);
}

/* CARD HEADER */
.action-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.action-title {
  font-size: 1.1em;
  font-weight: 700;
  color: #e8c15a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.action-difficulty {
  font-size: 1.5em;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  border: 1px solid;
}

.action-difficulty.easy {
  border-color: #4ade80;
  background: rgba(74, 222, 128, 0.1);
}

.action-difficulty.medium {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
}

.action-difficulty.hard {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.action-difficulty.legendary {
  border-color: #fbbf24;
  background: rgba(251, 191, 36, 0.1);
}

.action-timer {
  font-size: 0.9em;
  color: #f59e0b;
  font-weight: 600;
}

.action-timer .ready {
  color: #4ade80;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* DESCRIPTION */
.action-description {
  color: #9c9488;
  font-size: 0.95em;
  line-height: 1.4;
  flex-grow: 1;
}

/* STATS */
.action-stats {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  border: 1px solid rgba(232, 193, 90, 0.1);
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9em;
}

.stat-row span:first-child {
  color: #9c9488;
}

.stat-row strong {
  color: #e8c15a;
  font-weight: 700;
}

.success-rate {
  color: #4ade80 !important;
}

/* REWARDS */
.action-rewards {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  border: 1px solid rgba(232, 193, 90, 0.1);
}

.reward-item {
  flex: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #9c9488;
  font-size: 0.85em;
}

.reward-item span:first-child {
  font-size: 1.5em;
}

.reward-item span:last-child {
  color: #e8c15a;
  font-weight: 700;
}

/* PROGRESS BAR */
.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
  transition: width 0.5s ease;
}

/* BUTTONS */
.action-btn {
  padding: 12px 16px;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.95em;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  align-self: flex-end;
}

.action-btn.start {
  background: linear-gradient(135deg, #4ade80, #22c55e);
  color: #000;
  flex: 1;
  align-self: stretch;
  font-size: 1em;
}

.action-btn.start:hover:not(:disabled) {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  box-shadow: 0 0 15px rgba(74, 222, 128, 0.3);
  transform: scale(1.02);
}

.action-btn.claim {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #000;
  flex: 1;
  align-self: stretch;
  font-size: 1em;
}

.action-btn.claim:hover:not(:disabled) {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.3);
  transform: scale(1.02);
}

.action-btn.cancel {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  padding: 8px 12px;
  font-size: 0.9em;
}

.action-btn.cancel:hover:not(:disabled) {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.3);
}

.action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* HISTORY ITEM */
.action-history-item {
  background: linear-gradient(135deg, #1a1512 0%, #0f0e0c 100%);
  border-left: 4px solid;
  border-radius: 8px;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.action-history-item.success {
  border-left-color: #4ade80;
}

.action-history-item.failed {
  border-left-color: #ef4444;
}

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-grow: 1;
}

.history-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1em;
  font-weight: 600;
  color: #e8c15a;
}

.badge-success,
.badge-failed {
  font-size: 0.85em;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 700;
}

.badge-success {
  background: rgba(74, 222, 128, 0.2);
  color: #4ade80;
}

.badge-failed {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.history-date {
  color: #9c9488;
  font-size: 0.9em;
  white-space: nowrap;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .actions-grid {
    grid-template-columns: 1fr;
  }

  .actions-header h1 {
    font-size: 1.8em;
  }

  .actions-tabs {
    flex-wrap: wrap;
  }

  .tab-btn {
    flex: 1;
    font-size: 0.85em;
    padding: 10px 12px;
  }

  .history-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .history-date {
    align-self: flex-end;
  }
}
