/* fish tank: ascii aquarium on the front page. everything is scoped to #fishtank */
#fishtank {
    position: relative;
    margin: 0 0 28px;
    font-family: monospace;
}

#fishtank .ft-tank {
    position: relative;
    height: 200px;
    border: 1px solid #26333d;
    overflow: hidden;
    background: #0c1016;
    user-select: none;
    -webkit-user-select: none;
}

/* scenery: all text */
#fishtank .ft-surface {
    position: absolute;
    top: 2px;
    left: 0;
    color: #3f5566;
    white-space: nowrap;
    animation: ft-drift 6s linear infinite;
}
#fishtank .ft-meters {
    position: absolute;
    top: 3px;
    right: 6px;
    padding: 0 4px;
    background: #0c1016; /* masks the surface tildes behind it */
    color: #4c5c68;
    font-size: 11px;
    pointer-events: none;
}
#fishtank .ft-gravel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    color: #55483a;
    letter-spacing: 1px;
    line-height: 1.1;
    text-align: center;
    white-space: nowrap;
}
#fishtank .ft-weed {
    position: absolute;
    bottom: 1.15em;
    color: #5a7a5a;
    line-height: 1;
    white-space: pre;
    transform-origin: bottom;
    animation: ft-sway 4s ease-in-out infinite alternate;
}
#fishtank .w1 { left: 6%; animation-duration: 4.6s; }
#fishtank .w2 { left: 12%; animation-delay: -1.7s; }
#fishtank .w3 { right: 8%; animation-delay: -2.5s; }
#fishtank .ft-bubble {
    position: absolute;
    bottom: 14px;
    color: #6d93a6;
    animation: ft-rise 6.5s linear infinite;
}
#fishtank .b1 { left: 72%; animation-delay: -.5s; }
#fishtank .b2 { left: 74.5%; animation-duration: 8.5s; animation-delay: -4s; }
#fishtank .b3 { left: 69.5%; animation-duration: 5s; animation-delay: -2s; }

/* the fish, its food, its little speech */
#fishtank .ft-fish {
    position: absolute;
    left: 0;
    top: 0;
    font-size: 22px;
    line-height: 1.2;
    white-space: pre;
    cursor: pointer;
    will-change: transform;
}
#fishtank .ft-face,
#fishtank .ft-body { display: inline-block; }
#fishtank .ft-pellet {
    position: absolute;
    left: 0;
    top: 0;
    margin: -.5em 0 0 -.3em;
    color: #c9a46a;
    font-size: 14px;
    line-height: 1;
    pointer-events: none;
}
#fishtank .ft-rest { animation: ft-fade 9s linear forwards; }
#fishtank .ft-say {
    position: absolute;
    color: #ddd;
    font-size: 12px;
    white-space: nowrap;
    pointer-events: none;
    animation: ft-say 1.8s ease-out forwards;
}

/* controls */
#fishtank .ft-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}
#fishtank button {
    font: 14px monospace;
    color: #aaa;
    background: #1a1a1a;
    border: 1px solid #333;
    padding: 5px 11px;
    cursor: pointer;
}
#fishtank button:hover { border-color: #55aaff; color: #ddd; }
#fishtank .ft-status {
    margin-left: auto;
    min-width: 0;
    font-size: 13px;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* little windows: float over the tank, never push the page */
#fishtank .ft-win {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: min(400px, calc(100% - 20px));
    box-sizing: border-box;
    z-index: 10;
    padding: 10px 12px;
    background: #16181d;
    border: 1px solid #333;
    box-shadow: 0 10px 30px #000;
    font-size: 13px;
}
#fishtank .ft-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    color: #ddd;
}
#fishtank .ft-x { padding: 1px 7px; }
#fishtank .ft-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 6px 0;
}
#fishtank .ft-label { width: 7ch; color: #777; }
#fishtank input {
    flex: 1;
    min-width: 0;
    font: 13px monospace;
    color: #ccc;
    background: #111;
    border: 1px solid #333;
    padding: 4px 6px;
}
#fishtank .ft-swatch {
    min-width: 22px;
    height: 22px;
    padding: 0 4px;
    font-size: 11px;
    color: #111;
}
#fishtank .ft-swatch.locked { opacity: .7; }
#fishtank .ft-shape.locked { opacity: .45; }
#fishtank .ft-swatch.on,
#fishtank .ft-shape.on { border-color: #55aaff; color: #ddd; }
#fishtank .ft-shape { padding: 3px 7px; font-size: 13px; white-space: pre; }
#fishtank .ft-hint { color: #666; }
#fishtank .ft-note { min-height: 1.4em; color: #cc6677; }
#fishtank .ft-note.ok { color: #7aaa7a; }

@keyframes ft-drift { to { transform: translateX(-4ch); } }
@keyframes ft-sway { from { transform: rotate(-6deg); } to { transform: rotate(6deg); } }
@keyframes ft-rise {
    from { transform: translateY(0); opacity: .8; }
    70% { opacity: .5; }
    to { transform: translateY(-160px); opacity: 0; }
}
@keyframes ft-fade { to { opacity: 0; } }
@keyframes ft-say {
    from { transform: translate(-50%, -100%); opacity: 1; }
    to { transform: translate(-50%, -260%); opacity: 0; }
}
