/**
 * View-Specific Styles
 */

/* Hero Section */
.hero {
  color: white;
  padding: var(--space-3xl) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg width="60" height="60" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h60v60H0z" fill="none"/><circle cx="30" cy="30" r="2" fill="rgba(255,255,255,0.05)"/></svg>');
  opacity: 0.5;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: 4rem;
  margin-bottom: var(--space-md);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
  font-size: 1.5rem;
  margin-bottom: var(--space-2xl);
  opacity: 0.95;
}

.hero-cta {
  display: inline-flex;
  gap: var(--space-md);
}

@media (max-width: 768px) {
  .hero {
    padding: var(--space-2xl) 0;
  }

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

  .hero-subtitle {
    font-size: 1.125rem;
  }

  .hero-cta {
    flex-direction: column;
  }
}

/* Ladder Card */
.ladder-card {
  cursor: pointer;
  position: relative;
}

.ladder-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.ladder-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-md);
}

.ladder-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
  color: var(--color-text-secondary);
  font-size: 0.875rem;
  margin-bottom: var(--space-md);
}

.ladder-card-meta-item {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Standings Table */
.standings-table {
  width: 100%;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.standings-row {
  display: grid;
  grid-template-columns: 60px 1fr auto auto;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  align-items: center;
  border-bottom: 1px solid var(--color-border);
  transition: background var(--transition-fast);
}

.standings-row:hover {
  background: var(--gradient-surface);
}

.standings-row.header {
  background: var(--gradient-primary);
  color: white;
  font-weight: 600;
}

.standings-rank {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.standings-player {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.standings-player-name {
  font-weight: 600;
}

.standings-stats {
  color: var(--color-text-secondary);
  font-size: 0.875rem;
}

@media (max-width: 768px) {
  .standings-row {
    grid-template-columns: 50px 1fr;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
  }

  .standings-row.header {
    display: none;
  }

  .standings-rank {
    grid-column: 1;
    grid-row: 1;
  }

  .standings-player {
    grid-column: 2;
    grid-row: 1;
  }

  .standings-stats {
    grid-column: 2;
    grid-row: 2;
    margin-top: var(--space-xs);
  }

  .standings-row > div:last-child {
    grid-column: 1 / -1;
    grid-row: 3;
    margin-top: var(--space-sm);
    width: 100%;
  }

  .standings-row > div:last-child .btn {
    width: 100%;
  }
}

/* Ladder Detail Mobile Styles */
.ladder-detail-card {
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
}

.ladder-detail-header {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  flex: 1;
  min-height: 0;
}

.ladder-detail-content {
  flex: 1;
  min-height: 0;
}

@media (min-width: 769px) {
  .ladder-detail-header {
    flex-direction: row;
    align-items: flex-start;
  }
  
  .ladder-actions {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
  }
}

.ladder-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-bottom: var(--space-sm);
}

.ladder-title {
  margin: 0;
  flex: 1;
  min-width: 0;
  word-break: break-word;
}

.ladder-title-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-shrink: 0;
}

.ladder-info-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md) var(--space-lg);
}

.ladder-info-item {
  white-space: nowrap;
}

.ladder-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: flex-start;
}

.join-code-box {
  background: rgba(16, 78, 185, 0.08);
  border: 1px solid rgba(16, 78, 185, 0.2);
  border-radius: 12px;
  padding: var(--space-md);
}

.join-code-content {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-top: var(--space-sm);
  flex-wrap: wrap;
}

.join-code-actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.jackpot-box {
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 12px;
  padding: var(--space-md);
}

.jackpot-content {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  flex-wrap: wrap;
}

.tabs-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.tabs-responsive::-webkit-scrollbar {
  display: none;
}

