/* Modern Emerald & Slate Dark Design Tokens for pokerhands.page */
:root {
  --bg-dark: #064e3b;
  --bg-canvas: #022c22;
  --bg-card: #065f46;
  --bg-card-hover: #047857;
  --border-color: rgba(52, 211, 153, 0.25);
  --border-hover: rgba(52, 211, 153, 0.5);
  
  --text-main: #f0fdf4;
  --text-muted: #a7f3d0;
  
  --accent-emerald: #10b981;
  --accent-gold: #f59e0b;
  --accent-cyan: #06b6d4;
  --accent-red: #ef4444;
  --accent-black: #0f172a;

  --card-bg-light: #ffffff;
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
  --radius-lg: 16px;
  --radius-md: 10px;
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-canvas);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Suit Color Styling with 1-pixel white outline */
.suit-red {
  color: #ef4444;
  font-weight: 700;
  text-shadow: 
    -1px -1px 0 #ffffff,
     1px -1px 0 #ffffff,
    -1px  1px 0 #ffffff,
     1px  1px 0 #ffffff;
}

.suit-black {
  color: #000000;
  font-weight: 700;
  text-shadow: 
    -1px -1px 0 #ffffff,
     1px -1px 0 #ffffff,
    -1px  1px 0 #ffffff,
     1px  1px 0 #ffffff;
}

header {
  background: rgba(6, 78, 59, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
}

.logo-group img {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.logo-group h1 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 0.5rem;
  align-items: center;
}

nav a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
}

.nav-link-multiline {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.2;
}

.nav-link-multiline .line-1 {
  display: block;
}

.nav-link-multiline .line-2 {
  display: block;
  text-align: center;
  width: 100%;
}

nav a:hover, nav a.active {
  color: #ffffff;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid var(--border-color);
}

.main-container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1.5rem;
  flex: 1;
  width: 100%;
}

.hero-section {
  text-align: center;
  margin-bottom: 2.5rem;
  padding: 2.5rem 1.5rem;
  background: linear-gradient(135deg, rgba(6, 95, 70, 0.6) 0%, rgba(4, 120, 87, 0.4) 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.hero-section h2 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, #ffffff 0%, #a7f3d0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-section p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 750px;
  margin: 0 auto;
}

.grid-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 1.75rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text-muted);
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-wrapper input[type="text"],
.input-wrapper textarea {
  padding-right: 2.5rem;
}

.btn-clear {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  line-height: 1;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 2;
}

.input-wrapper textarea + .btn-clear {
  top: 1rem;
  transform: none;
}

.btn-clear:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.15);
}

input[type="text"], textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(2, 44, 34, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s ease;
}

input[type="text"]:focus, textarea:focus {
  outline: none;
  border-color: var(--accent-emerald);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
}

.btn-primary {
  width: 100%;
  padding: 0.85rem 1.5rem;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.1s ease;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover {
  opacity: 0.95;
  transform: translateY(-1px);
}

.results-box {
  margin-top: 1.25rem;
  padding: 1.25rem;
  background: rgba(2, 44, 34, 0.85);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Strategy Badge Tables & Lists */
.strat-badge {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid var(--accent-emerald);
  border-radius: 6px;
  font-weight: 600;
  color: var(--accent-emerald);
}

footer {
  text-align: center;
  padding: 2rem 1.5rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  font-size: 0.875rem;
  background: var(--bg-canvas);
}

/* Responsiveness */
@media (max-width: 640px) {
  .header-container {
    flex-direction: column;
    align-items: flex-start;
  }
  .hero-section h2 {
    font-size: 1.75rem;
  }
  .grid-layout {
    grid-template-columns: 1fr;
  }
}
