@import url('style.css');

/* Rewards specific styles */
.rewards-card {
    max-width: 100%;
}

.rewards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    align-items: stretch;
}

.reward-item {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.reward-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.reward-icon {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 1rem;
}

.reward-details {
    flex: 1;
    margin-bottom: 1rem;
}

.reward-details h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.reward-details p {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
    margin-bottom: 1rem;
}

.reward-cost {
    display: flex;
    align-items: center;
    font-weight: bold;
    color: #007bff;
    font-size: 1rem;
}

.reward-cost .coin {
    margin-right: 0.25rem;
    font-size: 1.1rem;
}

.redeem-btn {
    width: 100%;
    padding: 0.75rem;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.redeem-btn:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
}

.redeem-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Responsive design */
@media (max-width: 768px) {
    .rewards-grid {
        gap: 1rem;
        max-width: 100%;
        padding: 0 1rem;
    }

    .reward-item {
        padding: 1rem;
    }

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

    .reward-details h4 {
        font-size: 1rem;
    }

    .reward-details p {
        font-size: 0.85rem;
    }

    .reward-cost {
        font-size: 0.9rem;
    }

    .redeem-btn {
        padding: 0.6rem;
        font-size: 0.9rem;
    }
}

@media (prefers-color-scheme: dark) {
  .reward-item{background:var(--card); border:1px solid rgba(148,163,184,.18); box-shadow:0 2px 8px rgba(0,0,0,.45)}
  .reward-details h4{color:var(--text)}
  .reward-details p{color:var(--muted)}
  .reward-cost{color:var(--gold)}
  .redeem-btn{background:linear-gradient(135deg,#1d4ed8,#1e40af)}
  .redeem-btn:hover{background:linear-gradient(135deg,#1e40af,#1d4ed8)}
  
  /* Dark mode for store item descriptions */
   .store-item .meta .description {
     color: #b0b0b0;
     opacity: 0.9;
   }
}

/* Manual theme overrides */
[data-theme="dark"] .reward-item{background:var(--card); border:1px solid rgba(148,163,184,.18); box-shadow:0 2px 8px rgba(0,0,0,.45)}
[data-theme="dark"] .reward-details h4{color:var(--text)}
[data-theme="dark"] .reward-details p{color:var(--muted)}
[data-theme="dark"] .reward-cost{color:var(--gold)}
[data-theme="dark"] .redeem-btn{background:linear-gradient(135deg,#1d4ed8,#1e40af)}
[data-theme="dark"] .redeem-btn:hover{background:linear-gradient(135deg,#1e40af,#1d4ed8)}
[data-theme="dark"] .store-item .meta .description{color:#b0b0b0; opacity:.9}

[data-theme="light"] .reward-item{background:#fff; border:1px solid #e0e0e0; box-shadow:0 2px 8px rgba(0,0,0,0.05)}
[data-theme="light"] .reward-details h4{color:#333}
[data-theme="light"] .reward-details p{color:#666}
[data-theme="light"] .reward-cost{color:var(--gold)}
[data-theme="light"] .redeem-btn{background:linear-gradient(135deg, #007bff, #0056b3)}
[data-theme="light"] .redeem-btn:hover{background:linear-gradient(135deg, #0056b3, #004085)}
[data-theme="light"] .store-item .meta .description{color:#555; opacity:.95}

/* Store item layout overrides for rewards page */
.store-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  padding: 20px;
  border-radius: 24px;
  min-height: 280px;
  height: 100%;
  gap: 12px;
}
.store-item .avatar{
  width: 72px; height: 72px; border-radius: 50%;
  background: rgba(148,163,184,.15);
  display:flex; align-items:center; justify-content:center;
  margin-bottom: 8px;
}
.store-logo{width:36px;height:36px;object-fit:contain}
.store-item .meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  margin: 0;
}
.store-item .cost{font-weight:700;color:var(--gold)}
.store-item .btn.small.primary{align-self:center;min-width:120px;margin-top:auto}

/* Store item description styling */
.store-item .meta .description {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.5;
    margin: 0.75rem 0 1rem 0;
    opacity: 0.95;
    font-weight: 400;
}

.reward-logo { width: 56px; height: 56px; display: block; margin: 0 auto; object-fit: contain; }
