/* =========================================================
   음성 요약 노트 — Y2K 레트로 OS 창 + 팝 콜라주 스타일
   컬러팔레트: Cleansed / Shower / Joust Blue / Dodger Blue / Denim / Violaceous
   ========================================================= */

@import url("https://fonts.googleapis.com/css2?family=Jua&display=swap");

:root{
    /* 팔레트 */
    --cleansed:#F2F6F7;
    --shower:#80ECF2;
    --joust:#59B5F6;
    --dodger:#5D94E6;
    --denim:#3467B5;
    --violaceous:#DB89DD;

    /* Denim을 더 어둡게 한 외곽선/글자색 */
    --ink:#1c2e5c;

    --font-display:"Jua","맑은 고딕","Malgun Gothic",sans-serif;
    --font-body:"맑은 고딕","Malgun Gothic",sans-serif;
}

*{ box-sizing:border-box; }

/* ---------- 배경: 스캔라인 + 큰 원 ---------- */
body{
    margin:0;
    min-height:100vh;
    font-family:var(--font-body);
    color:var(--ink);
    background:
        repeating-linear-gradient(0deg, rgba(255,255,255,.22) 0 2px, transparent 2px 5px),
        linear-gradient(180deg, var(--shower) 0%, var(--joust) 38%, var(--dodger) 70%, var(--violaceous) 100%);
    background-attachment:fixed;
    overflow-x:hidden;
}

body::before{
    content:"";
    position:fixed;
    top:50%;
    left:50%;
    width:min(960px,130vw);
    aspect-ratio:1;
    transform:translate(-50%,-50%);
    border-radius:50%;
    background:linear-gradient(160deg, rgba(242,246,247,.35), rgba(219,137,221,.35));
    border:6px solid rgba(255,255,255,.55);
    box-shadow:0 0 0 22px rgba(255,255,255,.15);
    pointer-events:none;
    z-index:0;
}

.app{
    position:relative;
    z-index:1;
    max-width:880px;
    margin:0 auto;
    padding:28px 16px 80px;
}

/* ---------- 히어로 ---------- */
.hero{
    position:relative;
    text-align:center;
    padding:10px 0 4px;
}

.chips{
    display:flex;
    justify-content:center;
    flex-wrap:wrap;
    gap:10px;
    margin-bottom:16px;
}

.chip{
    padding:4px 16px;
    border:3px solid var(--ink);
    border-radius:999px;
    background:var(--cleansed);
    font-weight:bold;
    font-size:.82rem;
    letter-spacing:.04em;
    box-shadow:3px 3px 0 var(--ink);
}

.chip.live{
    background:var(--violaceous);
}

.chip.live::before{
    content:"● ";
    animation:blink 1.2s infinite;
}

@keyframes blink{
    50%{ opacity:.2; }
}

.hero h1{
    margin:0;
    font-family:var(--font-display);
    font-weight:normal;
    font-size:clamp(2.4rem,8vw,4rem);
    line-height:1.15;
    color:var(--cleansed);
    paint-order:stroke fill;
    -webkit-text-stroke:8px var(--ink);
    text-shadow:4px 4px 0 var(--violaceous), 7px 7px 0 var(--ink);
}

.hero h1 span{
    color:var(--shower);
}

.sub{
    display:inline-block;
    margin:18px 0 0;
    padding:6px 16px;
    background:var(--cleansed);
    border:3px solid var(--ink);
    border-radius:999px;
    font-size:.92rem;
    box-shadow:3px 3px 0 var(--ink);
}

/* ---------- 스티커 ---------- */
.sticker{
    position:absolute;
    pointer-events:none;
    stroke:var(--ink);
    stroke-width:2;
    stroke-linejoin:round;
    animation:float 4s ease-in-out infinite;
}

.sticker.heart{ fill:var(--violaceous); }
.sticker.star{ fill:var(--shower); }
.sticker.sparkle{ fill:var(--cleansed); }

.hero .s1{ width:56px; top:6px; left:2%; transform:rotate(-14deg); }
.hero .s2{ width:64px; top:40px; right:3%; transform:rotate(12deg); animation-delay:.8s; }
.hero .s3{ width:34px; bottom:6px; left:14%; animation-delay:1.4s; }

