body {  
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
    background: #fafafa;
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
}

code {
  font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
    monospace;
}

/* Ensure html, body, and #root take up full height of the window. */
html, #root {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
}

/* GenericConverterCard.css */

.generic-converter-card {
  /* Ensure the card doesn't overflow */
  overflow-x: hidden !important;
  box-sizing: border-box !important;
  transition: width 0.3s ease, height 0.3s ease, min-height 0.3s ease, max-height 0.3s ease,
              border 0.3s ease, border-radius 0.3s ease, box-shadow 0.3s ease, 
              background-color 0.5s ease-out !important;
  border: 1px solid #ccc !important;
  border-radius: 4px !important;
}

/* Highlighted state for animation */
.generic-converter-card.highlighted {
  border-color: #2E7D32 !important; /* Darker green border */
  box-shadow: 0 0 12px rgba(46, 125, 50, 0.6) !important; /* More pronounced glow */
  background-color: #C8E6C9 !important; /* Initial darker green background */
  animation: highlightFade 1s ease-out forwards !important; /* Animation that fades out */
}

/* Special case for when the card is both highlighted and expanded */
.generic-converter-card.highlighted.is-primary-app {
  animation: highlightFadeExpanded 1s ease-out forwards !important;
}

/* Animation keyframes for the highlight fade effect (normal state) */
@keyframes highlightFade {
  0% {
    background-color: #C8E6C9; /* Start with darker green */
    border-color: #2E7D32;
    box-shadow: 0 0 12px rgba(46, 125, 50, 0.6);
  }
  100% {
    background-color: #fff; /* Fade to white */
    border-color: #ccc;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  }
}

/* Animation keyframes for the highlight fade effect (expanded state) */
@keyframes highlightFadeExpanded {
  0% {
    background-color: #C8E6C9; /* Start with darker green */
    border-color: #2E7D32;
    box-shadow: 0 0 15px rgba(46, 125, 50, 0.8);
  }
  100% {
    background-color: #fff; /* Fade to white */
    border-color: #4CAF50; /* Keep the expanded state border color */
    border-width: 2px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
  }
}

/* Allow vertical resizing when isPrimaryApp is true */
.generic-converter-card.is-primary-app {
  /* height: auto !important; */ /* REMOVED based on user feedback */
  min-height: min-content !important; /* Changed from 100% to min-content */
  max-height: none !important; /* Remove any max-height constraints */
  overflow: visible !important; /* Allow content to expand */
  border: 2px solid #4CAF50 !important; /* Thicker border with slight green tint */
  border-radius: 8px !important; /* Rounder corners */
  box-shadow: 0 3px 10px rgba(0,0,0,0.15) !important; /* Enhanced shadow */
}

.converter-card-content {
  /* Ensure content container doesn't overflow */
  overflow-x: hidden !important;
  overflow-y: auto !important;
  box-sizing: border-box !important;
  transition: height 0.3s ease, max-height 0.3s ease !important;
}

/* Adjust content container for primary app mode */
.is-primary-app .converter-card-content {
  height: auto !important;
  max-height: none !important;
  overflow-y: visible !important;
}

.converter-card-content-inner {
  /* Force content to fit within container */
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
  box-sizing: border-box !important;
}

/* Animation for the expand/collapse button */
button[data-tooltip-id="expand-tooltip"] {
  transition: background-color 0.2s ease, color 0.2s ease !important;
}

button[data-tooltip-id="expand-tooltip"]:hover {
  background-color: #c8e6c9 !important;
  color: #1b5e20 !important;
}

/* Animation for the favorite button */
button[data-tooltip-id="fav-tooltip"] {
  transition: background-color 0.2s ease !important;
}

button[data-tooltip-id="fav-tooltip"]:hover:not([style*="gold"]) {
  background-color: #f5e7b9 !important;
}

/* Title styling for long titles that need tooltips */
h2[data-tooltip-id="title-tooltip"] {
  font-size: 1rem !important; /* Force smaller font size */
  font-weight: normal !important; /* Reduce weight for better readability */
  position: relative !important;
}

/* Add a subtle indicator that there's a tooltip */
h2[data-tooltip-id="title-tooltip"]::after {
  content: "ℹ️";
  font-size: 0.7rem;
  position: absolute;
  top: 2px;
  right: -15px;
  opacity: 0.5; /* Make it even less visible */
}

/* Force all children to respect container width */
.converter-card-content-inner > * {
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow-x: hidden !important;
}

/* Handle specific elements that might cause overflow */
.converter-card-content-inner table,
.converter-card-content-inner pre,
.converter-card-content-inner code,
.converter-card-content-inner img {
  max-width: 100% !important;
  overflow-x: auto !important;
}

/* Ensure inputs don't overflow */
.converter-card-content-inner input,
.converter-card-content-inner textarea,
.converter-card-content-inner select {
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* Mobile hint container styling */
.mobile-hint-container {
  box-sizing: border-box !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  box-shadow: 0 -2px 5px rgba(0,0,0,0.05) !important;
  transition: max-height 0.3s ease, height 0.3s ease !important;
  max-height: 40px !important; /* Default unexpanded height */
  overflow: hidden !important;
}

/* Mobile hint text styling */
.mobile-hint-text {
  font-size: 0.8rem !important;
  margin: 0 !important;
  padding: 0 8px !important;
  white-space: normal !important; /* Allow text to wrap */
  position: relative !important;
  cursor: pointer !important;
}

/* Indicator for expandable hint */
.mobile-hint-text:after {
  content: "▼";
  position: absolute;
  right: 8px;
  bottom: 0;
  font-size: 8px;
  color: inherit;
  opacity: 0.7;
  transition: transform 0.3s ease;
}

/* Expanded hint container */
.mobile-hint-container.expanded {
  max-height: 200px !important; /* Allow more space when expanded */
  overflow-y: auto !important; /* Add scrolling if content is very long */
}

/* Rotate indicator when expanded */
.mobile-hint-container.expanded .mobile-hint-text:after {
  transform: rotate(180deg);
}

/* When displaying in mobile mode, ensure enough space at the bottom */
.mobile-converter-content {
  padding-bottom: 5px !important;
  box-sizing: border-box !important;
  color: #000 !important;
} 
.uplot, .uplot *, .uplot *::before, .uplot *::after {box-sizing: border-box;}.uplot {font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";line-height: 1.5;width: min-content;}.u-title {text-align: center;font-size: 18px;font-weight: bold;}.u-wrap {position: relative;-webkit-user-select: none;user-select: none;}.u-over, .u-under {position: absolute;}.u-under {overflow: hidden;}.uplot canvas {display: block;position: relative;width: 100%;height: 100%;}.u-axis {position: absolute;}.u-legend {font-size: 14px;margin: auto;text-align: center;}.u-inline {display: block;}.u-inline * {display: inline-block;}.u-inline tr {margin-right: 16px;}.u-legend th {font-weight: 600;}.u-legend th > * {vertical-align: middle;display: inline-block;}.u-legend .u-marker {width: 1em;height: 1em;margin-right: 4px;background-clip: padding-box !important;}.u-inline.u-live th::after {content: ":";vertical-align: middle;}.u-inline:not(.u-live) .u-value {display: none;}.u-series > * {padding: 4px;}.u-series th {cursor: pointer;}.u-legend .u-off > * {opacity: 0.3;}.u-select {background: rgba(0,0,0,0.07);position: absolute;pointer-events: none;}.u-cursor-x, .u-cursor-y {position: absolute;left: 0;top: 0;pointer-events: none;will-change: transform;}.u-hz .u-cursor-x, .u-vt .u-cursor-y {height: 100%;border-right: 1px dashed #607D8B;}.u-hz .u-cursor-y, .u-vt .u-cursor-x {width: 100%;border-bottom: 1px dashed #607D8B;}.u-cursor-pt {position: absolute;top: 0;left: 0;border-radius: 50%;border: 0 solid;pointer-events: none;will-change: transform;/*this has to be !important since we set inline "background" shorthand */background-clip: padding-box !important;}.u-axis.u-off, .u-select.u-off, .u-cursor-x.u-off, .u-cursor-y.u-off, .u-cursor-pt.u-off {display: none;}
.game-container {
  display: flex;
  flex-direction: column;
  height: 100%; /* Fill GenericConverterCard content area */
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #2c6b3c; /* Slightly darker green felt color */
  border-radius: 5px;
  padding: 8px;
  box-sizing: border-box;
  color: #fff;
  justify-content: space-between; /* Distribute space */
  min-height: 480px; /* Ensure minimum space */
  position: relative; /* Needed for absolute positioning of fireworks */
  overflow: hidden; /* Contain fireworks */
}

.hand-area {
  background-color: rgba(0, 0, 0, 0.15); /* Darker transparent background */
  border-radius: 4px;
  padding: 5px;
  margin-bottom: 8px;
  min-height: 85px; /* Ensure space for cards */
  text-align: center;
  border: 1px solid rgba(0,0,0,0.1);
}

.player-hands-container {
  display: flex;
  flex-direction: column; /* Stack hands vertically on small screens */
  gap: 5px;
}

.player-hand-split {
  border: 2px solid #ffeb3b; /* Highlight active split hand */
  padding: 3px;
  margin: -3px; /* Adjust margin to account for border */
  border-radius: 6px;
  background-color: rgba(255, 235, 59, 0.1);
}

.area-title {
  font-size: 0.8rem;
  font-weight: bold;
  margin-bottom: 4px;
  color: #eee;
  text-transform: uppercase;
}

.hand-status {
    font-size: 0.75rem;
    font-style: italic;
    color: #ffcc80; /* Light orange status */
    margin-left: 5px;
}

.info-area {
  padding: 5px 0;
  text-align: center;
  margin-bottom: 8px;
  display: flex; /* Use flex to control children */
  flex-direction: column; /* Stack message, money, button */
  align-items: center; /* Center items horizontally */
  gap: 5px; /* Add gap between elements */
}

/* New wrapper for message and button */
.message-button-wrapper {
    display: flex;
    flex-direction: row; /* Side-by-side */
    align-items: center; /* Align items vertically */
    justify-content: space-between; /* Push message left, button right */
    width: 100%; /* Take full width of info-area */
    gap: 10px; /* Add some space between message and button */
}

.message {
  font-size: 0.9rem;
  font-weight: bold;
  min-height: 2.5em; /* Reserve space for messages */
  color: #ffeb3b; /* Yellow message text */
  padding: 4px;
  background-color: rgba(0, 0, 0, 0.25);
  border-radius: 3px;
  margin-bottom: 5px;
  line-height: 1.3;
  width: auto; /* Let flexbox determine width */
  flex-grow: 1; /* Allow message to take up available space */
  text-align: left; /* Align message text left */
}

.money {
  font-size: 0.85rem;
  color: #eee;
}

.bet-info {
  font-size: 0.85rem;
  color: #eee;
  margin-top: 3px; /* Default margin for non-mobile */
}

/* Wrapper for money/bet, default is column (or just block elements) */
.money-bet-wrapper {
    display: flex;
    flex-direction: column; /* Default stack */
    align-items: center;
    gap: 2px; /* Small gap when stacked */
    width: 100%; /* Take full width */
}

.controls-area {
  display: flex;
  flex-direction: column; /* Stack control groups */
  justify-content: center;
  align-items: center;
  padding: 5px 0;
  min-height: 50px; /* Reduced min-height */
  gap: 4px; /* Reduced gap between button groups */
}

.betting-controls,
.action-controls {
  display: flex;
  flex-wrap: wrap; /* Allow buttons to wrap */
  justify-content: center;
  gap: 6px; /* Reduced gap between buttons within a group */
}

.bet-button,
.action-button {
  padding: 6px 10px;
  font-size: 0.8rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: background-color 0.2s, box-shadow 0.2s;
  min-width: 60px;
}

.bet-button {
  background-color: #ffc107; /* Amber color */
  color: #000;
}

.action-button {
  padding: 7px 12px; /* Slightly larger padding */
  font-size: 0.85rem;
  background-color: #4CAF50; /* Standard green */
  color: white;
  border: 1px solid #388E3C;
}

/* Hover States */
.bet-button:hover:not(:disabled) {
  background-color: #ffa000;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.25);
}

.action-button:hover:not(:disabled) {
  background-color: #388E3C;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.25);
}

/* Disabled States */
.bet-button:disabled,
.action-button:disabled {
  background-color: #bdbdbd;
  color: #757575;
  cursor: not-allowed;
  box-shadow: none;
  border-color: #9e9e9e;
}

/* Card Styles */
.card {
  display: inline-block;
  width: 45px;
  height: 65px;
  background-color: #fff;
  border: 1px solid #555;
  border-radius: 4px;
  padding: 3px;
  margin: 2px;
  position: relative;
  font-size: 10px;
  font-weight: bold;
  color: #000;
  box-shadow: 1px 1px 3px rgba(0,0,0,0.2);
  -webkit-user-select: none;
          user-select: none;
  overflow: hidden;
  text-align: center;
}

.card.red {
    color: #d32f2f;
}

.card-back {
  background-color: #6a89cc; /* Nice blue back */
  background-image: linear-gradient(45deg, #4a69bd 25%, transparent 25%, transparent 75%, #4a69bd 75%, #4a69bd), linear-gradient(45deg, #4a69bd 25%, transparent 25%, transparent 75%, #4a69bd 75%, #4a69bd);
  background-size: 10px 10px;
  background-position: 0 0, 5px 5px;
  border: 1px solid #3a5bad;
  color: transparent; /* Hide text if any */
}

.card .rank {
  position: absolute;
  top: 2px;
  left: 3px;
  font-size: 11px;
}

.card .suit {
  position: absolute;
  bottom: 2px;
  right: 3px;
  font-size: 11px;
}

.card .center-suit {
  font-size: 20px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.8;
}

/* --- Fireworks Animation --- */

.fireworks-container {
  position: absolute;
  /* Position container higher up */
  top: 30%; 
  left: 0;
  width: 100%;
  height: 50%; /* Cover the middle area */
  overflow: hidden;
  pointer-events: none;
  z-index: 10;
}

.particle {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  /* Start particles near the bottom of the *new* container position */
  top: 90%; 
  left: 50%;
  opacity: 0;
  --final-transform: translate(-50%, -80px); /* Default upward path, less distance */
  animation: firework-burst-simple 1.2s ease-out forwards;
}

/* Keyframe remains the same */
@keyframes firework-burst-simple {
  0% {
    opacity: 1;
    transform: translate(-50%, 0) scale(0.3); /* Start at bottom center of container */
  }
  100% {
    opacity: 0;
    transform: var(--final-transform) scale(1.5); /* Move to final position */
  }
}

/* Override final position (shorter vertical distance) and color */
.particle:nth-child(1) { background-color: #ffeb3b; --final-transform: translate(calc(-50% + 40px), -90px); animation-delay: 0.1s; }
.particle:nth-child(2) { background-color: #ffc107; --final-transform: translate(calc(-50% - 50px), -80px); animation-delay: 0s; }
.particle:nth-child(3) { background-color: #ffffff; --final-transform: translate(calc(-50% + 60px), -60px); animation-delay: 0.2s; }
.particle:nth-child(4) { background-color: #ffeb3b; --final-transform: translate(calc(-50% - 30px), -100px); animation-delay: 0.15s; }
.particle:nth-child(5) { background-color: #ff9800; --final-transform: translate(calc(-50% + 55px), -75px); animation-delay: 0.25s; }
.particle:nth-child(6) { background-color: #ffffff; --final-transform: translate(calc(-50% - 65px), -70px); animation-delay: 0.05s; }
.particle:nth-child(7) { background-color: #ffc107; --final-transform: translate(calc(-50% + 20px), -110px); animation-delay: 0.3s; }
.particle:nth-child(8) { background-color: #ffeb3b; --final-transform: translate(calc(-50% - 80px), -50px); animation-delay: 0.1s; }
.particle:nth-child(9) { background-color: #ffffff; --final-transform: translate(calc(-50% + 70px), -95px); animation-delay: 0.2s; }
.particle:nth-child(10){ background-color: #ff9800; --final-transform: translate(calc(-50% - 40px), -120px); animation-delay: 0.15s; }
.particle:nth-child(11){ background-color: #ffeb3b; --final-transform: translate(calc(-50% + 80px), -40px); animation-delay: 0.05s; }
.particle:nth-child(12){ background-color: #ffffff; --final-transform: translate(calc(-50% - 70px), -100px); animation-delay: 0.25s; }
.particle:nth-child(13){ background-color: #ffc107; --final-transform: translate(calc(-50% + 0px), -130px); animation-delay: 0s; }
.particle:nth-child(14){ background-color: #ffeb3b; --final-transform: translate(calc(-50% + 90px), -80px); animation-delay: 0.1s; }
.particle:nth-child(15){ background-color: #ff9800; --final-transform: translate(calc(-50% - 90px), -95px); animation-delay: 0.2s; }

.game-over-controls {
    margin-top: 0; /* Remove top margin, flex handles spacing */
    flex-shrink: 0; /* Prevent button from shrinking */
}

/* --- Media Query for Mobile Layout --- */
@media (max-width: 600px) {
    .money-bet-wrapper {
        flex-direction: row; /* Side-by-side on mobile */
        justify-content: space-around; /* Space them out */
        gap: 15px; /* More gap when side-by-side */
    }

    .bet-info {
        margin-top: 0; /* Remove top margin when side-by-side */
    }
} 
/* Chess Game Container */
.chess-game-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: calc(100vw - 10px); /* Calculate width based on viewport minus padding */
  max-width: 600px; /* Still respect max-width */
  min-width: 0; /* Allow container to shrink fully */
  margin: 0 auto; /* Center if GenericCard is wider */
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f0f0f0; /* Light background */
  padding: 5px;
  box-sizing: border-box;
  position: relative; /* For highlighting overlays */
  overflow-x: hidden; /* Hide horizontal overflow */
  container-type: inline-size; /* Enable container queries for width */
}

/* Status Area */
.chess-status {
  padding: 4px 6px;
  margin-bottom: 5px;
  background-color: #e0e0e0;
  border-radius: 3px;
  text-align: center;
  font-size: 0.8rem;
  font-weight: bold;
  min-height: 1.5em; 
  line-height: 1.4;
  color: #333;
}

/* Game outcome styles */
.chess-status.game-over {
  background-color: #2c3e50;
  color: #ecf0f1;
  font-size: 1rem;
  padding: 8px 12px;
  border-radius: 5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  animation: pulse 2s infinite;
}

.chess-status.game-over.checkmate {
  background-color: #c0392b;
}

.chess-status.game-over.stalemate {
  background: linear-gradient(135deg, #34495e, #7f8c8d);
  border: 2px solid #95a5a6;
  animation: pulse 2s infinite, gradientShift 3s infinite;
}

.chess-status.game-over.draw {
  background-color: #2980b9;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
  }
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Chessboard */
.chessboard {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  width: 100%; /* Fill container's content width */
  max-width: 560px; /* Explicit maximum width (70px * 8) */
  aspect-ratio: 1 / 1; /* Force square aspect ratio */
  border: 2px solid #5c3d2e; /* Dark wood border */
  margin: 0 auto 5px auto; /* Center the board */
  box-sizing: border-box;
  position: relative; /* Add position relative for proper absolute positioning of animated pieces */
}

.square {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative; /* For highlighting overlays */
  box-sizing: border-box;
  /* Set a fixed font size suitable for the max tile size */
  font-size: 43px; /* Fixed size for pieces (reduced by ~10%) */
  line-height: 1;
  cursor: pointer;
  -webkit-user-select: none;
          user-select: none;
  /* Ensure squares maintain aspect ratio */
  aspect-ratio: 1 / 1;
  /* Ensure minimum size */
  min-height: 30px; /* Reduced from 35px */
  min-width: 30px; /* Reduced from 35px */
  /* Explicit maximum size */
  max-width: 70px;
  max-height: 70px;
}

/* Alternating square colors */
.square.light {
  background-color: #f0d9b5; /* Light wood */
}
.square.dark {
  background-color: #b58863; /* Dark wood */
}

/* Piece styles (Unicode) */
.piece {
  /* Centered by flex on .square */
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
}

/* Highlighting styles */
.square.selected::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border: 3px solid rgba(255, 255, 0, 0.7); /* Yellow highlight */
  box-sizing: border-box;
  pointer-events: none;
}

.square.valid-move::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30%;
  height: 30%;
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.square.last-move::before {
    content: '';
    position: absolute;
    top: 2px; left: 2px; right: 2px; bottom: 2px;
    background-color: rgba(170, 215, 81, 0.4); /* Light green overlay */
    pointer-events: none;
}

.square.in-check::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(255, 0, 0, 0.3); /* Red overlay for check */
    pointer-events: none;
}

.square.capture-target::after {
  content: '';
  position: absolute;
  top: 10%;
  left: 10%;
  width: 80%;
  height: 80%;
  border: 3px solid #c0392b; /* Red border for capture */
  border-radius: 50%;
  pointer-events: none;
  box-sizing: border-box;
}

/* Controls Area */
.chess-controls {
  display: flex;
  justify-content: space-between; /* Space out buttons/select */
  align-items: center;
  padding: 5px 0;
  gap: 8px;
}

.chess-controls label {
    font-size: 0.75rem;
    margin-right: 4px;
}

.chess-controls select,
.chess-controls button {
  padding: 5px 8px;
  font-size: 0.8rem;
  border-radius: 3px;
  border: 1px solid #ccc;
  cursor: pointer;
}

.chess-controls button {
    background-color: #e0e0e0;
}
.chess-controls button:hover {
    background-color: #d5d5d5;
}

/* Pawn Promotion */
.promotion-choice {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 20;
}

.promotion-choice button {
    font-size: 2rem; /* Large piece symbols */
    background: #fff;
    border: 1px solid #555;
    border-radius: 4px;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
}

/* Loading/Thinking Indicator */
.thinking-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(255, 255, 255, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.9rem;
    font-weight: bold;
    color: #000;
    z-index: 15;
}

@keyframes movePiece {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(var(--move-x), var(--move-y));
    }
}

.animating-piece {
    pointer-events: none;
    z-index: 100; /* Ensure animated piece appears above other elements */
} 
/* Mobile overrides for GenericConverterCard */

/* Disable all resize handles in mobile view */
.mobile-app-view * {
    resize: none !important;
}

.mobile-app-view textarea {
    resize: none !important;
}

/* Ensure converter card takes full width and height - Keep it absolutely positioned */
.mobile-app-view .generic-converter-card {
    position: absolute !important;
    top: 40px !important; /* Below back button */
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    height: calc(100% - 40px) !important; /* Fill remaining space */
    margin: 0 !important; 
    padding: 0 !important;
    box-sizing: border-box !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: hidden !important; /* Card itself clips overflow, content scrolls */
    z-index: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    background-color: white !important; /* Ensure background */
}

/* Card Header (Title Bar) - Use Flexbox, remove absolute positioning */
.mobile-app-view .generic-converter-card > div:first-child {
    height: 40px !important; /* Fixed height */
    width: 100% !important; 
    padding: 0 10px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-shrink: 0 !important; /* Prevent shrinking */
    border-bottom: 1px solid #eee !important; /* Keep separator */
}

/* Ensure the converter title adapts within the flex header */
.mobile-app-view .generic-converter-card h2 {
    display: block !important;
    visibility: visible !important;
    margin: 0 !important;
    font-size: 16px !important;
    flex-grow: 1 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    padding: 0 5px !important;
    color: #333 !important; /* Make sure text color is visible */
}

/* Header controls container within the header - Use Flexbox */
.mobile-app-view .generic-converter-card > div:first-child > div {
    display: flex !important;
    align-items: center !important;
    flex-shrink: 0 !important; /* Prevent shrinking */
}

/* Main Content Area - Use Flexbox, remove absolute positioning, make scrollable */
.mobile-app-view .generic-converter-card .converter-card-content {
    flex-grow: 1 !important; /* Takes remaining vertical space */
    width: 100% !important;
    margin: 0 !important;
    padding: 2px !important; /* Add padding */
    padding-bottom: 70px !important; /* Add substantial bottom padding for scrolling */
    box-sizing: border-box !important;
    overflow-y: auto !important; /* Primary scroll area */
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
}

/* Ensure inner content wrapper fills scrollable area */
.mobile-app-view .generic-converter-card .converter-card-content-inner {
    width: 100% !important;
    min-height: 100% !important; /* Allow it to determine scroll height */
    box-sizing: border-box !important;
}

/* Ensure the mobile content wrapper is displayed correctly and allows interaction */
.mobile-app-view .mobile-converter-content {
    display: block !important; /* Ensure it's displayed */
    width: 100% !important;
    padding: 5px !important;
    background-color: transparent !important;
    box-sizing: border-box !important;
    position: relative !important; /* Establish stacking context */
    z-index: 5 !important; /* Below textareas but above card background */
    pointer-events: auto !important; /* Ensure container is interactive */
}

/* CRITICAL: Force visibility AND INTERACTION for textareas within the mobile wrapper - Less aggressive */
.mobile-app-view .mobile-converter-content textarea,
.mobile-app-view .mobile-converter-content input[type="text"],
.mobile-app-view .mobile-converter-content input[type="number"],
.mobile-app-view .mobile-converter-content input[type="password"],
.mobile-app-view .mobile-converter-content select {
    display: block !important;
    visibility: visible !important;
    position: relative !important; /* Make z-index effective */
    opacity: 1 !important;
    z-index: 10 !important; /* Ensure form elements are on top */
    pointer-events: auto !important; /* Explicitly allow clicks/focus */
    width: 100% !important;
    margin: 8px 0 !important;
    padding: 10px !important;
    border: 1px solid #ccc !important;
    border-radius: 4px !important;
    background-color: white !important;
    box-sizing: border-box !important;
}

/* Specific overrides for buttons within the wrapper - Minimal styling, allow component styles */
.mobile-app-view .mobile-converter-content button {
    display: inline-block !important; /* Or block if they should stack, inline-block allows side-by-side */
    flex: 1 1 !important; /* Allow buttons in a row to share space if parent is flex */
    padding: 8px 12px !important; /* Adjust padding as needed */
    margin: 8px 5px !important; /* Give buttons some vertical margin and horizontal for spacing */
    min-height: 36px !important;
    font-weight: 500 !important;
    text-align: center !important;
    width: auto !important; /* Allow natural width or flex sizing */
    border: 1px solid transparent !important; /* Default border (transparent), component can override */
    border-radius: 4px !important;
    cursor: pointer !important;
    /* Component styles should define background-color and color */
    position: relative !important; /* Ensure stacking context if needed */
    z-index: 10 !important; /* Keep on top */
    pointer-events: auto !important; /* Ensure clickable */
    box-sizing: border-box !important; /* Consistent box model */
}

/* Add back resize: none and min-height only for generic textareas if needed */
.mobile-app-view .mobile-converter-content textarea {
    resize: none !important; /* Keep this specific to textareas if generally desired */
    min-height: 90px !important; /* Ensure a minimum usable height */
    /* Inherit z-index: 10 from the rule above */
}

/* Style for typical button rows (like in Base64/CSV converters) */
.mobile-app-view .mobile-converter-content div[style*="controlsRow"],
.mobile-app-view .mobile-converter-content div[style*="justifyContent: space-between"] {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    margin: 8px 0 !important;
}

/* Generic rule for form elements width - KEEP */
.mobile-app-view .generic-converter-card input,
.mobile-app-view .generic-converter-card select,
.mobile-app-view .generic-converter-card textarea {
    width: 100% !important;
    box-sizing: border-box !important;
    margin-top: 8px !important; 
    margin-bottom: 8px !important;
}

/* Ensure all resize handles are removed */
.mobile-app-view .generic-converter-card > div[style*="cursor: ew-resize"],
.mobile-app-view .generic-converter-card > div[style*="position: absolute"][style*="right: 0"][style*="width: 8px"],
.mobile-app-view [style*="cursor: ew-resize"],
.mobile-app-view [style*="resize"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    pointer-events: none !important;
}

/* Ensure container fills screen */
.mobile-app-view .single-converter-container {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    overflow: hidden !important;
}

/* Override any inline style attributes with an aggressive selector - ONLY in mobile view */
.mobile-app-view [style*="width"] .generic-converter-card[style*="width"],
.mobile-app-view .generic-converter-card[style*="width"],
.mobile-app-view .single-converter-container .generic-converter-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
}

/* Force all inline styles to be overridden - ONLY in mobile view */
.mobile-app-view .generic-converter-card[style] {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
}

/* Mobile hint container styling */
.mobile-hint-container {
  box-sizing: border-box !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  box-shadow: 0 -2px 5px rgba(0,0,0,0.05) !important;
  transition: max-height 0.3s ease !important;
  max-height: 60px !important; /* Default height that can expand */
  overflow: hidden !important;
}

/* Mobile hint text styling */
.mobile-hint-text {
  font-size: 0.8rem !important;
  margin: 0 !important;
  padding: 0 8px !important;
  /* Removed forced nowrap and ellipsis styles */
  position: relative !important;
  cursor: pointer !important;
}

/* Indicator for expandable hint */
.mobile-hint-text:after {
  content: "▼";
  position: absolute;
  right: 8px;
  bottom: 0;
  font-size: 8px;
  color: #888;
  transition: transform 0.3s ease;
}

/* Expanded hint container */
.mobile-hint-container.expanded {
  max-height: 200px !important; /* Allow more space when expanded */
  overflow-y: auto !important; /* Add scrolling if content is very long */
}

/* Rotate indicator when expanded */
.mobile-hint-container.expanded .mobile-hint-text:after {
  transform: rotate(180deg);
}

/* When displaying in mobile mode, ensure enough space at the bottom */
.mobile-converter-content {
  padding-bottom: 5px !important;
  box-sizing: border-box !important;
}

/* Desktop override to ensure cards have their normal width */
body:not(.mobile-app-view) .generic-converter-card {
    width: 350px !important;
    position: relative !important;
}

/* Ensure flex layout works correctly in the parent element that contains multiple cards */
body:not(.mobile-app-view) .converter-grid,
body:not(.mobile-app-view) .favorites-section,
body:not(.mobile-app-view) .converter-list-container {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 20px !important;
}

/* BASE64CARD SPECIFIC FIXES - REMOVING these */

/* REMOVE: Make sure textareas are visible and properly formatted in Base64Card */
/* 
.mobile-app-view .base64-textarea,
.mobile-app-view textarea.base64-input-textarea,
.mobile-app-view textarea.base64-output-textarea {
    ...
}
*/

/* REMOVE: Style buttons in Base64Card */
/*
.mobile-app-view .base64-button,
.mobile-app-view .base64-encode-button,
.mobile-app-view .base64-decode-button {
    ...
}
*/

/* REMOVE: Style button row in Base64Card */
/*
.mobile-app-view .base64-controls-row {
    ...
}
*/

/* Fixed viewport hint bar rules */
.mobile-app-view .mobile-hint-container {
  position: fixed !important;
  bottom: 5px !important;
  left: 5px !important;
  right: 5px !important;
  background-color: #007991 !important; /* Theme color background */
  color: white !important;
  padding: 6px !important; /* Reduced from 10px to 6px */
  margin: 0 !important;
  width: calc(100% - 10px) !important;
  min-height: 30px !important; /* Reduced from 40px to 30px */
  z-index: 1000 !important; /* Very high z-index to ensure visibility */
  box-shadow: 0 -2px 5px rgba(0,0,0,0.2) !important;
  text-align: center !important;
  border-radius: 6px !important;
  /* Keep transition for expanded state */
  transition: max-height 0.3s ease, height 0.3s ease !important;
  /* Starting height */
  max-height: 40px !important;
}

/* Expanded state for mobile hint container */
.mobile-app-view .mobile-hint-container.expanded {
  max-height: 200px !important;
  overflow-y: auto !important;
}

.mobile-app-view .mobile-hint-text {
  color: white !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  margin: 0 !important;
  padding: 0 !important;
  text-shadow: 0 1px 1px rgba(0,0,0,0.2) !important;
  /* Allow text to wrap */
  white-space: normal !important;
  cursor: pointer !important;
  position: relative !important;
}

/* Indicator for mobile hint text */
.mobile-app-view .mobile-hint-text:after {
  content: "▼";
  position: absolute;
  right: 8px;
  bottom: 2px;
  font-size: 10px;
  color: white;
  opacity: 0.8;
  transition: transform 0.3s ease;
}

/* Rotate indicator when expanded */
.mobile-app-view .mobile-hint-container.expanded .mobile-hint-text:after {
  transform: rotate(180deg);
} 
.social-share-container {
  background: white;
  border-radius: 6px;
  padding: 6px;
  padding-left: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin: 0;
  margin-left: 12px;
  width: fit-content;
}

.social-share-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #333;
  margin: 0 0 6px 0;
  text-align: center;
}

.social-share-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 4px;
  gap: 4px;
  justify-items: center;
}

.social-share-button {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
  background: transparent;
}

.social-share-button svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
}

.social-share-button:hover svg {
  transform: scale(1.2);
}

.social-share-button:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(66, 153, 225, 0.5);
}

/* Size variants */
.social-share-small .social-share-button {
  width: 24px;
  height: 24px;
}

.social-share-small .social-share-button svg {
  width: 16px;
  height: 16px;
}

.social-share-large .social-share-button {
  width: 36px;
  height: 36px;
}

.social-share-large .social-share-button svg {
  width: 24px;
  height: 24px;
}

/* Color variants */
.social-share-button.twitter {
  color: #1DA1F2;
}

.social-share-button.facebook {
  color: #4267B2;
}

.social-share-button.linkedin {
  color: #0077B5;
}

.social-share-button.whatsapp {
  color: #25D366;
}

.social-share-button.reddit {
  color: #FF4500;
}

.social-share-button.email {
  color: #EA4335;
}

/* Hover effects */
.social-share-button:hover {
  transform: translateY(-2px);
}

.social-share-button.twitter:hover {
  background: rgba(29, 161, 242, 0.1);
}

.social-share-button.facebook:hover {
  background: rgba(66, 103, 178, 0.1);
}

.social-share-button.linkedin:hover {
  background: rgba(0, 119, 181, 0.1);
}

.social-share-button.whatsapp:hover {
  background: rgba(37, 211, 102, 0.1);
}

.social-share-button.reddit:hover {
  background: rgba(255, 69, 0, 0.1);
}

.social-share-button.email:hover {
  background: rgba(234, 67, 53, 0.1);
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .social-share-container {
    padding: 4px;
  }
  
  .social-share-title {
    font-size: 0.8rem;
    margin-bottom: 4px;
  }
  
  .social-share-buttons {
    gap: 4px;
  }
} 
