/* BridgeMind Shared Styles - matches landing page design tokens */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --felt: #0a2e1a;
  --felt-light: #133d26;
  --gold: #d4a853;
  --gold-dim: #b8923f;
  --cream: #f5f0e8;
  --cream-dim: #d9d2c6;
  --card-white: #ffffff;
  --spade: #1a1a2e;
  --red-suit: #dc3545;
  --error: #ef4444;
  --success: #22c55e;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--spade);
  color: var(--cream);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Nav */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(10, 46, 26, 0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(212, 168, 83, 0.1);
}

.logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--cream);
  letter-spacing: -0.5px;
  text-decoration: none;
}

.logo span { color: var(--gold); }

.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-links a {
  color: var(--cream-dim);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--gold); }

.nav-links a.active { color: var(--gold); }

/* Layout */
.page-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 6rem 2rem 3rem;
  min-height: 100vh;
}

.page-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--card-white);
  letter-spacing: -1px;
  margin-bottom: 0.5rem;
}

.page-subtitle {
  font-size: 1rem;
  color: var(--cream-dim);
  margin-bottom: 2.5rem;
}

/* Cards */
.card {
  background: rgba(10, 46, 26, 0.4);
  border: 1px solid rgba(212, 168, 83, 0.1);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--card-white);
  margin-bottom: 1rem;
}

/* Form elements */
textarea {
  width: 100%;
  min-height: 250px;
  padding: 1rem;
  background: rgba(26, 26, 46, 0.6);
  border: 1px solid rgba(212, 168, 83, 0.15);
  border-radius: 8px;
  color: var(--cream);
  font-family: 'DM Mono', 'SF Mono', 'Consolas', monospace;
  font-size: 0.85rem;
  line-height: 1.5;
  resize: vertical;
  transition: border-color 0.2s;
}

textarea:focus {
  outline: none;
  border-color: var(--gold);
}

textarea::placeholder {
  color: rgba(245, 240, 232, 0.25);
}

.format-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.format-tab {
  padding: 0.4rem 1rem;
  border-radius: 6px;
  border: 1px solid rgba(212, 168, 83, 0.2);
  background: transparent;
  color: var(--cream-dim);
  font-size: 0.8rem;
  font-family: 'Space Grotesk', sans-serif;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.2s;
}

.format-tab.active {
  background: rgba(212, 168, 83, 0.15);
  border-color: var(--gold);
  color: var(--gold);
}

.format-tab:hover {
  border-color: var(--gold-dim);
  color: var(--cream);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  border: none;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-dim));
  color: var(--spade);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(212, 168, 83, 0.3);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  background: transparent;
  border: 1px solid rgba(212, 168, 83, 0.3);
  color: var(--gold);
}

.btn-secondary:hover {
  background: rgba(212, 168, 83, 0.1);
}

.btn-row {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-top: 1.5rem;
}

/* Hand display */
.hand-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.hand-card {
  background: rgba(26, 26, 46, 0.5);
  border: 1px solid rgba(212, 168, 83, 0.08);
  border-radius: 10px;
  padding: 1.25rem;
}

.hand-card.north { grid-column: 1 / -1; max-width: 50%; margin: 0 auto; }
.hand-card.south { grid-column: 1 / -1; max-width: 50%; margin: 0 auto; }

.hand-seat {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--gold-dim);
  margin-bottom: 0.5rem;
}

.hand-hcp {
  font-size: 0.75rem;
  color: var(--cream-dim);
  float: right;
}

.suit-line {
  font-family: 'DM Mono', 'SF Mono', monospace;
  font-size: 0.95rem;
  padding: 0.15rem 0;
  letter-spacing: 1px;
}

.suit-spade { color: var(--card-white); }
.suit-heart { color: var(--red-suit); }
.suit-diamond { color: var(--gold); }
.suit-club { color: var(--success); }

/* Auction display */
.auction-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.auction-table th {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--gold-dim);
  padding: 0.5rem 1rem;
  text-align: center;
  border-bottom: 1px solid rgba(212, 168, 83, 0.1);
}

.auction-table td {
  text-align: center;
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
  color: var(--cream);
  border-bottom: 1px solid rgba(212, 168, 83, 0.05);
}

.bid-issue {
  background: rgba(239, 68, 68, 0.1);
  border-radius: 4px;
  position: relative;
}

