:root {
  --primary-color: #ff9800; /* Orange */
  --secondary-color: #ff5722; /* Deep Orange */
  --background-color: #121212; /* Very Dark Grey */
  --card-background: #1e1e1e; /* Dark Grey */
  --text-color: #ffffff; /* White */
  --title-color: #ff9800; /* Orange */
  --border-color: #333333; /* Dark Grey */
  --error-color: #f44336; /* Red */
  --success-color: #4caf50; /* Green */
  --accent-color: #ff9800; /* Orange */
  --header-color: #212121; /* Very Dark Grey */
  --input-background: #2c2c2c; /* Dark Grey */
  --card-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
  --table-row-odd: #2a2a2a; /* Medium-Dark Grey */
  --table-row-even: #333333; /* Medium Grey */
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Roboto', sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  background-color: var(--background-color);
  color: var(--text-color);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 20px 40px;
  background: var(--card-background);
  color: var(--text-color);
  box-shadow: var(--card-shadow);
  margin-bottom: 2rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

header h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
}

header p {
  margin-left: 1rem;
}

section {
  background: var(--card-background);
  padding: 2rem;
  margin-bottom: 2rem;
  border-radius: 8px;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border-color);
}

.deck-card {
  background: var(--card-background);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border-color);
  transition: transform 0.2s ease;
}

.deck-card:hover {
  transform: translateY(-3px);
}

.deck-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.deck-header h3 {
  margin: 0;
  flex: 1;
  color: var(--title-color);
}

.deck-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 70px;
  height: 70px;
  border-radius: 50%;
  color: white;
  font-weight: bold;
  margin-left: 1rem;
}

#deck-score {
  background-color: #1e1e1e;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.score-value {
  font-size: 1.5rem;
  line-height: 1;
  color: var(--title-color);
}

.score-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: #ff9800;
  font-weight: 700;
}

.high-score {
  background-color: #2e7d32;
}

.medium-score {
  background-color: #ff9800;
}

.low-score {
  background-color: #f44336;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--title-color);
  margin-bottom: 1.5rem;
}

