/* Solitaire Application Styles */

.solitaire-app {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background-color: #008080; /* Classic Windows 98 teal */
  font-family: 'MS Sans Serif', sans-serif;
  user-select: none;
}

/* Menu Bar */
.solitaire-menu-bar {
  display: flex;
  background-color: var(--win98-button-face);
  border-bottom: 1px solid var(--win98-button-shadow);
  padding: 2px 0;
}

.solitaire-menu-item {
  padding: 2px 10px;
  cursor: pointer;
}

.solitaire-menu-item:hover {
  background-color: var(--win98-button-highlight);
}

/* Game Area */
.solitaire-game-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 10px;
  overflow: hidden;
}

/* Top Row */
.solitaire-top-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
}

/* Stock and Waste Piles */
.solitaire-stock-waste {
  display: flex;
  gap: 15px;
}

/* Score and Timer */
.solitaire-score-timer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: var(--win98-button-face);
  border: 2px solid;
  border-color: var(--win98-button-shadow) var(--win98-button-highlight) var(--win98-button-highlight) var(--win98-button-shadow);
  padding: 5px 15px;
  font-weight: bold;
}

.solitaire-score, .solitaire-timer {
  margin: 3px 0;
}

/* Foundation Piles */
.solitaire-foundation {
  display: flex;
  gap: 15px;
}

/* Tableau Piles */
.solitaire-tableau {
  display: flex;
  justify-content: space-between;
  flex: 1;
  gap: 15px;
}

/* Card Styles */
.card {
  width: 79px;
  height: 123px;
  border-radius: 5px;
  position: relative;
  box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
  cursor: pointer;
}

.card-face-up {
  background-color: white;
  border: 1px solid #999;
}

.card-face-down {
  background-color: #0066cc;
  background-image: linear-gradient(45deg, #0055aa 25%, transparent 25%, transparent 75%, #0055aa 75%, #0055aa),
                    linear-gradient(45deg, #0055aa 25%, transparent 25%, transparent 75%, #0055aa 75%, #0055aa);
  background-size: 10px 10px;
  background-position: 0 0, 5px 5px;
  border: 1px solid #004499;
}

.card-face {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-corner {
  padding: 3px 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.card-corner-top {
  align-self: flex-start;
}

.card-corner-bottom {
  align-self: flex-end;
  transform: rotate(180deg);
}

.card-rank {
  font-size: 16px;
  font-weight: bold;
}

.card-suit {
  font-size: 16px;
}

.card-center {
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 1;
}

.card-suit-center {
  font-size: 40px;
}

.card-red {
  color: red;
}

.card-black {
  color: black;
}

.card-draggable {
  cursor: grab;
}

.card-draggable:active {
  cursor: grabbing;
}

.card-selectable:hover {
  box-shadow: 0 0 0 2px yellow;
}

/* Card Pile Styles */
.card-pile {
  width: 79px;
  height: 123px;
  position: relative;
}

.card-pile-placeholder {
  width: 100%;
  height: 100%;
  border: 2px dashed #aaa;
  border-radius: 5px;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.1);
}

/* Tableau Pile Styles */
.tableau-pile-cards {
  position: relative;
  width: 100%;
  height: 100%;
}

.tableau-card-wrapper {
  position: absolute;
  width: 79px;
  left: 0;
}

/* Foundation Pile Styles */
.foundation-pile-placeholder {
  width: 100%;
  height: 100%;
  border: 2px dashed #aaa;
  border-radius: 5px;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.1);
}

.foundation-suit-symbol {
  font-size: 40px;
  opacity: 0.5;
}

/* Stock Pile Styles */
.stock-pile {
  width: 79px;
  height: 123px;
  position: relative;
  cursor: pointer;
}

.stock-pile-placeholder {
  width: 100%;
  height: 100%;
  border: 2px dashed #aaa;
  border-radius: 5px;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.1);
}

.stock-recycle-symbol {
  font-size: 40px;
  opacity: 0.5;
}

.stock-count {
  position: absolute;
  bottom: 5px;
  right: 5px;
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  border-radius: 10px;
  padding: 2px 6px;
  font-size: 12px;
}

/* Waste Pile Styles */
.waste-pile-placeholder {
  width: 100%;
  height: 100%;
  border: 2px dashed #aaa;
  border-radius: 5px;
  background-color: rgba(255, 255, 255, 0.1);
}

/* Drag and Drop Styles */
.drag-over {
  box-shadow: 0 0 0 2px yellow;
}

.drag-valid {
  box-shadow: 0 0 0 2px lime;
}

.drag-invalid {
  box-shadow: 0 0 0 2px red;
}