.bid-issue::after {
  content: '!';
  position: absolute;
  top: 2px;
  right: 4px;
  font-size: 0.65rem;
  color: var(--error);
  font-weight: 700;
}

/* Analysis section */
.issue-card {
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid rgba(239, 68, 68, 0.15);
  border-left: 3px solid var(--error);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.issue-card.minor {
  background: rgba(234, 179, 8, 0.06);
  border-color: rgba(234, 179, 8, 0.15);
  border-left-color: #eab308;
}

.issue-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.issue-seat {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  color: var(--card-white);
  font-size: 0.95rem;
}

.issue-severity {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-weight: 600;
}

.issue-severity.major {
  background: rgba(239, 68, 68, 0.2);
  color: var(--error);
}

.issue-severity.minor {
  background: rgba(234, 179, 8, 0.2);
  color: #eab308;
}

.issue-bids {
  font-size: 0.9rem;
  color: var(--cream-dim);
  margin-bottom: 0.35rem;
}

.issue-bids strong {
  color: var(--cream);
}

.issue-reason {
  font-size: 0.85rem;
  color: var(--cream-dim);
  line-height: 1.5;
}

/* Grade badge */
.grade-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  background: rgba(26, 26, 46, 0.6);
  border: 1px solid rgba(212, 168, 83, 0.1);
  margin-bottom: 1.5rem;
}

.grade-letter {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 700;
}

.grade-label {
  font-size: 0.9rem;
  color: var(--cream-dim);
}

.grade-stats {
  font-size: 0.75rem;
  color: var(--cream-dim);
  opacity: 0.7;
}

/* AI Review */
.ai-review {
  background: rgba(10, 46, 26, 0.3);
  border: 1px solid rgba(212, 168, 83, 0.1);
  border-radius: 12px;
  padding: 2rem;
  margin-top: 1.5rem;
}

.ai-review h2, .ai-review h3 {
  font-family: 'Space Grotesk', sans-serif;
  color: var(--card-white);
  margin: 1.25rem 0 0.5rem;
}

.ai-review h2 { font-size: 1.3rem; }
.ai-review h3 { font-size: 1.1rem; color: var(--gold); }

.ai-review p {
  color: var(--cream-dim);
  margin-bottom: 0.75rem;
  line-height: 1.7;
}

.ai-review ul, .ai-review ol {
  color: var(--cream-dim);
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
}

.ai-review li { margin-bottom: 0.35rem; line-height: 1.6; }

.ai-review strong { color: var(--cream); }

.ai-review blockquote {
  border-left: 2px solid var(--gold-dim);
  padding-left: 1rem;
  margin: 0.75rem 0;
  color: var(--cream-dim);
  font-style: italic;
}

/* Loading states */
.loading-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(212, 168, 83, 0.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--cream-dim);
  font-size: 0.9rem;
}

/* Sample hands */
.sample-hands {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.sample-btn {
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  border: 1px solid rgba(212, 168, 83, 0.15);
  background: rgba(26, 26, 46, 0.4);
  color: var(--cream-dim);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}

.sample-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(212, 168, 83, 0.08);
}

/* History list */
.history-list {
  list-style: none;
}

.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(212, 168, 83, 0.06);
  transition: background 0.2s;
}

.history-item:hover {
  background: rgba(212, 168, 83, 0.04);
}

.history-item a {
  color: var(--cream);
  text-decoration: none;
  flex: 1;
}

.history-item a:hover { color: var(--gold); }

.history-meta {
  font-size: 0.8rem;
  color: var(--cream-dim);
}

/* Responsive */
@media (max-width: 768px) {
  nav { padding: 0.75rem 1.25rem; }
  .page-container { padding: 5rem 1.25rem 2rem; }
  .hand-grid { grid-template-columns: 1fr; }
  .hand-card.north, .hand-card.south { max-width: 100%; }
  .btn-row { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
}

/* Footer */
.app-footer {
  padding: 2rem;
  text-align: center;
  border-top: 1px solid rgba(212, 168, 83, 0.06);
  margin-top: 3rem;
}

.app-footer p {
  font-size: 0.8rem;
  color: rgba(245, 240, 232, 0.25);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  background: var(--felt-light);
  border: 1px solid rgba(212, 168, 83, 0.2);
  color: var(--cream);
  font-size: 0.9rem;
  z-index: 200;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.error {
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.15);
}
