* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  :root {
    --orange: #ff6f1f;
    --orange-soft: #ffb347;
    --red: #d93a2a;
    --text: #f5e9dc;
    --muted: #b9a99a;
    --card: rgba(25, 12, 18, 0.6);
    --border: rgba(255, 122, 46, 0.22);
  }
  
  html, body {
    height: 100%;
  }
  
  body {
    font-family: "Segoe UI", system-ui, Arial, sans-serif;
    color: var(--text);
    min-height: 100vh;
    padding: 28px 16px;
    overflow-x: hidden;
    /* sunset vibe for you :) */
    background:
      radial-gradient(circle at 72% 8%, #ff7a1a 0%, #a32416 32%, #2b0a15 68%, #0b0408 100%);
  }
  
  .wrap {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
  }
  
  button {
    font-family: inherit;
    cursor: pointer;
  }
  
  ul { list-style: none; }


  .stage {
    position: relative;
    height: 340px;
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(255,170,80,0.08), rgba(20,8,12,0.55));
  }
  
  .ground {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 42px;
    background: linear-gradient(180deg, #2b1410, #120608);
    border-top: 2px solid rgba(255, 122, 46, 0.35);
  }
  
  /* altin sari ucgen */
  .pivot {
    position: absolute;
    left: 50%;
    bottom: 42px;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 22px solid transparent;
    border-right: 22px solid transparent;
    border-bottom: 34px solid #ff9a3d;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
    z-index: 2;
  }
  
  /* plank rotates, objects inside rotate with it */
  .plank {
    position: absolute;
    left: 50%;
    bottom: 74px;
    width: 400px;
    height: 14px;
    margin-left: -200px;
    border-radius: 3px;
    border: 1px solid #2c120a;
    background: linear-gradient(90deg, #5a2a14 0%, #8a3e1c 50%, #5a2a14 100%);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45);
    transform-origin: center center;
    transition: transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    z-index: 3;
  }
  
  /* scale lines every 50px from the center */
  .scale {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.38;
    background-image: linear-gradient(90deg, rgba(255,255,255,0.25) 1px, transparent 1px);
    background-size: 50px 100%;
    background-position: center;
  }
  
  .obj {
    position: absolute;
    bottom: 14px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 12px;
    transform: translateX(-50%);
    box-shadow: 0 4px 8px rgba(0,0,0,0.45), inset 0 -4px 6px rgba(0,0,0,0.22);
    animation: drop 0.35s ease-out;
  }
  
  @keyframes drop {
    0%   { transform: translate(-50%, -180px); opacity: 0; }
    60%  { transform: translate(-50%, 8px); opacity: 1; }
    100% { transform: translate(-50%, 0); opacity: 1; }
  }



  .top-info {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
  }
  
  .card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    backdrop-filter: blur(6px);
  }
  
  .card .label {
    font-size: 11px;
    letter-spacing: 0.12em;
    color: var(--muted);
  }
  
  .card .value {
    font-size: 20px;
    font-weight: 700;
    color: var(--orange-soft);
  }
  
  .controls {
    display: flex;
    justify-content: center;
    gap: 12px;
  }
  
  .btn {
    border: none;
    padding: 10px 22px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    color: #1a0a0a;
    background: linear-gradient(180deg, #ff8a3a 0%, #e05a1e 100%);
    box-shadow: 0 4px 10px rgba(224, 90, 30, 0.35);
    transition: transform 0.15s ease;
  }
  
  .btn:hover  { transform: translateY(-1px); }
  .btn:active { transform: translateY(0); }
  
  .btn-ghost {
    background: transparent;
    color: var(--orange-soft);
    border: 1px solid var(--orange-soft);
    box-shadow: none;
  }
  
  .log-wrap {
    background: rgba(15, 6, 10, 0.55);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 14px;
    max-height: 160px;
    overflow-y: auto;
  }
  
  .log {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  
  .log li {
    font-size: 13px;
    padding: 6px 8px;
    border-left: 3px solid var(--orange);
    background: rgba(255, 122, 46, 0.06);
    border-radius: 4px;
  }
  
  @media (max-width: 640px) {
    .top-info { grid-template-columns: repeat(2, 1fr); }
    .plank    { width: 300px; margin-left: -150px; }
  }