:root {
  --primary: #e056a0;
  --primary-rgb: 224, 86, 160;
  --secondary: #c0a0c0;
  --text: #e8e8e8;
  --panel-bg: #1a0a1a;
  --deep-bg: #2a1a2e;
  --panel-gradient: linear-gradient(145deg, #2a1a2e, #1a0a1a);
  --card-front-gradient: linear-gradient(145deg, #1a0a1a, #0d050d);
  --header-bg: rgba(0, 0, 0, 0.6);
  --input-bg: rgba(0, 0, 0, 0.5);
  --btn-text: #0d050d;
}

[data-theme=light] {
  --primary: #7c4daf;
  --primary-rgb: 124, 77, 175;
  --secondary: #9b7cb8;
  --text: #2d1b3d;
  --panel-bg: #ffffff;
  --deep-bg: #f0e4ff;
  --panel-gradient: linear-gradient(145deg, #f0e4ff, #faf4ff);
  --card-front-gradient: linear-gradient(145deg, #ffffff, #faf4ff);
  --header-bg: rgba(255, 255, 255, 0.75);
  --input-bg: rgba(0, 0, 0, 0.05);
  --btn-text: #ffffff;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --primary: #7c4daf;
    --primary-rgb: 124, 77, 175;
    --secondary: #9b7cb8;
    --text: #2d1b3d;
    --panel-bg: #ffffff;
    --deep-bg: #f0e4ff;
    --panel-gradient: linear-gradient(145deg, #f0e4ff, #faf4ff);
    --card-front-gradient: linear-gradient(145deg, #ffffff, #faf4ff);
    --header-bg: rgba(255, 255, 255, 0.75);
    --input-bg: rgba(0, 0, 0, 0.05);
    --btn-text: #ffffff;
  }
}
body {
  font-family: Georgia, serif;
  background: #000 url("../img/Hubble_HH80_new_4Filters_V7_FINALcrop.jpg") center center/cover no-repeat fixed;
  color: var(--text);
}

/* Light-mode body: replace space image with soft gradient */
[data-theme=light] body {
  background: linear-gradient(135deg, #fff0fa, #f0e4ff);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) body {
    background: linear-gradient(135deg, #fff0fa, #f0e4ff);
  }
}
/* Dark overlay for readability */
body::before {
  background: rgba(0, 0, 0, 0.5);
}

[data-theme=light] body::before {
  background: none;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) body::before {
    background: none;
  }
}
/* Light theme: update SVG dropdown arrows to match purple primary */
[data-theme=light] .spread-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%237c4daf' d='M6 9L1 4h10z'/%3E%3C/svg%3E"), var(--panel-gradient);
}

[data-theme=light] .setting-row select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%237c4daf' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .spread-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%237c4daf' d='M6 9L1 4h10z'/%3E%3C/svg%3E"), var(--panel-gradient);
  }
  :root:not([data-theme]) .setting-row select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%237c4daf' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  }
}
/* Card back diagonal stripe pattern */
.card-back-design {
  background: linear-gradient(45deg, transparent 48%, rgba(var(--primary-rgb), 0.3) 49%, rgba(var(--primary-rgb), 0.3) 51%, transparent 52%), linear-gradient(-45deg, transparent 48%, rgba(var(--primary-rgb), 0.3) 49%, rgba(var(--primary-rgb), 0.3) 51%, transparent 52%);
  background-size: 20px 20px;
}

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

.hidden {
  display: none !important;
}

body {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Dark overlay for readability */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

header, main {
  position: relative;
  z-index: 1;
}

header {
  position: relative;
  text-align: center;
  padding: 2rem 1rem;
  border-bottom: 1px solid rgba(var(--primary-rgb), 0.3);
  background: var(--header-bg);
}

header .settings-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

h1 {
  font-family: "Cinzel Decorative", Georgia, serif;
  font-size: 3rem;
  color: var(--primary);
  text-shadow: 0 0 20px rgba(var(--primary-rgb), 0.5);
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.tagline {
  font-style: italic;
  color: var(--secondary);
  font-size: 1.1rem;
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Spread controls row */
.spread-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

/* Spread dropdown */
.spread-select {
  background-color: var(--panel-bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23e056a0' d='M6 9L1 4h10z'/%3E%3C/svg%3E"), var(--panel-gradient);
  background-repeat: no-repeat, no-repeat;
  background-position: right 0.75rem center, 0 0;
  background-size: 12px, 100% 100%;
  border: 2px solid var(--primary);
  color: var(--primary);
  padding: 0.75rem 2.5rem 0.75rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.3s ease;
  appearance: none;
  outline: none;
  min-width: 160px;
}

.spread-select:hover {
  box-shadow: 0 0 20px rgba(var(--primary-rgb), 0.4);
}

.spread-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 8px rgba(var(--primary-rgb), 0.3);
}

.spread-select optgroup {
  background: var(--panel-bg);
  color: var(--secondary);
  font-style: normal;
}

.spread-select option {
  background: var(--panel-bg);
  color: var(--text);
}

/* Draw button */
.draw-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  background: var(--panel-gradient);
  border: 2px solid var(--primary);
  color: var(--primary);
  padding: 0.75rem 1.5rem;
  font-size: 1.1rem;
  font-family: inherit;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.draw-btn:hover {
  background: var(--primary);
  color: var(--btn-text);
  box-shadow: 0 0 25px rgba(var(--primary-rgb), 0.5);
  transform: scale(1.05);
}

.draw-reload {
  display: block;
  vertical-align: middle;
  opacity: 0.8;
  flex-shrink: 0;
}

.draw-btn.loading {
  cursor: default;
  opacity: 0.75;
  pointer-events: none;
}

.draw-btn.loading .draw-reload {
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
/* Icon buttons (settings, share, download, reading) */
.settings-btn, .share-btn {
  background: transparent;
  border: 2px solid rgba(var(--primary-rgb), 0.5);
  color: var(--primary);
  padding: 0.75rem;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.settings-btn:hover, .share-btn:hover {
  border-color: var(--primary);
  box-shadow: 0 0 15px rgba(var(--primary-rgb), 0.4);
  transform: translateY(-2px);
}

.settings-btn svg {
  transition: transform 0.3s ease;
}

.settings-btn:hover svg {
  transform: rotate(45deg);
}

.share-btn:disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}

/* Toast notification */
.copy-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: var(--btn-text);
  padding: 0.6rem 1.5rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: bold;
  z-index: 200;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* Reading display */
.reading-display {
  text-align: center;
  color: var(--secondary);
  font-style: italic;
  font-size: 1.05rem;
  padding: 0.75rem 1.5rem;
  border: 1px solid rgba(var(--primary-rgb), 0.3);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.3);
  max-width: 600px;
  margin: 0 auto 1.5rem;
}

/* Reading modal */
.reading-textarea {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid rgba(var(--primary-rgb), 0.5);
  color: var(--text);
  padding: 0.75rem;
  font-size: 0.95rem;
  font-family: inherit;
  border-radius: 6px;
  outline: none;
  resize: vertical;
  min-height: 100px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.reading-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 8px rgba(var(--primary-rgb), 0.3);
}

.reading-textarea::placeholder {
  color: rgba(200, 200, 200, 0.4);
}

#reading-btn.active {
  border-color: var(--primary);
  background: rgba(var(--primary-rgb), 0.15);
}

.card-display {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  padding: 1rem;
}

/* User spread layout */
.card-display.user-spread {
  display: grid;
  gap: 1rem;
  justify-items: center;
  justify-content: center;
}

/* Celtic Cross Layout */
.card-display.celtic-cross {
  display: grid;
  grid-template-columns: 1fr 1.5fr 1fr 1fr;
  grid-template-rows: repeat(4, auto);
  gap: 1rem;
  max-width: 900px;
  margin: 0 auto;
}

/* Card Styles */
.tarot-card {
  width: 180px;
  height: 280px;
  perspective: 1000px;
  cursor: pointer;
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}

.tarot-card.revealed .card-inner {
  transform: rotateY(180deg);
}

.card-front, .card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 12px;
  overflow: hidden;
  border: 3px solid var(--primary);
  display: flex;
  flex-direction: column;
  padding: 1rem;
}

.card-back {
  background: var(--panel-gradient);
  align-items: center;
  justify-content: center;
}

.card-back-position, .card-position {
  color: var(--primary);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-align: center;
  margin-bottom: 0.5rem;
}

.card-position {
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(var(--primary-rgb), 0.3);
}

.card-back-design {
  width: 100%;
  flex: 1;
  border: 2px solid rgba(var(--primary-rgb), 0.5);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-back-symbol {
  font-size: 3rem;
  color: var(--primary);
  text-shadow: 0 0 10px rgba(var(--primary-rgb), 0.5);
}

.card-front {
  background: var(--card-front-gradient);
  transform: rotateY(180deg);
}

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

.modal-content {
  background: var(--card-front-gradient);
  border: 2px solid var(--primary);
  border-radius: 12px;
  width: 90%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 0 30px rgba(var(--primary-rgb), 0.3);
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(var(--primary-rgb), 0.3);
  flex-shrink: 0;
}

.modal-header h2 {
  color: var(--primary);
  font-size: 1.25rem;
  margin: 0;
}

.modal-close, .article-close {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: transform 0.2s ease;
}
.modal-close:hover, .article-close:hover {
  transform: scale(1.2);
}

/* Modal tabs */
.modal-tabs {
  display: flex;
  border-bottom: 1px solid rgba(var(--primary-rgb), 0.3);
  flex-shrink: 0;
}

.modal-tab {
  flex: 1;
  background: none;
  border: none;
  color: var(--secondary);
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

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

.modal-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
}

.download-filename-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.download-filename-row label {
  color: var(--secondary);
  font-size: 0.85rem;
  white-space: nowrap;
}

.download-format-body {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.settings-section {
  margin-bottom: 1.5rem;
}

.settings-section:last-child {
  margin-bottom: 0;
}

.settings-section h3 {
  color: var(--secondary);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

.setting-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.setting-row label {
  color: var(--text);
  font-size: 0.85rem;
  min-width: 80px;
}

.setting-row input,
.setting-row select,
.download-filename-row input {
  flex: 1;
  background: var(--input-bg);
  border: 1px solid rgba(var(--primary-rgb), 0.5);
  color: var(--text);
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  font-family: inherit;
  border-radius: 6px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.setting-row select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23e056a0' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 12px;
  padding-right: 2.5rem;
}

.setting-row select option {
  background: var(--panel-bg);
  color: var(--text);
}

.setting-row input:focus,
.setting-row select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 8px rgba(var(--primary-rgb), 0.3);
}

.download-filename-row input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.2);
}

.setting-row input[type=checkbox] {
  width: 1.1rem;
  height: 1.1rem;
  flex: 0 0 auto;
  cursor: pointer;
  accent-color: var(--primary);
  border: none;
  box-shadow: none;
  padding: 0;
  background: none;
}

.modal-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(var(--primary-rgb), 0.3);
  flex-shrink: 0;
}

.btn-reset, .btn-save {
  padding: 0.6rem 1.25rem;
  font-size: 0.9rem;
  font-family: inherit;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-reset {
  background: transparent;
  border: 1px solid rgba(var(--primary-rgb), 0.5);
  color: var(--secondary);
}

.btn-reset:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-save {
  background: var(--primary);
  border: none;
  color: var(--btn-text);
  font-weight: bold;
}

.btn-save:hover {
  background: #f066b0;
  box-shadow: 0 0 15px rgba(var(--primary-rgb), 0.5);
}

/* Spreads tab */
.spread-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.spread-list-item {
  border: 1px solid rgba(var(--primary-rgb), 0.3);
  border-radius: 8px;
  overflow: hidden;
}

.spread-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0.75rem;
  background: rgba(0, 0, 0, 0.3);
}

.spread-list-name {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: bold;
}

.spread-list-actions {
  display: flex;
  gap: 0.4rem;
}

.spread-action-btn {
  background: transparent;
  border: 1px solid rgba(var(--primary-rgb), 0.4);
  color: var(--secondary);
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  font-family: inherit;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.spread-action-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.spread-action-delete {
  border-color: rgba(255, 80, 80, 0.4);
  color: #ff8080;
}

.spread-action-delete:hover {
  border-color: #ff5050;
  color: #ff5050;
}

/* Spread editor (collapsed by default) */
.spread-editor {
  display: none;
  padding: 0.75rem;
  border-top: 1px solid rgba(var(--primary-rgb), 0.2);
  background: rgba(0, 0, 0, 0.2);
}

.spread-editor.open {
  display: block;
}

.spread-editor-inner {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.position-editor-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.position-editor-row label {
  color: var(--secondary);
  font-size: 0.8rem;
  min-width: 70px;
  flex-shrink: 0;
}

.position-editor-labels {
  display: flex;
  gap: 0.4rem;
  font-size: 0.7rem;
  color: var(--secondary);
  padding: 0 0.2rem;
}

.position-editor-labels span:nth-child(1) {
  min-width: 70px;
  flex-shrink: 0;
}

.position-editor-labels span:nth-child(2) {
  flex: 1;
}

.position-editor-labels span:nth-child(3) {
  width: 50px;
  flex-shrink: 0;
}

.position-editor-labels span:nth-child(4) {
  width: 50px;
  flex-shrink: 0;
}

.position-editor-labels span:nth-child(5) {
  width: 24px;
  flex-shrink: 0;
}

/* Editor inputs (shared base) */
.pos-name-input,
.pos-row-input,
.pos-col-input,
.spread-name-input {
  background: var(--input-bg);
  border: 1px solid rgba(var(--primary-rgb), 0.4);
  color: var(--text);
  font-family: inherit;
  border-radius: 4px;
  outline: none;
}

.pos-name-input {
  flex: 1;
  padding: 0.35rem 0.5rem;
  font-size: 0.8rem;
}

.pos-row-input,
.pos-col-input {
  width: 50px;
  flex-shrink: 0;
  padding: 0.35rem 0.4rem;
  font-size: 0.8rem;
}

.spread-name-input {
  flex: 1;
  padding: 0.35rem 0.5rem;
  font-size: 0.85rem;
}

.pos-name-input:focus,
.pos-row-input:focus,
.pos-col-input:focus,
.spread-name-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 6px rgba(var(--primary-rgb), 0.3);
}

.spread-editor-save {
  align-self: flex-end;
  margin-top: 0.25rem;
}

.card-title {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 1rem;
  line-height: 1.4;
  color: var(--text);
  padding: 0.5rem;
  overflow: hidden;
}

.card-link {
  display: block;
  text-align: center;
  color: var(--primary);
  text-decoration: none;
  font-size: 0.8rem;
  padding: 0.5rem;
  margin-top: auto;
  border-top: 1px solid rgba(var(--primary-rgb), 0.3);
  transition: all 0.3s ease;
}

.card-link:hover {
  background: rgba(var(--primary-rgb), 0.1);
  text-shadow: 0 0 10px rgba(var(--primary-rgb), 0.5);
}

/* Celtic Cross specific positioning */
.celtic-cross .tarot-card[data-position="1"],
.celtic-cross .tarot-card[data-position="2"] {
  grid-column: 2;
  grid-row: 2;
  justify-self: center;
}

.celtic-cross .tarot-card[data-position="1"] {
  transform: translateY(-20px);
  z-index: 1;
}

.celtic-cross .tarot-card[data-position="2"] {
  transform: rotate(90deg) translateY(20px);
  z-index: 2;
}

.celtic-cross .tarot-card[data-position="1"]:hover,
.celtic-cross .tarot-card[data-position="1"].revealed:hover {
  z-index: 3;
}

.celtic-cross .tarot-card[data-position="3"] {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
}

.celtic-cross .tarot-card[data-position="4"] {
  grid-column: 2;
  grid-row: 3;
  justify-self: center;
}

.celtic-cross .tarot-card[data-position="5"] {
  grid-column: 1;
  grid-row: 2;
  transform: translateX(-20px);
}

.celtic-cross .tarot-card[data-position="6"] {
  grid-column: 3;
  grid-row: 2;
}

.celtic-cross .tarot-card[data-position="7"] {
  grid-column: 4;
  grid-row: 4;
}

.celtic-cross .tarot-card[data-position="8"] {
  grid-column: 4;
  grid-row: 3;
}

.celtic-cross .tarot-card[data-position="9"] {
  grid-column: 4;
  grid-row: 2;
}

.celtic-cross .tarot-card[data-position="10"] {
  grid-column: 4;
  grid-row: 1;
}

/* Spread table view */
.spread-table {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1rem;
}

.spread-table-el {
  width: 100%;
  border-collapse: collapse;
  color: var(--text);
  font-size: 0.95rem;
}
.spread-table-el th {
  color: var(--secondary);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.5rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid rgba(var(--primary-rgb), 0.4);
}
.spread-table-el td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid rgba(var(--primary-rgb), 0.12);
  vertical-align: middle;
}
.spread-table-el tr:last-child td {
  border-bottom: none;
}
.spread-table-el tr:hover td {
  background: rgba(var(--primary-rgb), 0.06);
}
.spread-table-el td:first-child {
  color: var(--secondary);
  font-size: 0.85rem;
  width: 2.5rem;
  text-align: center;
}
.spread-table-el td:nth-child(2) {
  color: var(--secondary);
  font-size: 0.85rem;
}

.spread-table-link {
  color: var(--primary);
  text-decoration: none;
  transition: text-shadow 0.2s ease;
}
.spread-table-link:hover {
  text-decoration: underline;
  text-shadow: 0 0 8px rgba(var(--primary-rgb), 0.4);
}

/* Article viewer */
.article-viewer {
  margin-top: 2rem;
  border: 2px solid var(--primary);
  border-radius: 12px;
  overflow: hidden;
  background: var(--panel-bg);
}

.article-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--panel-gradient);
  border-bottom: 1px solid rgba(var(--primary-rgb), 0.3);
}