.input-group {
  margin-bottom: 1rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

input[type='text'], input[type='url'] {
  width: 100%;
  padding: 10px;
  margin-bottom: 10px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background-color: var(--input-background);
  color: var(--text-color);
}

input[type='text'], input[type='url'] {
  font-size: 1rem;
}

.btn {
  display: inline-block;
  background: var(--primary-color);
  color: #fff;
  padding: 10px 15px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.btn:hover {
  background-color: #1565c0;
}

.source-info {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.source-info ul {
  list-style-type: none;
  margin-top: 0.5rem;
}

.source-info li {
  margin-bottom: 0.5rem;
}

.source-info a {
  color: var(--secondary-color);
  text-decoration: none;
}

.source-info a:hover {
  text-decoration: underline;
}

.hidden {
  display: none;
}

.loader {
  border: 4px solid var(--border-color);
  border-top: 4px solid var(--accent-color);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 2s linear infinite;
  margin: 20px auto;
}

.deck-details {
  margin-top: 1rem;
}

/* Card hover preview styles */
.card-hover-preview {
  position: fixed;
  z-index: 1000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  background: white;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  padding: 4px;
}

.card-hover-preview.show {
  opacity: 1;
}

.card-hover-preview img {
  max-width: 200px;
  max-height: 280px;
  border-radius: 6px;
  display: block;
}

.card-hover-preview .loading {
  padding: 20px;
  text-align: center;
  color: #666;
  font-size: 14px;
}

.card-hover-preview .error {
  padding: 20px;
  text-align: center;
  color: #d32f2f;
  font-size: 14px;
}

/* Make card names hoverable */
.card-name {
  cursor: pointer;
  transition: color 0.2s ease;
}

.card-name:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

.deck-info {
  margin-bottom: 1.5rem;
}

.deck-info h3 {
  color: var(--secondary-color);
  margin-bottom: 0.5rem;
}

.houses {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

.house {
  background-color: var(--primary-color);
  color: #fff;
  padding: 0.3rem 0.8rem;
  border-radius: 15px;
  font-size: 0.9rem;
}

.cards-list {
  margin-top: 1rem;
}

.cards-list h4 {
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.cards-list ul {
  list-style-type: none;
  padding-left: 0;
}

.cards-list li {
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--border-color);
}

/* House sections in card list */
.house-section {
  margin-bottom: 20px;
  border-left: 4px solid var(--border-color);
  padding-left: 10px;
}

.house-section h4 {
  margin-top: 0;
  margin-bottom: 10px;
  color: var(--text-color);
  font-size: 1.1em;
}

/* House cards list */
.house-cards {
  list-style-type: none;
  padding-left: 10px;
}

.house-cards li {
  padding: 5px 0;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}

/* Card elements */
.card-name {
  font-weight: bold;
  flex-grow: 1;
}

.maverick-tag {
  color: #9c27b0;
  font-style: italic;
  font-size: 0.9em;
}

.amber-value {
  color: #ff9800;
  font-weight: bold;
  margin-right: 5px;
}

.card-type {
  color: #000;
  font-size: 0.9em;
  padding: 2px 6px;
  background-color: var(--primary-color);
  border-radius: 3px;
}

/* Card table styles */
.cards-table {
  margin-top: 1.5rem;
  overflow-x: auto;
}

.house-cards-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  color: var(--text-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.house-cards-table th {
  background-color: var(--accent-color);
  color: #000;
  text-align: center;
  padding: 10px;
  font-weight: bold;
  border: 1px solid var(--border-color);
}

.house-cards-table th .house-score {
  display: inline-block;
  margin-left: 5px;
  font-weight: bold;
  color: #000;
}

.house-cards-table td {
  padding: 10px;
  border: 1px solid var(--border-color);
  text-align: left;
  font-size: 0.9rem;
}

/* Add alternating dark grey row colors */
.house-cards-table tr:nth-child(odd) {
  background-color: var(--table-row-odd);
}

.house-cards-table tr:nth-child(even) {
  background-color: var(--table-row-even);
}

.card-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-name {
  flex: 1;
  margin-right: 10px;
  color: var(--title-color);
}

.card-score {
  color: white;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  font-size: 0.9rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.card-score.score-6 {
  background: linear-gradient(135deg, #2e7d32, #4caf50);
}

.card-score.score-5 {
  background: linear-gradient(135deg, #558b2f, #7cb342);
}

.card-score.score-4 {
  background: linear-gradient(135deg, #f57c00, #ff9800);
}

.card-score.score-3 {
  background: linear-gradient(135deg, #f9a825, #fbc02d);
}

.card-score.score-2 {
  background: linear-gradient(135deg, #e64a19, #ff5722);
}

.card-score.score-1 {
  background: linear-gradient(135deg, #c62828, #f44336);
}

.card-score.score-0 {
  background: linear-gradient(135deg, #424242, #616161);
}

.score-input {
  display: flex;
  align-items: center;
}

.score-select {
  padding: 2px 5px;
  border-radius: 3px;
  border: 1px solid var(--border-color);
  margin-right: 5px;
}

.save-score-btn {
  background-color: var(--secondary-color);
  color: white;
  border: none;
  border-radius: 3px;
  padding: 2px 8px;
  font-size: 0.8rem;
  cursor: pointer;
}

.save-score-btn:hover {
  background-color: #1976d2;
}

.deck-score {
  margin-top: 15px;
  padding: 15px;
  background-color: #f5f5f5;
  border-radius: 5px;
  border-left: 4px solid var(--primary-color);
}



.house-cards-table tr:hover {
  background-color: #e9e9e9;
}



.decks-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.deck-card {
  border: 1px solid var(--border-color);
  border-radius: 5px;
  padding: 1rem;
  transition: transform 0.3s ease;
}

.deck-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.deck-card h3 {
  color: var(--secondary-color);
  margin-bottom: 0.5rem;
}

.deck-card p {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.deck-card .view-btn {
  display: inline-block;
  padding: 10px 15px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
}

.view-btn:hover {
  background-color: #1565c0;
  background-color: #1976d2;
}

footer {
  text-align: center;
  padding: 1rem 0;
  margin-top: 2rem;
  color: #777;
}

/* Secondary button style - keeping this for other buttons */
.btn.secondary {
  background-color: #6c757d;
  color: white;
}

.btn.warning {
  background-color: #ffc107;
  color: #212529;
  border: 1px solid #ffc107;
}

.btn.warning:hover {
  background-color: #e0a800;
  border-color: #d39e00;
}

.btn.warning:disabled {
  background-color: #fff3cd;
  color: #856404;
  border-color: #ffeaa7;
  cursor: not-allowed;
}

/* CSV Import Modal Styles */
.csv-upload-section {
  margin-bottom: 20px;
}

.file-input, .column-input {
  width: 100%;
  padding: 8px 12px;
  background-color: var(--input-background);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--text-color);
  font-size: 14px;
}

.file-input:focus, .column-input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.csv-preview-section, .csv-processing-section {
  margin-top: 20px;
  padding: 15px;
  background-color: var(--card-background);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.preview-info {
  margin-bottom: 15px;
  color: var(--text-color);
  font-size: 14px;
}

.preview-table-container, .results-table-container {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: 4px;
}

.preview-table, .results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.preview-table th, .preview-table td,
.results-table th, .results-table td {
  padding: 8px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-color);
}

.preview-table th, .results-table th {
  background-color: var(--header-color);
  font-weight: bold;
  position: sticky;
  top: 0;
}

.preview-table tr:nth-child(even),
.results-table tr:nth-child(even) {
  background-color: var(--table-row-even);
}

.preview-table tr:nth-child(odd),
.results-table tr:nth-child(odd) {
  background-color: var(--table-row-odd);
}

.progress-container {
  margin-bottom: 15px;
}

.progress-bar {
  width: 100%;
  height: 20px;
  background-color: var(--input-background);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill {
  height: 100%;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
  width: 0%;
}

.progress-text {
  text-align: center;
  color: var(--text-color);
  font-size: 14px;
}

.results-summary {
  margin-bottom: 15px;
  padding: 10px;
  background-color: var(--input-background);
  border-radius: 4px;
  color: var(--text-color);
}

.status-success {
  color: var(--success-color);
  font-weight: bold;
}

.status-error {
  color: var(--error-color);
  font-weight: bold;
}

.status-calculated {
  color: var(--primary-color);
  font-weight: bold;
}

.filename-section {
  margin-bottom: 15px;
  padding: 10px;
  background-color: var(--card-background);
  border-radius: 4px;
  border: 1px solid var(--border-color);
}

.filename-input {
  width: 100%;
  padding: 8px 12px;
  background-color: var(--input-background);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--text-color);
  font-size: 14px;
}

.filename-input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.navigation-link {
  text-align: center;
  margin: 20px 0;
  padding: 15px;
}

.scroll-to-bottom {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-color);
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  padding: 10px 20px;
  border: 2px solid var(--primary-color);
  border-radius: 6px;
  background-color: transparent;
  transition: all 0.3s ease;
}

.scroll-to-bottom:hover {
  background-color: var(--primary-color);
  color: var(--background-color);
  transform: translateY(-2px);
}

.scroll-to-bottom i {
  font-size: 14px;
}

.scroll-to-top {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-color);
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  padding: 10px 20px;
  border: 2px solid var(--primary-color);
  border-radius: 6px;
  background-color: transparent;
  transition: all 0.3s ease;
}

.scroll-to-top:hover {
  background-color: var(--primary-color);
  color: var(--background-color);
  transform: translateY(-2px);
}

.scroll-to-top i {
  font-size: 14px;
}

/* Prophecy Cards Section */
.prophecy-cards-section {
  background-color: #2a2a2a;
  border: 2px solid var(--primary-color);
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
}

.prophecy-cards-section h4 {
  color: var(--title-color);
  margin-top: 0;
  margin-bottom: 15px;
  border-bottom: 1px solid var(--primary-color);
  padding-bottom: 8px;
}

.prophecy-cards-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.prophecy-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--card-background);
  padding: 10px;
  border-radius: 5px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  border: 1px solid var(--border-color);
}

.prophecy-card-name {
  font-weight: bold;
  flex: 1;
  color: var(--text-color);
}

.prophecy-card-score-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Prophecy Cards Styling */
.prophecy-cards-container {
  margin-top: 2rem;
  margin-bottom: 2rem;
  padding: 1rem;
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: var(--card-shadow);
}

.prophecy-cards-container h3 {
  margin-top: 0;
  color: var(--primary-color); /* Use primary orange color */
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.prophecy-cards-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.prophecy-cards-table th,
.prophecy-cards-table td {
  border: 1px solid #333366;
  padding: 10px;
  text-align: left;
}

.prophecy-cards-table th {
  background-color: #333366;
  color: var(--primary-color);
  font-weight: bold;
}

/* Add alternating dark row colors */
.prophecy-cards-table tr:nth-child(odd) {
  background-color: var(--table-row-odd);
}

.prophecy-cards-table tr:nth-child(even) {
  background-color: var(--table-row-even);
}

.prophecy-card-name {
  font-weight: 600;
  color: var(--title-color);
}

.prophecy-card-score {
  width: 150px;
}

.edit-prophecy-score-btn {
  margin-left: 10px;
  padding: 2px 8px;
  background-color: var(--primary-color);
  color: #000;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  font-size: 0.8rem;
}

.edit-prophecy-score-btn:hover {
  background-color: var(--secondary-color);
  color: #fff;
}

.save-prophecy-score-btn {
  padding: 2px 8px;
  background-color: var(--primary-color);
  color: #000;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  font-size: 0.8rem;
}

.save-prophecy-score-btn:hover {
  background-color: var(--secondary-color);
  color: #fff;
}

/* Deck ownership styles */
.deck-owned {
  margin-top: 10px;
  padding: 8px 12px;
  background-color: var(--card-background);
  border-radius: 4px;
  border: 1px solid var(--border-color);
}

.deck-owned label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: normal;
  margin-bottom: 0;
}

.deck-owned input[type="checkbox"] {
  margin-right: 8px;
  cursor: pointer;
}

/* Owned deck styling in the saved decks list */
.deck-card.owned-deck {
  border-left: 4px solid var(--success-color);
}

.owned-label {
  display: inline-block;
  background-color: var(--success-color);
  color: white;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: bold;
  margin-top: 5px;
  margin-bottom: 10px;
}

.prophecy-card-score {
  padding: 5px;
  border-radius: 3px;
  border: 1px solid var(--border-color);
  background-color: var(--input-background);
  color: var(--text-color);
}

.remove-prophecy-card-btn {
  background-color: var(--error-color);
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 3px;
  cursor: pointer;
}

.add-prophecy-card {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px dashed var(--primary-color);
}

.prophecy-card-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group label {
  color: var(--text-color);
}

.form-group input,
.form-group select {
  padding: 8px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background-color: var(--input-background);
  color: var(--text-color);
}

#add-prophecy-card-btn {
  background-color: var(--success-color);
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 10px;
  align-self: flex-start;
}

/* Modal styles */
.modal {
  display: flex;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  align-items: center;
  justify-content: center;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background-color: var(--card-background);
  border-radius: 8px;
  box-shadow: var(--card-shadow);
  width: 80%;
  max-width: 800px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
  color: var(--title-color);
  margin: 0;
}

.close-modal {
  color: var(--text-color);
  font-size: 1.5rem;
  cursor: pointer;
}

.close-modal:hover {
  color: var(--primary-color);
}

.modal-body {
  padding: 1rem;
  overflow-y: auto;
  max-height: 60vh;
}

.modal-footer {
  padding: 1rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Prophecy card editor styles */
.prophecy-card-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 0.5rem;
}

.prophecy-card-name {
  flex-grow: 1;
  font-weight: bold;
}

.prophecy-card-score-editor {
  display: flex;
  align-items: center;
  gap: 10px;
}

.prophecy-card-score-editor select {
  padding: 0.5rem;
  background-color: var(--input-background);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  border-radius: 4px;
}

/* Token card editor styles */
.token-card-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 0.5rem;
}

.token-card-name {
  flex-grow: 1;
  font-weight: bold;
}

.token-card-score-editor {
  display: flex;
  align-items: center;
  gap: 10px;
}

.token-card-score-editor select {
  padding: 0.5rem;
  background-color: var(--input-background);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  border-radius: 4px;
}

/* Token Cards Table Styles */
.token-cards-container {
  margin-top: 2rem;
  margin-bottom: 2rem;
  padding: 1rem;
  background-color: var(--card-background);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: var(--card-shadow);
}

.token-cards-container h3 {
  margin-top: 0;
  color: var(--primary-color);
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.token-cards-table {
  width: 100%;
  overflow-x: auto;
}

.token-cards-table table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.token-cards-table th,
.token-cards-table td {
  border: 1px solid var(--border-color);
  padding: 10px;
  text-align: left;
}

.token-cards-table th {
  background-color: var(--accent-color);
  color: #000;
  font-weight: bold;
  text-align: center;
}

.token-cards-table tr:nth-child(odd) {
  background-color: var(--table-row-odd);
}

.token-cards-table tr:nth-child(even) {
  background-color: var(--table-row-even);
}

.token-cards-table td:nth-child(2) {
  text-align: center;
}

.token-cards-table td:nth-child(3) {
  text-align: center;
}

/* ==================== CARD RATINGS EDITOR STYLES ==================== */

.search-filter {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1rem;
  background-color: var(--card-background);
  border-radius: 4px;
  border: 1px solid var(--border-color);
}

.search-input, .filter-select {
  padding: 0.5rem;
  background-color: var(--input-background);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 0.9rem;
}

.search-input {
  flex: 1;
  min-width: 200px;
}

.filter-select {
  min-width: 150px;
}

.search-input:focus, .filter-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(255, 152, 0, 0.2);
}

.card-rating-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  margin-bottom: 0.5rem;
  background-color: var(--card-background);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.card-rating-item:hover {
  background-color: var(--table-row-odd);
}

.card-rating-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.card-name {
  font-weight: 600;
  color: var(--text-color);
  font-size: 1rem;
}

.card-id {
  font-size: 0.8rem;
  color: #aaa;
  font-family: monospace;
}

.card-rating-editor {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-score-select {
  padding: 0.5rem;
  background-color: var(--input-background);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 0.9rem;
  min-width: 60px;
}

.card-score-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(255, 152, 0, 0.2);
}

.no-cards-message {
  text-align: center;
  padding: 2rem;
  color: #aaa;
  font-style: italic;
}

/* Admin links styling */
.admin-links {
  display: none; /* Hidden by default, shown only for admin users */
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.admin-links a {
  color: var(--primary-color);
  text-decoration: none;
  padding: 0.5rem 1rem;
  background-color: var(--card-background);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  text-align: center;
  transition: all 0.2s ease;
}

.admin-links a:hover {
  background-color: var(--primary-color);
  color: var(--background-color);
  transform: translateY(-2px);
  box-shadow: var(--card-shadow);
}

/* Deck links container */
.deck-links {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin: 0.5rem 0;
}

/* DoK link styling */
.dok-link {
  color: var(--secondary-color);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 4px 8px;
  background-color: rgba(255, 87, 34, 0.1);
  border-radius: 4px;
  border: 1px solid var(--secondary-color);
  transition: all 0.2s ease;
  display: inline-block;
}

.dok-link:hover {
  background-color: var(--secondary-color);
  color: white;
  text-decoration: none;
  transform: translateY(-1px);
}

/* Share deck button styling */
.share-deck-btn {
  color: var(--primary-color);
  background-color: rgba(33, 150, 243, 0.1);
  border: 1px solid var(--primary-color);
  border-radius: 4px;
  padding: 4px 12px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-block;
}

.share-deck-btn:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-1px);
}

.share-deck-btn:active {
  transform: translateY(0);
}

/* ==================== DECK FILTERS STYLES ==================== */

.deck-filters {
  display: flex;
  gap: 2rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background-color: var(--card-background);
  border-radius: 5px;
  border: 1px solid var(--border-color);
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filter-group label {
  font-weight: bold;
  color: var(--title-color);
  font-size: 0.9rem;
}

.deck-filters .filter-select,
.deck-filters .filter-input {
  padding: 0.5rem;
  background-color: var(--input-background);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  border-radius: 3px;
  min-width: 150px;
}

.deck-filters .filter-select:focus,
.deck-filters .filter-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(255, 152, 0, 0.2);
}

@media (max-width: 768px) {
  .deck-filters {
    flex-direction: column;
    gap: 1rem;
  }
}

/* Authentication UI Styles */
.user-info {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-left: auto;
  padding: 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  backdrop-filter: blur(10px);
}

.user-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.user-email {
  color: white;
  font-size: 0.9rem;
  font-weight: 500;
}

.deck-fetch-status {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.8rem;
}

.deck-limit-info {
  color: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  gap: 6px;
}

.deck-limit-info.admin {
  color: #4caf50;
  font-weight: 600;
}

.deck-limit-info i {
  color: var(--primary-color);
  font-size: 0.85rem;
}

.deck-limit-info.admin i {
  color: #4caf50;
}

.deck-limit-info .remaining {
  color: var(--primary-color);
  font-weight: 600;
}

.bonus-fetches-info {
  color: #4caf50;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  margin-top: 2px;
}

.bonus-fetches-info i {
  color: #4caf50;
  font-size: 0.85rem;
}

.next-allowance {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 4px;
}

.next-allowance i {
  color: rgba(255, 152, 0, 0.7);
  font-size: 0.7rem;
}

.deck-fetch-status .loading {
  color: rgba(255, 255, 255, 0.6);
  font-style: italic;
}

.deck-fetch-status .error {
  color: var(--error-color);
}

.user-info span {
  color: white;
  font-size: 0.9rem;
  font-weight: 500;
}

.logout-btn {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.logout-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
}

.logout-btn:active {
  transform: translateY(0);
}

/* Login button - styled like primary action button (Fetch Deck) */
.login-btn {
  background: var(--primary-color);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.login-btn:hover {
  background-color: #e68900;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
}

.login-btn:active {
  transform: translateY(0);
}

/* Responsive adjustments for authentication UI */
@media (max-width: 768px) {
  .user-info {
    flex-direction: column;
    gap: 8px;
    padding: 8px;
  }
  
  .user-email {
    font-size: 0.8rem;
  }
  
  .deck-fetch-status {
    font-size: 0.75rem;
  }
  
  .next-allowance {
    font-size: 0.7rem;
  }
  
  .user-info span {
    font-size: 0.8rem;
  }
  
  .logout-btn,
  .login-btn {
    font-size: 0.8rem;
    padding: 5px 10px;
  }
  
  header {
    flex-direction: column;
    gap: 15px;
    padding: 15px 20px;
  }
}

/* ==================== CARDS PAGE STYLES ==================== */

.header-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary-color);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border: 2px solid var(--primary-color);
  border-radius: 6px;
  background-color: transparent;
  transition: all 0.3s ease;
  font-weight: 500;
}

.nav-link:hover {
  background-color: var(--primary-color);
  color: var(--background-color);
  transform: translateY(-2px);
}

.cards-page-section {
  background: var(--card-background);
  padding: 2rem;
  margin-bottom: 2rem;
  border-radius: 8px;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border-color);
}

.cards-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background-color: var(--input-background);
  border-radius: 5px;
  border: 1px solid var(--border-color);
}

.cards-stats {
  margin-bottom: 1.5rem;
  padding: 0.75rem 1rem;
  background-color: var(--input-background);
  border-radius: 5px;
  border: 1px solid var(--border-color);
  text-align: center;
  font-weight: 600;
  color: var(--title-color);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.card-item {
  background: var(--input-background);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.card-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(255, 152, 0, 0.3);
  border-color: var(--primary-color);
}

.card-image-container {
  width: 100%;
  height: 350px;
  overflow: hidden;
  background-color: var(--background-color);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.card-item:hover .card-image {
  transform: scale(1.05);
}

.card-info-container {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex-grow: 1;
}

.card-title {
  margin: 0;
  font-size: 1.1rem;
  color: var(--title-color);
  font-weight: 600;
  line-height: 1.3;
  min-height: 2.6rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-score-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-color);
}

.score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  border-radius: 50%;
  font-weight: bold;
  font-size: 1.2rem;
  color: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.score-badge.score-6 {
  background: linear-gradient(135deg, #2e7d32, #4caf50);
}

.score-badge.score-5 {
  background: linear-gradient(135deg, #558b2f, #7cb342);
}

.score-badge.score-4 {
  background: linear-gradient(135deg, #f57c00, #ff9800);
}

.score-badge.score-3 {
  background: linear-gradient(135deg, #f9a825, #fbc02d);
}

.score-badge.score-2 {
  background: linear-gradient(135deg, #e64a19, #ff5722);
}

.score-badge.score-1 {
  background: linear-gradient(135deg, #c62828, #f44336);
}

.score-badge.score-0 {
  background: linear-gradient(135deg, #424242, #616161);
}

.error-message, .no-cards-message {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-color);
  font-size: 1.1rem;
  background-color: var(--input-background);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.error-message {
  color: var(--error-color);
}

/* Responsive adjustments for cards page */
@media (max-width: 768px) {
  .cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
  }

  .card-image-container {
    height: 280px;
  }

  .cards-filters {
    grid-template-columns: 1fr;
  }
}

/* ==================== PATREON PROMOTIONAL STYLES ==================== */

.patreon-promo {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(255, 66, 77, 0.15), rgba(249, 104, 84, 0.15));
  border: 2px solid #f96854;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(249, 104, 84, 0.2);
}

.patreon-promo-compact {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  margin-top: 8px;
  background: linear-gradient(135deg, rgba(255, 66, 77, 0.1), rgba(249, 104, 84, 0.1));
  border: 1px solid rgba(249, 104, 84, 0.5);
  border-radius: 6px;
  font-size: 0.85rem;
}

.patreon-message {
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
}

.patreon-message i {
  color: #ffd700;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.patreon-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}

.patreon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  background: linear-gradient(135deg, #f96854, #ff424d);
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(249, 104, 84, 0.3);
}

.patreon-link:hover {
  background: linear-gradient(135deg, #ff424d, #f96854);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(249, 104, 84, 0.5);
}

.patreon-link i {
  font-size: 1.1rem;
}

.relink-patreon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.relink-patreon-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
}

.relink-patreon-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.relink-patreon-btn i {
  font-size: 0.85rem;
}

/* Responsive adjustments for Patreon promo */
@media (max-width: 768px) {
  .patreon-promo {
    padding: 12px;
    gap: 10px;
  }
  
  .patreon-promo-compact {
    padding: 8px 10px;
    gap: 6px;
    font-size: 0.8rem;
  }
  
  .patreon-message {
    font-size: 0.85rem;
  }
  
  .patreon-promo-compact .patreon-message {
    font-size: 0.8rem;
  }
  
  .patreon-actions {
    width: 100%;
    align-items: stretch;
  }
  
  .patreon-link {
    padding: 8px 16px;
    font-size: 0.85rem;
    text-align: center;
  }
  
  .relink-patreon-btn {
    padding: 6px 12px;
    font-size: 0.75rem;
    text-align: center;
  }
}
