/* Video call page styles - minimal, brandless */

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

html,
body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #111b21;
    color: #e9edef;
}

#app {
    height: 100%;
    position: relative;
}

/* Screens */
.screen {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
}

.screen.active {
    display: flex;
}

/* Status screens */
.status-content {
    text-align: center;
}

.status-content p {
    font-size: 18px;
    margin-bottom: 8px;
}

.status-content .hint {
    font-size: 14px;
    color: #8696a0;
}

/* Spinner */
.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid #2a3942;
    border-top-color: #00a884;
    border-radius: 50%;
    margin: 0 auto 24px;
    animation: spin 1s linear infinite;
}

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

/* Pulse ring for waiting */
.pulse-ring {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #00a884;
    margin: 0 auto 32px;
    animation: pulse 2s ease-in-out infinite;
    opacity: 0.3;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(0.8);
        opacity: 0.3;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.6;
    }
}

/* Call screen */
#call-screen {
    background-color: #000;
}

#remote-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: #1a1a1a;
}

#local-video-container {
    position: absolute;
    bottom: 100px;
    right: 20px;
    width: 180px;
    height: 135px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    background-color: #2a3942;
}

#local-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
}

/* Controls */
#controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 16px;
    padding: 16px 24px;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 40px;
}

.control-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background-color: #3b4a54;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, transform 0.1s;
}

.control-btn:hover {
    background-color: #4a5c68;
}

.control-btn:active {
    transform: scale(0.95);
}

.control-btn svg {
    width: 24px;
    height: 24px;
}

.control-btn.active {
    background-color: #fff;
    color: #111b21;
}

.control-btn.muted {
    background-color: #ea4335;
}

.end-btn {
    background-color: #ea4335;
}

.end-btn:hover {
    background-color: #d93025;
}

/* Icon states */
.hidden {
    display: none;
}

/* Close/retry button */
.close-btn {
    margin-top: 24px;
    padding: 12px 32px;
    font-size: 16px;
    font-weight: 500;
    color: #fff;
    background-color: #00a884;
    border: none;
    border-radius: 24px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.close-btn:hover {
    background-color: #008f72;
}

/* Responsive */
@media (max-width: 600px) {
    #local-video-container {
        width: 120px;
        height: 90px;
        bottom: 100px;
        right: 10px;
    }

    #controls {
        padding: 12px 16px;
        gap: 12px;
    }

    .control-btn {
        width: 48px;
        height: 48px;
    }

    .control-btn svg {
        width: 20px;
        height: 20px;
    }
}
/* ============================================================
   Landing / About  (root visit, no call link) — goofy anime
   ============================================================ */
#landing-screen {
    display: none;
    overflow-y: auto;
    align-items: flex-start;
    justify-content: center;
    padding: clamp(20px, 5vw, 56px) 20px 40px;
}

#landing-screen.active {
    display: flex;
}

.landing {
    width: 100%;
    max-width: 640px;
    display: flex;
    flex-direction: column;
    gap: clamp(26px, 5vw, 44px);
    position: relative;
    z-index: 1;
}

.landing-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-weight: 800;
    letter-spacing: -0.02em;
    font-size: 20px;
    color: #e9edef;
}

.logo::before {
    content: "●";
    color: #00a884;
    margin-right: 8px;
    font-size: 11px;
    vertical-align: 2px;
}

.ghost-link {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12px;
    color: #8696a0;
    text-decoration: none;
    letter-spacing: 0.02em;
}

.ghost-link:hover { color: #e9edef; }

/* ---- mascot ---- */
.mascot-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
}

.waifu {
    height: clamp(130px, 32vw, 190px);
    width: auto;
    max-width: 46%;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 10px 22px rgba(139, 92, 246, 0.4));
    animation: bob 3.2s ease-in-out infinite;
}

/* Placeholder shown until waifu.png is added */
.waifu-ph {
    width: clamp(96px, 22vw, 128px);
    aspect-ratio: 1;
    flex-shrink: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 2px dashed #3a4a54;
    border-radius: 16px;
    background: #17222a;
    animation: bob 3.2s ease-in-out infinite;
}