@media (max-width: 768px) {
  .ladder-detail-card {
    padding: var(--space-md);
  }

  .ladder-title-row {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }

  .ladder-title {
    font-size: 1.75rem;
    width: 100%;
  }

  .ladder-title-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .ladder-info-grid {
    flex-direction: column;
    gap: var(--space-sm);
  }

  .ladder-info-item {
    white-space: normal;
  }

  .ladder-detail-header {
    min-height: auto;
  }

  .ladder-actions {
    width: 100%;
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-border);
    order: 999;
  }

  .ladder-actions .btn {
    flex: 1;
    min-width: 0;
  }

  .join-code-content {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }

  .join-code-actions {
    width: 100%;
  }

  .join-code-actions .btn {
    flex: 1;
  }

  .jackpot-content {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
  }

  .tabs {
    gap: var(--space-xs);
    padding-bottom: var(--space-xs);
  }

  .tab {
    padding: var(--space-sm) var(--space-md);
    font-size: 0.875rem;
    white-space: nowrap;
  }
}

@media (max-width: 640px) {
  .ladder-title {
    font-size: 1.5rem;
  }

  .ladder-actions .btn {
    width: 100%;
  }
}

/* Challenge Card */
.challenge-card {
  border-left: 4px solid var(--color-primary);
}

.challenge-card.pending {
  border-left-color: var(--color-warning);
}

.challenge-card.accepted {
  border-left-color: var(--color-success);
}

.challenge-card.declined {
  border-left-color: var(--color-error);
}

.challenge-players {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.challenge-vs {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--color-text-secondary);
}

/* Match Card */
.match-card {
  position: relative;
}

.match-card-winner {
  background: linear-gradient(to right, transparent, rgba(67, 160, 71, 0.1));
}

.match-sets {
  display: flex;
  gap: var(--space-sm);
  font-family: var(--font-heading);
  font-size: 1.125rem;
}

.match-set {
  padding: var(--space-xs) var(--space-sm);
  background: var(--color-bg);
  border-radius: var(--radius-sm);
}

.match-set.won {
  background: var(--color-success);
  color: white;
}

/* Profile Header */
.profile-header-card {
  padding: var(--space-xl);
}

.profile-header-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
  text-align: center;
}

@media (min-width: 768px) {
  .profile-header-content {
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
  }
  
  .profile-actions {
    margin-left: auto;
  }
}

.profile-avatar {
  flex-shrink: 0;
}

.profile-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.profile-name {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
  color: var(--color-text);
}

.profile-bio {
  color: var(--color-text-secondary);
  margin: 0;
  line-height: 1.6;
}

.profile-ratings {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.profile-rating-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-md);
  background: var(--surface-glass);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  min-width: 80px;
}

.profile-rating-value {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
}

.profile-rating-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-secondary);
  margin-top: var(--space-xs);
}

.profile-actions {
  flex-shrink: 0;
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-lg);
}

/* Notification Item */
.notification-item {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
  cursor: pointer;
}

.notification-item:hover {
  background: var(--gradient-surface);
}

.notification-item.unread {
  background: rgba(216, 67, 21, 0.05);
  border-left: 3px solid var(--color-primary);
}

.notification-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  color: white;
}

.notification-content {
  flex: 1;
}

.notification-title {
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.notification-message {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-xs);
}

.notification-time {
  font-size: 0.75rem;
  color: var(--color-text-secondary);
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-xl);
  margin: var(--space-3xl) 0;
}

.feature {
  text-align: center;
  padding: var(--space-xl);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: var(--space-lg);
  color: var(--color-primary);
}

.feature-title {
  font-size: 1.25rem;
  margin-bottom: var(--space-sm);
}

.feature-description {
  color: var(--color-text-secondary);
}

/* Payment Method Card */
.payment-method-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-lg);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast);
}

.payment-method-card:hover {
  border-color: var(--color-primary);
}