.article-title {
  color: var(--primary);
  font-size: 1rem;
  font-weight: bold;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  margin-right: 1rem;
}

.article-position {
  opacity: 0.65;
  font-weight: normal;
  margin-right: 0.25em;
}
.article-position:not(:empty)::after {
  content: ": ";
}

.article-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.article-external-link {
  color: var(--secondary);
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
}

.article-external-link:hover {
  color: var(--primary);
}

.article-iframe {
  width: 100%;
  height: 70vh;
  border: none;
  background: #fff;
}

/* Error state */
.error-message {
  text-align: center;
  padding: 2rem;
  color: #ff6b6b;
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid rgba(255, 107, 107, 0.3);
  border-radius: 8px;
  margin: 2rem auto;
  max-width: 500px;
}

footer {
  text-align: center;
  padding: 2rem;
  color: var(--secondary);
  font-style: italic;
  border-top: 1px solid rgba(var(--primary-rgb), 0.2);
  border-bottom: 1px solid rgba(var(--primary-rgb), 0.2);
  margin-top: 2rem;
  background: var(--header-bg);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }
  .tarot-card {
    width: 150px;
    height: 230px;
  }
  .card-title {
    font-size: 0.9rem;
  }
  .celtic-cross {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
  }
  .celtic-cross .tarot-card {
    width: 80px;
    height: 120px;
  }
  .celtic-cross .card-position,
  .celtic-cross .card-back-position {
    font-size: 0.45rem;
    padding: 0;
    margin-bottom: 0.2rem;
    padding-bottom: 0.2rem;
  }
  .celtic-cross .card-back {
    padding: 0.4rem;
  }
  .celtic-cross .card-front {
    padding: 0.4rem;
  }
  .celtic-cross .card-title {
    font-size: 0.6rem;
  }
  .celtic-cross .card-link {
    font-size: 0.5rem;
  }
}
@media (max-width: 480px) {
  .celtic-cross .tarot-card {
    width: 70px;
    height: 100px;
  }
}

/*# sourceMappingURL=styles.css.map */
