/* ---------- Layout ---------- */
html,body{
  margin:0; padding:0; height:100%; overflow:hidden;
  font-family:Arial,Helvetica,sans-serif; font-size:14px;
  background:#3c7aaf; /* fallback */
}
#desktop{
  position:absolute; top:0; left:0; right:0; bottom:0;
  background:url('https://images.unsplash.com/photo-1542281286-9e0a8c8e2c3b?auto=format&fit=crop&w=1200&q=80') center/cover;
  overflow:hidden;
}
#taskbar{
  position:absolute; left:0; right:0; bottom:0;
  height:40px; background:#1e1e1e; display:flex; align-items:center;
  padding:0 10px; box-sizing:border-box;
}
#start-btn{
  width:60px; height:30px; background:#2b5797; color:#fff;
  border:none; cursor:pointer; margin-right:5px;
}
#clock{
  margin-left:auto; color:#ddd; font-family:monospace;
}
#taskbar-buttons{
  display:flex; gap:3px; overflow-x:auto; flex:1;
}
#taskbar-buttons button{
  background:#2b5797; color:#fff; border:none;
  padding:0 8px; height:26px; cursor:pointer;
}
#start-menu{
  position:absolute; bottom:40px; left:10px; width:200px;
  background:#fff; border:1px solid #444; box-shadow:2px 2px 10px rgba(0,0,0,.3);
  display:none; z-index:2000;
}
#start-menu .app{
  padding:8px 12px; cursor:pointer;
}
#start-menu .app:hover{ background:#e0e0e0; }

/* ---------- Icons ---------- */
.icon{
  width:70px; text-align:center; color:#fff; cursor:pointer;
  user-select:none; margin:10px; float:left;
}
.icon img{ width:48px; height:48px; }
.icon .label{ font-size:12px; margin-top:4px; }

/* ---------- Windows ---------- */
.window{
  position:absolute; width:400px; height:300px;
  background:#fff; border:1px solid #444; box-shadow:2px 2px 10px rgba(0,0,0,.3);
  z-index:1000;
  box-sizing: border-box;
  overflow: hidden;
  resize: none;
}
.resize-handle {
  position: absolute;
  width: 16px;
  height: 16px;
  right: 0;
  bottom: 0;
  cursor: nwse-resize;
  background: rgba(0,0,0,0.05);
  z-index: 1001;
  border-bottom-right-radius: 4px;
}
.window .titlebar{
  background:#2b5797; color:#fff; height:30px; line-height:30px;
  padding:0 8px; cursor:move; display:flex; justify-content:space-between; align-items:center;
}
.window .titlebar .buttons{ display:flex; gap:4px; }
.window .titlebar button{
  width:20px; height:20px; background:#444; color:#fff; border:none; cursor:pointer;
}
.window .titlebar button:hover{ background:#666; }
.window .content-wrapper {
  position: absolute;
  top: 30px;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  overflow: hidden;
}
.window .content {
  padding: 10px;
  height: 100%;
  overflow: auto;
  box-sizing: border-box;
}
.window .resize-handle {
  position: absolute;
  width: 16px;
  height: 16px;
  right: 0;
  bottom: 0;
  cursor: nwse-resize;
  background: rgba(0,0,0,0.05);
  z-index: 1001;
  border-bottom-right-radius: 4px;
}

/* ---------- Hearts Card Rects ---------- */
.hearts-hand-rects {
  height: 120px;
  min-width: 400px;
  position: relative;
  display: flex;
  align-items: flex-end;
}
.hearts-card-rect {
  position: absolute;
  width: 64px;
  height: 96px;
  background: #fff;
  border: 2px solid #444;
  border-radius: 8px;
  box-shadow: 1px 2px 6px #0002;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  user-select: none;
  overflow: hidden;
}
.hearts-card-rect .hearts-card-value {
  position: absolute;
  top: 4px;
  left: 6px;
  font-size: 18px;
  font-weight: bold;
  color: #222;
}
.hearts-card-rect.selected {
  transform: translateY(-24px);
  box-shadow: 2px 6px 16px #0004;
  border-color: #d4a017;
  background: #ffe066;
}
.hearts-card-rect.playable {
  border-color: #2a9d8f;
  box-shadow: 0 0 8px #2a9d8f44;
}
.hearts-card-rect.ai {
  background: repeating-linear-gradient(135deg, #bbb 0 8px, #eee 8px 16px);
  border: 2px solid #888;
}
.hearts-card-rect.ai .hearts-card-value {
  display: none;
}

/* ---------- Utility ---------- */
.hidden{ display:none !important; }
