/* Tier Gating Styles */

/* Locked Content Overlay */
.locked-content {
  position: relative;
  overflow: hidden;
}

.locked-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.locked-overlay:hover {
  background: rgba(0, 0, 0, 0.8);
}

.locked-icon {
  font-size: 2rem;
  color: #fff;
  margin-bottom: 1rem;
}

.locked-message {
  color: #fff;
  text-align: center;
  padding: 0 1rem;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.upgrade-button {
  background: #3a7;
  color: #fff;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 0.5rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
}

.upgrade-button:hover {
  background: #2c8;
}

/* Blurred Preview */
.blurred-content {
  filter: blur(5px);
  opacity: 0.7;
  pointer-events: none;
}

/* Tier Badge */
.tier-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #aaa; /* Default color for Free Trial */
  color: #fff;
  padding: 0.3rem 0.8rem;
  border-radius: 0.5rem;
  font-size: 0.8rem;
  font-weight: bold;
  z-index: 5;
}

/* Tier-specific badges */
.tier-badge[data-tier="free"] {
  background: #5588bb; /* Blue for Free */
}

.tier-badge[data-tier="fighter"] {
  background: #5ac; /* Blue for Fighter */
}

.tier-badge[data-tier="fighter-plus"] {
  background: linear-gradient(45deg,#7b3fe4,#c78bfa);
  color: #fff;
}

/* Tier Modal */
.upgrade-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: none; /* Hidden by default */
  align-items: center;
  justify-content: center;
  z-index: 2000;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

/* When modal is shown */
.upgrade-modal.show {
  display: flex;
}

.upgrade-modal-content {
  background: #222;
  color: #fff;
  border-radius: 1rem;
  padding: 2.5rem;
  width: 90%;
  max-width: 600px;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.upgrade-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}

.tier-option {
  background: #2a2a2a;
  border-radius: 0.8rem;
  padding: 1.5rem;
  margin-bottom: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.tier-option:hover, .tier-option.selected {
  background: #333;
  border-color: #3a7;
}

.tier-option.free {
  border: 2px solid #5588bb;
  background: #1a2533;
}

.tier-option.free:hover {
  background: #253545;
  border-color: #6699cc;
}

.tier-option.current-tier {
  border-color: #aaa;
  position: relative;
  background: #333;
}

.current-plan-tag {
  background: #aaa;
  color: #222;
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 0.3rem;
  display: inline-block;
  margin-top: 0.5rem;
  font-weight: bold;
}

.tier-option h4 {
  color: #3a7;
  margin-bottom: 0.5rem;
}

.tier-icon {
  font-size: 0.85em;
  margin-left: 5px;
  vertical-align: middle;
}

.price-tag {
  font-size: 1.2rem;
  color: #fa7;
  margin-bottom: 1rem;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.feature-list li {
  margin-bottom: 0.5rem;
  padding-left: 1.5rem;
  position: relative;
}

.feature-list li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #3a7;
}

.select-tier-btn {
  background: #3a7;
  color: #fff;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 0.5rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  margin-top: 1rem;
}

.select-tier-btn:hover {
  background: #2c8;
}

.free .select-tier-btn {
  background: #5588bb;
}

.free .select-tier-btn:hover {
  background: #6699cc;
}

.checkout-button {
  display: block;
  width: 100%;
  background: #3a7;
  color: #fff;
  border: none;
  padding: 1rem;
  border-radius: 0.5rem;
  font-size: 1.1rem;
  font-weight: bold;
  margin-top: 2rem;
  cursor: pointer;
  transition: background 0.3s ease;
}

.checkout-button:hover {
  background: #2c8;
}

/* Scroll Library Section */
/* Scroll Library Section (aligned with dashboard-section) */
.scroll-library-section.dashboard-section {
  background: #262626; /* match .dashboard-section */
  border: 1px solid #333;
  border-radius: 0.85rem;
  padding: 1.75rem 1.5rem 1.6rem 1.5rem;
  margin-bottom: 2.75rem;
  box-shadow: 0 4px 18px #0006;
}

.scroll-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.scroll-item {
  background: #252525;
  border-radius: 0.8rem;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.scroll-item:hover {
  transform: translateY(-5px);
}

.scroll-thumbnail {
  height: 150px;
  background: #333;
  position: relative;
  overflow: hidden;
}

.scroll-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scroll-info {
  padding: 1rem;
}

.scroll-title {
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 0.5rem;
}

.scroll-description {
  font-size: 0.9rem;
  color: #ccc;
  margin-bottom: 0.5rem;
}

.scroll-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #aaa;
}

/* Challenge Section */
.challenges-section {
  background: #1a1a1a;
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.challenge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.challenge-card {
  background: #252525;
  border-radius: 0.8rem;
  overflow: hidden;
  position: relative;
}

.challenge-banner {
  height: 120px;
  background: #333;
  position: relative;
}

.challenge-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.challenge-content {
  padding: 1.2rem;
}

.challenge-title {
  font-size: 1.2rem;
  color: #fff;
  margin-bottom: 0.5rem;
}

.challenge-description {
  font-size: 0.9rem;
  color: #ccc;
  margin-bottom: 1rem;
}

.challenge-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.challenge-difficulty {
  font-size: 0.8rem;
  color: #aaa;
}

.challenge-button {
  background: #3a7;
  color: #fff;
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  cursor: pointer;
}

/* Meal Plans Section */
.meal-plans-section {
  background: #1a1a1a;
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.meal-plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.meal-plan-card {
  background: #252525;
  border-radius: 0.8rem;
  overflow: hidden;
}

.meal-plan-header {
  background: #333;
  padding: 1.2rem;
  color: #fff;
}

.meal-plan-title {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.meal-plan-subtitle {
  font-size: 0.9rem;
  color: #ccc;
}

.meal-plan-content {
  padding: 1.2rem;
}

.meal-stats {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.stat {
  text-align: center;
}

.stat-value {
  font-size: 1.2rem;
  color: #fa7;
  font-weight: bold;
}

.stat-label {
  font-size: 0.8rem;
  color: #aaa;
}

.meal-plan-description {
  font-size: 0.9rem;
  color: #ccc;
  margin-bottom: 1rem;
}

.meal-plan-button {
  display: block;
  width: 100%;
  background: #3a7;
  color: #fff;
  border: none;
  padding: 0.8rem;
  border-radius: 0.5rem;
  text-align: center;
  font-weight: bold;
  cursor: pointer;
}