.edge{
    position:fixed;
    z-index:0;
}
.edge.e1{ width:90px; left:3vw; top:34vh; transform:rotate(-10deg); }
.edge.e2{ width:80px; right:3vw; top:58vh; transform:rotate(14deg); animation-delay:1s; }
.edge.e3{ width:56px; left:6vw; bottom:8vh; animation-delay:2s; }

@keyframes float{
    0%,100%{ translate:0 0; }
    50%{ translate:0 -8px; }
}

@media (max-width:1150px){
    .edge{ display:none; }
}

/* ---------- 창(Window) ---------- */
.window{
    margin-top:24px;
    background:var(--cleansed);
    border:3px solid var(--ink);
    border-radius:16px;
    box-shadow:6px 6px 0 var(--ink);
    overflow:hidden;
}

.titlebar{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:8px 12px;
    border-bottom:3px solid var(--ink);
    background:
        repeating-linear-gradient(0deg, rgba(255,255,255,.3) 0 2px, transparent 2px 4px),
        linear-gradient(90deg, var(--violaceous), var(--joust));
    font-family:var(--font-display);
    font-size:1.12rem;
}

.ctrl{
    display:flex;
    gap:6px;
}

.ctrl i{
    display:grid;
    place-items:center;
    width:22px;
    height:22px;
    border:2px solid var(--ink);
    border-radius:6px;
    background:var(--cleansed);
    font-style:normal;
    font-family:var(--font-body);
    font-size:11px;
    font-weight:bold;
}

.body{
    padding:18px;
}

.hint{
    margin:0 0 10px;
    font-size:.85rem;
    color:var(--denim);
    font-weight:bold;
}

/* ---------- 버튼 ---------- */
button{
    font-family:var(--font-display);
    font-size:1rem;
    padding:10px 18px;
    margin:0;
    border:3px solid var(--ink);
    border-radius:999px;
    background:var(--denim);
    color:var(--cleansed);
    box-shadow:3px 3px 0 var(--ink);
    cursor:pointer;
    transition:transform .1s, box-shadow .1s, filter .15s;
}

button:hover:not(:disabled){
    filter:brightness(1.12);
    transform:translate(-1px,-1px);
    box-shadow:4px 4px 0 var(--ink);
}

button:active:not(:disabled){
    transform:translate(3px,3px);
    box-shadow:0 0 0 var(--ink);
}

button:disabled{
    opacity:.5;
    cursor:not-allowed;
    box-shadow:2px 2px 0 var(--ink);
}

#startBtn{
    background:var(--violaceous);
    color:var(--ink);
}

#stopBtn{
    background:var(--cleansed);
    color:var(--ink);
}

button.ghost{
    background:var(--cleansed);
    color:var(--ink);
}

button.ghost.active{
    background:var(--violaceous);
}

.controls-row{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:10px;
}

input[type="file"]{
    font-family:var(--font-body);
    font-size:.88rem;
    color:var(--ink);
}

input[type="file"]::file-selector-button{
    font-family:var(--font-display);
    padding:8px 14px;
    margin-right:8px;
    border:3px solid var(--ink);
    border-radius:999px;
    background:var(--shower);
    color:var(--ink);
    box-shadow:3px 3px 0 var(--ink);
    cursor:pointer;
}

.actions{
    margin-top:14px;
    display:flex;
    flex-wrap:wrap;
    gap:10px;
}

/* ---------- 상태 / 진행률 ---------- */
#status{
    display:block;
    margin-top:16px;
    padding:10px 14px;
    background:#fff;
    border:3px solid var(--ink);
    border-radius:14px;
    box-shadow:3px 3px 0 var(--joust);
    font-weight:bold;
}

#progressWrap{
    display:none;
    margin-top:12px;
}

#progressText{
    margin-bottom:4px;
    font-size:.85rem;
    font-weight:bold;
}

#progressTrack{
    height:20px;
    border:3px solid var(--ink);
    border-radius:999px;
    background:var(--cleansed);
    overflow:hidden;
}

#progressFill{
    height:100%;
    width:0%;
    border-right:3px solid var(--ink);
    background:repeating-linear-gradient(45deg, var(--joust) 0 10px, var(--shower) 10px 20px);
    background-size:28px 28px;
    animation:stripes .8s linear infinite;
    transition:width .15s;
}

