/* =========================
   LAYOUT - PROFESSIONAL POLISH
========================= */

.container{
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Premium card-style sections with page load animation */
.section{
  background: var(--bg-surface);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 18px 22px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-md);
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.6s ease-out backwards;
}

/* Staggered animation for sections */
.section:nth-child(1) { animation-delay: 0.1s; }
.section:nth-child(2) { animation-delay: 0.2s; }
.section:nth-child(3) { animation-delay: 0.3s; }
.section:nth-child(4) { animation-delay: 0.4s; }
.section:nth-child(5) { animation-delay: 0.5s; }

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Subtle gradient overlay on sections */
.section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  pointer-events: none;
}

.section:hover{
  border-color: var(--border-medium);
  box-shadow: var(--shadow-lg);
}

/* Special emphasis for interactive sections */
.section:has(button):hover,
.section:has(input):hover {
  border-color: rgba(59, 130, 246, 0.2);
  box-shadow: 
    var(--shadow-lg),
    0 0 0 1px rgba(59, 130, 246, 0.1);
}

/* Section dividers */
.section::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.08),
    transparent
  );
}

.section:last-child::after {
  display: none;
}

.row{
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.label{
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
  display: block;
  background: linear-gradient(
    90deg,
    var(--text-secondary),
    var(--accent-light)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.value{
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1.125rem;
}

/* Enhanced street value */
.street-value {
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  display: inline-block;
}

.output{
  margin-top: 12px;
  line-height: 1.7;
  font-size: 1rem;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
}

.output > div {
  margin-bottom: 16px;
  animation: fadeInUp 0.4s ease-out backwards;
}

.output > div:nth-child(1) { animation-delay: 0.05s; }
.output > div:nth-child(2) { animation-delay: 0.1s; }
.output > div:nth-child(3) { animation-delay: 0.15s; }
.output > div:nth-child(4) { animation-delay: 0.2s; }
.output > div:nth-child(5) { animation-delay: 0.25s; }

.section-spacing{ 
  margin-top: 20px;
}

/* Hero container for centered content */
.hero-container {
  max-width: 1000px;
  margin: 0 auto 48px;
  text-align: center;
}

/* Horizontal rule styling */
hr {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: 24px 0;
  opacity: 0.5;
}

/* List styling improvements */
ul, ol {
  padding-left: 24px;
  color: var(--text-secondary);
}

li {
  margin-bottom: 8px;
  line-height: 1.6;
}

li strong {
  color: var(--text-primary);
}

/* Paragraph spacing */
p {
  margin-bottom: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
}

p:last-child {
  margin-bottom: 0;
}

/* Code/monospace elements */
code {
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Courier New', monospace;
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.875em;
  border: 1px solid var(--border-subtle);
}

/* Responsive improvements */
@media (max-width: 768px) {
  body {
    padding: 16px;
  }
  
  .section {
    padding: 20px;
    margin-bottom: 16px;
  }
  
  .hero-title {
    font-size: clamp(2rem, 8vw, 2.5rem);
    margin-bottom: 32px;
  }
}

/* FORCE SEO COLLAPSE FINAL */

.seo-section .seo-content{
  max-height: 0 !important;
  opacity: 0 !important;
  margin-top: 0 !important;
  overflow: hidden !important;
  transition: max-height 0.4s ease, opacity 0.3s ease, margin-top 0.3s ease;
}

.seo-section.expanded .seo-content{
  max-height: 2000px !important;
  opacity: 1 !important;
  margin-top: 12px !important;
}
/* =========================
   SEO COLLAPSE - BULLETPROOF
========================= */

.seo-section .seo-content {
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.seo-section.expanded .seo-content {
  display: block;
  opacity: 1;
}
/* =========================
   DESKTOP FINAL LAYOUT
========================= */
@media (min-width: 1200px){

  /* GRID */
  .calc-top-grid{
    display: grid;
    grid-template-columns: 0.85fr 1.35fr;
    gap: 24px;
    align-items: start;
  }

  .calc-input-row{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 10px 14px;
  }

  .calc-input-row .section{
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 14px 18px;
  }

  /* BOARD */
  .section.board{
    overflow: visible;
  }

  .section.board .row{
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 16px;
  }

  .section.board .card-slot{
    width: 78px;
    height: 112px;
    flex: 0 0 auto;
  }

  /* ACTION BUTTONS */
  .action-row{
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 14px;
  }

  .action-row .action-btn{
    height: 44px;
    padding: 0 18px;
    font-size: 0.9rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0;
  }

  /* INPUTS */
  .calc-input-row .label{
    font-size: 0.75rem;
    margin-bottom: 6px;
  }

  #opponents,
  #potSize,
  #betSize{
    height: 40px;
    padding: 0 12px;
    font-size: 0.9rem;
  }

  .collapsible-header{
    height: 40px;
    display: flex;
    align-items: center;
  }

  /* DISABLE TOOL HOVER LIFT */
  .section:hover{
    transform: none;
  }

  .section.board .card-slot:hover,
  .section.board .card-display:hover{
    transform: none;
  }

}
/* =========================
   DESKTOP FINAL CLEAN LAYOUT
========================= */
@media (min-width: 1200px){

  /* ---------- GRID ---------- */
  .calc-top-grid{
    display: grid;
    grid-template-columns: 0.85fr 1.35fr;
    gap: 24px;
    align-items: start;
  }

  .calc-input-row{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

  /* ---------- BOARD ---------- */
  .section.board{
    overflow: visible;
  }

  .section.board .row{
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 16px;
  }

  .section.board .card-slot{
    width: 78px;
    height: 112px;
    flex: 0 0 auto;
  }

  /* ---------- ACTION BUTTONS ---------- */
  .action-row{
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 14px;
  }

  .action-row .action-btn{
    height: 44px;
    padding: 0 18px;
    min-height: 44px;
    font-size: 0.9rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0;
  }

  /* ---------- INPUT AREA ---------- */
  .calc-input-row .section{
    padding: 14px 18px;
  }

  .calc-input-row .label{
    font-size: 0.75rem;
    margin-bottom: 6px;
  }

  #opponents,
  #potSize,
  #betSize{
    height: 40px;
    padding: 0 12px;
    font-size: 0.9rem;
  }

  .collapsible-header{
    padding: 0;
    height: 40px;
    display: flex;
    align-items: center;
  }

}
@media (min-width: 1200px){

  .calc-input-row{
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 10px 14px;
  }

  .calc-input-row .section{
    background: transparent;
    border: none;
    box-shadow: none;
  }

}
@media (min-width: 1200px){

  /* Disable hover lift for calculator UI */
  .calc-top-grid .section:hover,
  .calc-input-row .section:hover,
  .section.board:hover{
    transform: none;
  }

}
@media (min-width: 1200px){

  .section.board .card-slot:hover,
  .section.board .card-display:hover{
    transform: none;
  }

}
#visualPickerSection .card-slot:hover{
  transform: scale(1.05);
}
/* =========================
   RESULTS SECTION — TIGHT MODE
========================= */
@media (min-width: 1200px){

  /* Kill extra padding from analyzer.css */
  .section.output{
    padding: 16px 20px !important;
    margin-top: 12px !important;
  }

  /* Reduce spacing between internal rows */
  .section.output > div{
    margin-bottom: 8px !important;
  }

  /* Tighten equity bar */
  .equity-bar{
    margin: 10px 0 !important;
    height: 18px;
  }

  /* Slightly reduce win % size */
  .big-equity{
    font-size: 2.2rem !important;
    margin: 6px 0 !important;
  }

  /* Tighten text blocks */
  .section.output p,
  .section.output span{
    margin-bottom: 4px !important;
  }

  /* Compact action buttons */
  .section.output button{
    height: 38px !important;
    padding: 0 16px !important;
    margin-top: 8px !important;
  }

}
@media (min-width: 1200px){

  .results-grid{
    display:grid;
    gap:10px;
  }

  .results-top{
    display:flex;
    justify-content:space-between;
    align-items:center;
  }

  .results-meta{
    display:flex;
    gap:18px;
    align-items:center;
  }

  .results-note{
    color:#f59e0b;
    font-size:.9rem;
  }

  .results-bar-label{
    font-weight:600;
    font-size:.9rem;
  }

  .results-stats{
    display:grid;
    grid-template-columns:repeat(4, auto);
    gap:18px;
    font-size:.85rem;
    opacity:.9;
  }

  .results-draws{
    display:grid;
    grid-template-columns:repeat(4, auto);
    gap:16px;
    font-size:.85rem;
  }

  .results-footer{
    text-align:center;
    font-size:.85rem;
    opacity:.6;
  }

  .results-actions{
    display:flex;
    gap:12px;
    justify-content:center;
    margin-top:14px;
  }

  .results-actions button{
    height:36px;
    padding:0 18px;
    font-size:.85rem;
    border-radius:8px;
  }

  .big-equity{
    font-size:1.9rem;
    margin:0;
  }

  .equity-bar{
    height:14px;
    margin:6px 0;
  }
}