.waifu-face { font-size: 20px; color: #ff8fc0; }
.waifu-ph small { font-size: 10px; color: #6a7c88; text-align: center; padding: 0 6px; }

.speech {
    position: relative;
    background: #202c33;
    border: 1px solid #2a3942;
    border-radius: 14px 14px 14px 3px;
    padding: 10px 14px;
    font-size: 13px;
    color: #e9edef;
    line-height: 1.4;
}

.speech b { color: #ff8fc0; }

.speech::before {
    content: "";
    position: absolute;
    left: -7px;
    bottom: 8px;
    width: 12px;
    height: 12px;
    background: #202c33;
    border-left: 1px solid #2a3942;
    border-bottom: 1px solid #2a3942;
    transform: rotate(45deg);
}

/* ---- hero copy ---- */
.eyebrow {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 11.5px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #00a884;
    margin-bottom: 16px;
}

.headline {
    font-size: clamp(44px, 11vw, 76px);
    line-height: 0.94;
    letter-spacing: -0.035em;
    font-weight: 800;
    color: #f4f7f8;
}

.headline .smol {
    background: linear-gradient(100deg, #00a884, #ff8fc0);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.lede {
    margin-top: 20px;
    font-size: clamp(15px, 2.5vw, 17px);
    line-height: 1.6;
    color: #aebac1;
    max-width: 48ch;
}

.lede b { color: #e9edef; }
.lede .kao { color: #ff8fc0; white-space: nowrap; }

/* ---- signature: footprint meter ---- */
.meter {
    border: 1px solid #2a3942;
    border-radius: 16px;
    padding: clamp(18px, 3.5vw, 26px);
    background: linear-gradient(180deg, #1a252c, #151f25);
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.meter-row { display: flex; flex-direction: column; gap: 9px; }

.meter-label {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.meter-name { font-size: 14px; color: #e9edef; display: inline-flex; align-items: center; gap: 8px; }

.tag {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: 999px;
}

.tag.chonk { background: rgba(229, 121, 79, 0.16); color: #e5794f; }
.tag.smol-tag { background: rgba(0, 168, 132, 0.16); color: #00d6a4; }

.meter-val {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12.5px;
    white-space: nowrap;
}

.meter-val.heavy { color: #e5794f; }
.meter-val.light { color: #00d6a4; }

.bar {
    height: 12px;
    border-radius: 7px;
    background: #0e161b;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
}

.fill {
    display: block;
    height: 100%;
    width: var(--w);
    border-radius: 7px;
    transform-origin: left;
    animation: meter-grow 1.1s cubic-bezier(.2, .8, .2, 1) both;
}

.fill.heavy { background: linear-gradient(90deg, #7a3b28, #e5794f); animation-delay: .1s; }
.fill.light { background: linear-gradient(90deg, #056a54, #00d6a4); animation-delay: .5s; }

.meter-note { font-size: 13px; color: #8696a0; padding-top: 2px; }

/* ---- CTA ---- */
.cta-block { display: flex; flex-direction: column; gap: 18px; }

.no-link {
    font-size: 14px;
    line-height: 1.55;
    color: #8696a0;
    border-left: 2px solid #00a884;
    padding-left: 14px;
}

.no-link em { color: #e9edef; font-style: normal; font-weight: 700; }
.no-link b { color: #ff8fc0; }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: transform .12s ease, background .15s ease, border-color .15s ease;
}

.btn:active { transform: translateY(1px) scale(.98); }
.btn.primary { background: #00a884; color: #04140f; }
.btn.primary:hover { background: #06c298; transform: translateY(-1px); }
.btn.ghost { color: #e9edef; border: 1px solid #2a3942; }
.btn.ghost:hover { border-color: #ff8fc0; color: #ffd7e8; }

.landing-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    justify-content: space-between;
    border-top: 1px solid #1f2c33;
    padding-top: 18px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 11px;
    letter-spacing: 0.02em;
    color: #6a7c88;
}

/* ---- floating sparkles ---- */
.sparkles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.sparkles span {
    position: absolute;
    font-size: 18px;
    opacity: 0;
    animation: floaty 9s linear infinite;
}

.sparkles span:nth-child(1) { left: 8%;  animation-delay: 0s;   font-size: 14px; }
.sparkles span:nth-child(2) { left: 24%; animation-delay: 2.4s; font-size: 20px; }
.sparkles span:nth-child(3) { left: 46%; animation-delay: 4.1s; }
.sparkles span:nth-child(4) { left: 68%; animation-delay: 1.2s; font-size: 16px; }
.sparkles span:nth-child(5) { left: 82%; animation-delay: 5.6s; font-size: 22px; }
.sparkles span:nth-child(6) { left: 92%; animation-delay: 3.3s; }

/* ---- keyframes ---- */
@keyframes meter-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes wiggle { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(10deg); } }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 96% { transform: scaleY(0.1); } }
@keyframes floaty {
    0%   { transform: translateY(105vh) scale(.6); opacity: 0; }
    10%  { opacity: .9; }
    90%  { opacity: .9; }
    100% { transform: translateY(-10vh) scale(1); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .waifu, .waifu .ahoge, .waifu .eyes, .fill, .sparkles span { animation: none; }
    .sparkles span { opacity: .5; }
}