.payment-method-info {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.payment-method-brand {
  font-weight: 600;
  text-transform: capitalize;
}

.payment-method-number {
  color: var(--color-text-secondary);
}

/* Generic page hero */
.page-hero {
  text-align: center;
  padding: var(--space-3xl) var(--space-lg) var(--space-2xl);
}

.page-hero .eyebrow {
  color: var(--color-primary);
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
}

.page-hero h1 {
  font-size: 2.5rem;
  margin-bottom: var(--space-md);
}

.page-hero .lead {
  max-width: 720px;
  margin: 0 auto;
  color: var(--color-text-secondary);
}

.lead {
  font-size: 1.125rem;
  color: var(--color-text-secondary);
}

/* Blog grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-xl);
  margin-bottom: var(--space-3xl);
}

.blog-card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.blog-card-media {
  height: 180px;
  background-size: cover;
  background-position: center;
}

.blog-card-body {
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  flex: 1;
}

.blog-card-meta {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  display: flex;
  gap: var(--space-md);
}

.blog-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

.btn-text {
  border: none;
  background: none;
  color: var(--color-primary);
  cursor: pointer;
  font-weight: 600;
}

/* Blog article */
.page-article {
  padding-bottom: var(--space-3xl);
}

.article-hero {
  color: white;
  padding: var(--space-3xl) 0;
  background-size: cover;
  background-position: center;
}

.article-meta {
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-sm);
}

.article-body {
  max-width: 800px;
}

.article-section {
  margin: var(--space-2xl) 0;
}

.article-section ul {
  padding-left: var(--space-xl);
  color: var(--color-text-secondary);
}

.article-takeaways {
  background: var(--gradient-surface);
  padding: var(--space-xl);
  border-radius: var(--radius-xl);
  list-style: disc;
}

.article-cta {
  text-align: center;
  padding: var(--space-2xl);
  border-radius: var(--radius-xl);
  background: var(--gradient-primary);
  color: white;
}

.related-articles {
  margin-top: var(--space-3xl);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-xl);
}

.related-article {
  background: var(--color-surface);
  padding: var(--space-xl);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

.related-article .meta {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

/* FAQ */
.faq-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  max-width: 800px;
}

.faq-item {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
}

.faq-item summary {
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
}

.faq-item p {
  margin-top: var(--space-md);
  color: var(--color-text-secondary);
}

.faq-icon {
  font-size: 1.25rem;
  color: var(--color-primary);
}

.faq-item[open] .faq-icon {
  transform: rotate(45deg);
}

/* Locations */
.locations-controls {
  max-width: 420px;
  margin: var(--space-xl) auto 0;
}

.city-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-xl);
  margin-bottom: var(--space-3xl);
}

.city-card {
  background: var(--color-surface);
  padding: var(--space-xl);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.city-card .city-region {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--color-text-secondary);
}

.city-card.hidden {
  display: none;
}

/* City landing */
.city-hero {
  background: var(--gradient-hero);
  color: white;
  padding: var(--space-3xl) 0;
  margin-bottom: var(--space-2xl);
}

.city-section {
  margin-bottom: var(--space-2xl);
}

.city-section .card {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  box-shadow: var(--shadow-sm);
}

.city-season-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-lg);
  margin: var(--space-xl) 0;
}

.city-tip {
  font-weight: 600;
  color: var(--color-primary);
}

.city-venues {
  list-style: none;
  padding: 0;
  margin: var(--space-xl) 0 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.city-venues li {
  background: var(--gradient-surface);
  padding: var(--space-md);
  border-radius: var(--radius-lg);
}

.keyword-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

.keyword-chip {
  padding: var(--space-xs) var(--space-md);
  background: var(--color-border);
  border-radius: 999px;
  font-size: 0.875rem;
}

.city-benefits {
  list-style: disc;
  padding-left: var(--space-xl);
  color: var(--color-text-secondary);
}

@media (max-width: 640px) {
  .article-hero {
    padding: var(--space-2xl) 0;
  }

  .page-hero h1 {
    font-size: 2rem;
  }
}