@keyframes stripes{
    to{ background-position:28px 0; }
}

audio{
    width:100%;
    margin-top:16px;
    border-radius:999px;
    background:var(--cleansed);
    box-shadow:3px 3px 0 var(--ink);
}

/* ---------- 텍스트 박스 ---------- */
.box{
    min-height:80px;
    padding:12px;
    background:#fff;
    border:3px solid var(--ink);
    border-radius:12px;
    box-shadow:inset 4px 4px 0 rgba(89,181,246,.25);
    line-height:1.65;
    white-space:pre-wrap;
    color:var(--ink);
}

textarea.box{
    display:block;
    width:100%;
    font:inherit;
    resize:vertical;
}

textarea.box:focus{
    outline:3px solid var(--violaceous);
    outline-offset:2px;
}

/* ---------- 슬라이더 ---------- */
.slider-row{
    margin-top:16px;
    padding:12px 14px;
    background:var(--shower);
    border:3px solid var(--ink);
    border-radius:14px;
    box-shadow:3px 3px 0 var(--ink);
}

.slider-head{
    display:flex;
    justify-content:space-between;
    align-items:center;
    font-weight:bold;
    margin-bottom:4px;
}

#lengthLabel{
    padding:1px 12px;
    background:var(--ink);
    color:var(--shower);
    border-radius:999px;
    font-family:var(--font-display);
}

.slider-scale{
    display:flex;
    justify-content:space-between;
    font-size:.8rem;
    font-weight:bold;
}

input[type="range"]{
    -webkit-appearance:none;
    appearance:none;
    width:100%;
    height:28px;
    margin:6px 0 2px;
    background:transparent;
    cursor:pointer;
}

input[type="range"]::-webkit-slider-runnable-track{
    box-sizing:border-box;
    height:20px;
    background:var(--cleansed);
    border:3px solid var(--ink);
    border-radius:999px;
}

input[type="range"]::-moz-range-track{
    box-sizing:border-box;
    height:20px;
    background:var(--cleansed);
    border:3px solid var(--ink);
    border-radius:999px;
}

input[type="range"]::-webkit-slider-thumb{
    -webkit-appearance:none;
    width:28px;
    height:28px;
    margin-top:-7px;
    background:var(--violaceous);
    border:3px solid var(--ink);
    border-radius:50%;
    box-shadow:2px 2px 0 var(--ink);
}

input[type="range"]::-moz-range-thumb{
    width:22px;
    height:22px;
    background:var(--violaceous);
    border:3px solid var(--ink);
    border-radius:50%;
    box-shadow:2px 2px 0 var(--ink);
}

/* ---------- 번역 창 ---------- */
#translateCard{
    display:none;
}

/* ---------- 저장된 노트 (채팅 박스 느낌) ---------- */
.note{
    position:relative;
    margin-top:12px;
    padding:10px 44px 10px 58px;
    background:#fff;
    border:3px solid var(--ink);
    border-radius:14px;
    box-shadow:3px 3px 0 var(--joust);
    white-space:pre-wrap;
    line-height:1.6;
}

.note::before{
    content:"♥";
    position:absolute;
    left:12px;
    top:12px;
    display:grid;
    place-items:center;
    width:34px;
    height:34px;
    border:3px solid var(--ink);
    border-radius:50%;
    background:var(--violaceous);
    color:var(--cleansed);
    font-size:.9rem;
}

.note small{
    display:block;
    margin-bottom:2px;
    color:var(--denim);
    font-weight:bold;
}

.note .del{
    position:absolute;
    top:8px;
    right:8px;
    padding:0 8px;
    font-size:.85rem;
    background:var(--cleansed);
    color:var(--ink);
    box-shadow:2px 2px 0 var(--ink);
}

/* ---------- 모바일 ---------- */
@media (max-width:520px){
    .app{ padding:20px 12px 60px; }
    .hero .s1{ width:34px; top:-14px; left:0; }
    .hero .s2{ width:44px; top:50px; }
    .hero .s3{ display:none; }
    .titlebar{ font-size:1rem; }
    button{ padding:9px 14px; }
    .body{ padding:14px; }
}