:root {
    --white: #ffffff;
    --darkcyan: #0a9396;
    --skin: #e9d8a6;
    --lightcyan: #94d2bd;
    --red: #ff3a3a;
    --lightgray: #cccccc;
    --charcoal: #0f0f0f;
    --blue: #1c62b9;
    --dimgray: #606060;
    --ghostwhite: #f9f9f9;
    --gray: #999999;
    --rose: #ffcdd2;
    --font: Roboto, Arial, sans-serif;
    --tint: #fff4f4;
    --cream: #fafafa;
    --greycream: #eeeeee;
    --smokewhite: #f2f2f2;
    --black: #000000;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font);
    background: var(--darkcyan);
    color: var(--white);
}

header {
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 18px 16px;
    background: rgba(147, 210, 189, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

header h1 {
    margin: 0;
    font-size: 20px;
    font-weight: 500;
}

main {
    max-width: 960px;
    margin: 0 auto;
    padding: 16px;
}

.layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 16px;
    align-items: start;
}

@media (max-width: 768px) {
    .layout {
        grid-template-columns: 1fr;
    }
}

.hidden {
    display: none !important;
}

.warning {
    background: var(--red);
    border: 1px solid red;
    color: var(--white);
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 13px;
}

.download,
.uploadpart,
.searchpanel,
.result-part {
    background: var(--skin);
    border: 1px solid var(--ghostwhite);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    color: var(--black);
}

#result {
    font-size: 14px;
    margin: 0 0 6px 0;
    font-weight: 500;
}

video {
    width: 100%;
    aspect-ratio: 16/9;
    max-height: 380px;
    background: var(--black);
    display: block;
    border: none;
    border-radius: 10px;
    margin-bottom: 12px;
}

#uploadlabel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: 2px dashed var(--ghostwhite);
    border-radius: 10px;
    padding: 36px 20px;
    cursor: pointer;
    text-align: center;
}

#uploadlabel:hover {
    border-color: var(--black);
    background: var(--cream);
}

.small {
    font-size: 12px;
    color: var(--dimgray);
}

.bar {
    height: 6px;
    background: var(--greycream);
    border-radius: 3px;
    margin-top: 10px;
    overflow: hidden;
}

#downloadbar {
    height: 100%;
    width: 0%;
    background: red;
}

.searchbar,
.horizontal {
    display: flex;
    gap: 8px;
    align-items: center;
}

.space-between {
    justify-content: space-between;
    margin-bottom: 10px;
}

input[type="text"] {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid var(--lightgray);
    border-radius: 20px;
    font-size: 14px;
    background: var(--white);
    color: var(--charcoal);
}

input[type="text"]:disabled {
    background: var(--ghostwhite);
    color: var(--gray);
}

input[type="text"]:focus {
    outline: none;
    border-color: var(--blue);
}

button {
    padding: 10px 20px;
    border: none;
    border-radius: 20px;
    background: var(--white);
    color: var(--charcoal);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.sample {
    width: 100%;
    margin-top: 10px;
}

.sample:hover:not(:disabled) {
    background: var(--ghostwhite);
}

#status {
    font-size: 13px;
    color: var(--dimgray);
    min-height: 16px;
    margin: 10px 0 0 0;
}

.tagexplain {
    margin-top: 10px;
}

.tagexplain code {
    background: var(--smokewhite);
    padding: 1px 6px;
    border-radius: 4px;
    font-family: var(--font);
    color: var(--charcoal);
}

.quicktries {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin-top: 10px;
}

.quicktry {
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 500;
    background: var(--smokewhite);
    color: var(--charcoal);
    border: none;
    border-radius: 20px;
}

.quicktry:hover:not(:disabled) {
    background: var(--ghostwhite);
}

.result {
    display: flex;
    gap: 10px;
    width: 100%;
    padding: 8px 4px;
    border: none;
    border-radius: 6px;
    margin-bottom: 4px;
    background: transparent;
    cursor: pointer;
    text-align: left;
    font: inherit;
    color: var(--charcoal);
}

.result:hover {
    background: var(--ghostwhite);
}

.result img,
.result .noimg {
    width: 84px;
    height: 52px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    background: var(--greycream);
}

.result .noimg {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: var(--dimgray);
}

.result .body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.result .row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.tag-both,
.tag-eye,
.tag-ear {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
    margin-right: 4px;
}

.tag-both {
    background: var(--rose);
    color: var(--charcoal);
}

.tag-eye {
    background: var(--lightcyan);
    color: var(--charcoal);
}

.tag-ear {
    background: var(--smokewhite);
    color: var(--charcoal);
}

.result .pct {
    font-size: 12px;
    color: var(--dimgray);
}

.result .line {
    font-size: 12px;
    color: var(--dimgray);
    font-style: italic;
}

.result .meter {
    height: 4px;
    background: var(--greycream);
    border-radius: 2px;
    overflow: hidden;
}

.result .meter span {
    display: block;
    height: 100%;
    background: var(--blue);
}