/* the kitty's page — sq3o.com aesthetic, kitty pink personality.
   dark bg, scanlines, noise, Mondwest-Bold, text glow, soft pink accents. */

@font-face { font-family: 'Mondwest'; src: url('/fonts/Mondwest-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background: #000;
    color: #cfc7c0;
    font-family: 'Mondwest', monospace;
    font-size: 1.1em;
    letter-spacing: .08em;
    line-height: 1.65;
    overflow-x: hidden;
    overflow-y: auto;
    min-height: 100vh;
}

/* scanlines overlay — only on the landing screen, not the whole page */
#landing-screen::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0px,
        transparent 3px,
        rgba(0,0,0,0.18) 3px,
        rgba(0,0,0,0.18) 4px
    );
}

a { color: #f27ba8; text-decoration: none; }
a:hover { color: #ffb6cf; }

/* ---------- layout ---------- */
.page {
    position: relative;
    z-index: 1;
    width: min(560px, 100% - 2rem);
    margin: 0 auto;
    padding: 3rem 0 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

/* ---------- header ---------- */
.hello {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.avatar-wrap {
    position: relative;
    margin-bottom: 0.4rem;
}

.ears {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    width: 108px;
    height: 30px;
    z-index: 2;
    pointer-events: none;
}

.ear {
    position: absolute;
    bottom: 0;
    width: 0;
    height: 0;
    border-left: 17px solid transparent;
    border-right: 17px solid transparent;
    border-bottom: 30px solid #f27ba8;
}

.ear-l { left: 2px; transform: rotate(-16deg); }
.ear-r { right: 2px; transform: rotate(16deg); }

.avatar {
    position: relative;
    z-index: 1;
    display: block;
    padding: 0;
    width: 132px;
    height: 132px;
    border: 4px solid #f27ba8;
    border-radius: 50%;
    background: #171717;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.16s ease, border-color 0.16s ease;
}

.avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar:hover { border-color: #ffb6cf; }
.avatar:active { transform: scale(0.94); }
.avatar.bounce { animation: bounce 0.42s ease; }

@keyframes bounce {
    0%   { transform: scale(1); }
    35%  { transform: scale(1.09) rotate(-3deg); }
    70%  { transform: scale(0.97) rotate(2deg); }
    100% { transform: scale(1); }
}

h1 {
    margin: 0;
    font-size: clamp(1.6rem, 6vw, 2.1rem);
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #fff;
    text-shadow: 0 0 16px rgba(242,123,168,0.35);
}

.sub {
    margin: 0;
    color: #8b847e;
    font-size: 0.98rem;
}

/* ---------- points ---------- */
.points {
    align-self: center;
    display: inline-flex;
    align-items: baseline;
    gap: 0.6rem;
    padding: 0.7rem 1.4rem;
    background: #121214;
    border: 1px dotted #34343c;
    border-radius: 3px;
}

.points-num {
    font-size: 1.5rem;
    font-weight: 700;
    color: #f27ba8;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 12px rgba(242,123,168,0.4);
}

.points-label {
    font-size: 0.88rem;
    color: #8b847e;
}

.points.bump { animation: bump 0.5s ease; }

@keyframes bump {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.06); }
    100% { transform: scale(1); }
}

/* ---------- kitty image box ---------- */
.kitty-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.85rem 1.7rem;
    font: inherit;
    font-weight: 400;
    color: #fff;
    background: #f27ba8;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    letter-spacing: 0.06em;
    transition: transform 0.14s ease, background 0.14s ease;
}

.btn:hover:not(:disabled) { background: #e86b9b; }
.btn:active:not(:disabled) { transform: scale(0.96); }
.btn:disabled { opacity: 0.6; cursor: default; }

.btn-paw { font-size: 0.95em; }
.btn.busy .btn-paw { animation: spin 1s linear infinite; display: inline-block; }

@keyframes spin {
    to { transform: rotate(360deg); }
}

.frame {
    margin: 0;
    width: 100%;
    background: #121214;
    border: 1px dotted #34343c;
    border-radius: 3px;
    padding: 0.7rem;
}

.frame-inner {
    position: relative;
    border-radius: 3px;
    overflow: hidden;
    background: #171717;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.frame img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 52vh;
    object-fit: contain;
}

.frame-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    background: #171717;
}

.frame-loading[hidden] { display: none; }

.dots { display: inline-flex; gap: 7px; }

.dots i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #f27ba8;
    animation: pulse 1.1s ease-in-out infinite;
}

.dots i:nth-child(2) { animation-delay: 0.16s; }
.dots i:nth-child(3) { animation-delay: 0.32s; }

@keyframes pulse {
    0%, 100% { opacity: 0.35; transform: translateY(0); }
    50%      { opacity: 1; transform: translateY(-4px); }
}

figcaption {
    padding: 0.75rem 0.4rem 0.3rem;
    text-align: center;
    color: #8b847e;
    font-size: 0.95rem;
}

.hint {
    margin: 0;
    color: #8b847e;
    font-size: 0.88rem;
    text-align: center;
}

/* ---------- toys ---------- */
.toys {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
}

.toy {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 1rem 0.7rem;
    font: inherit;
    color: #cfc7c0;
    background: #121214;
    border: 1px dotted #34343c;
    border-radius: 3px;
    cursor: pointer;
    transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}

.toy:hover { border-color: #f27ba8; background: #1a1a1e; }
.toy:active { transform: scale(0.97); }
.toy.wiggle { animation: wiggle 0.45s ease; }

@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    25%      { transform: rotate(-3deg); }
    75%      { transform: rotate(3deg); }
}

.toy-icon { font-size: 1.3rem; line-height: 1; }
.toy-text { font-size: 0.9rem; font-weight: 400; }
.toy-count { font-size: 0.82rem; color: #8b847e; font-variant-numeric: tabular-nums; }

/* ---------- whisper / secret ---------- */
.whisper {
    margin: 0;
    padding: 1rem 1.2rem;
    background: #1a1a1e;
    border: 1px dashed #f27ba8;
    border-radius: 3px;
    font-size: 0.95rem;
    text-align: center;
    color: #ffb6cf;
    animation: fadeIn 0.4s ease;
}

.whisper[hidden] { display: none; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------- footer ---------- */
.bye {
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    color: #8b847e;
    font-size: 0.85rem;
}

.bye-paws { font-size: 0.95rem; letter-spacing: 0.3em; opacity: 0.7; }

.paws {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.paws i {
    position: absolute;
    font-size: 22px;
    opacity: 0.08;
    color: #f27ba8;
    animation: drift linear infinite;
    will-change: transform;
}

@keyframes drift {
    from { transform: translateY(0) rotate(0deg); }
    to   { transform: translateY(-115vh) rotate(28deg); }
}

/* ---------- toast ---------- */
.toast {
    position: fixed;
    left: 50%;
    bottom: 1.5rem;
    transform: translate(-50%, 130%);
    z-index: 10;
    max-width: min(420px, calc(100% - 2rem));
    padding: 0.7rem 1.2rem;
    background: #171717;
    color: #fff;
    border: 1px dotted #34343c;
    border-radius: 3px;
    font-size: 0.9rem;
    text-align: center;
    transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

.toast.show { transform: translate(-50%, 0); }

/* ---------- motion + contrast preferences ---------- */
@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

@media (max-width: 420px) {
    body { font-size: 16px; }
    .page { padding-top: 2.25rem; gap: 1.4rem; }
    .avatar { width: 112px; height: 112px; }
    .ears { width: 92px; }
    .toys { grid-template-columns: 1fr; }
}
