* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: #eef5f0;
    font-family:
        system-ui, "Segoe UI", "Noto Sans CJK SC", "PingFang SC",
        "Microsoft YaHei", "Helvetica Neue", Roboto, sans-serif;
    margin: 0;
    padding: 20px 16px 40px;
    color: #1a3b2f;
}

.container {
    max-width: 650px;
    margin: 0 auto;
    background: white;
    border-radius: 36px;
    box-shadow: 0 12px 28px rgba(0, 32, 0, 0.1);
    overflow: hidden;
    padding: 24px 20px 32px;
}

h1 {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0 0 6px 0;
    letter-spacing: -0.3px;
    background: linear-gradient(135deg, #2b6e4c, #1e4a32);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.sub {
    font-size: 0.85rem;
    color: #5f7b6e;
    border-left: 3px solid #8bc34a;
    padding-left: 12px;
    margin-bottom: 28px;
}

.search-area {
    background: #f9fef7;
    border-radius: 60px;
    padding: 6px 6px 6px 20px;
    display: flex;
    gap: 10px;
    align-items: center;
    box-shadow:
        0 1px 4px rgba(0, 0, 0, 0.05),
        inset 0 0 0 1px #e2f0e0;
    margin-bottom: 28px;
}

#charInput {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 1.7rem;
    padding: 14px 0;
    font-weight: 500;
    letter-spacing: 2px;
    outline: none;
    color: #1f3d31;
    font-family: monospace, "Courier New", system-ui;
}

#charInput::placeholder {
    font-size: 1rem;
    color: #bdd3c2;
    font-weight: normal;
    letter-spacing: 0;
}

button {
    background: #2e7d5e;
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}

button:active {
    transform: scale(0.96);
    background: #1f5e46;
}

.result-card {
    background: #fefcf0;
    border-radius: 32px;
    padding: 20px;
    margin-top: 8px;
    border: 1px solid #e9f0e5;
}

.badge {
    display: inline-block;
    background: #2b6e4c20;
    color: #1e4a32;
    border-radius: 60px;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 4px 12px;
    margin-bottom: 14px;
}

.result-word {
    font-size: 3.2rem;
    font-weight: 700;
    letter-spacing: 8px;
    margin-right: -8px;
    color: #255f46;
    line-height: 1.2;
    border-bottom: 2px solid #cfe3cf;
    display: inline-block;
    margin-bottom: 12px;
}

.info-line {
    font-size: 1rem;
    background: #eef5ea;
    padding: 10px 14px;
    border-radius: 28px;
    margin: 14px 0 12px;
    font-weight: 500;
    color: #2a5a44;
}

.same-lesson {
    background: #ffffffd9;
    border-radius: 28px;
    padding: 12px 16px;
    margin-top: 10px;
    border: 1px solid #dbecd6;
}

.same-lesson span {
    display: inline-block;
    background: #eef2e6;
    padding: 6px 14px;
    border-radius: 40px;
    font-size: 0.95rem;
    margin: 4px 6px 4px 0;
    font-family: monospace;
    font-weight: 500;
    color: #1f4e3a;
}

.not-found {
    background: #fff3ea;
    /* border-left: 5px solid #e6b17e; */
}

.not-found .info-line {
    background: #ffe4d0;
    color: #a6531e;
}

.footer-note {
    font-size: 0.7rem;
    color: #89a18e;
    text-align: center;
    margin-top: 24px;
}

@media (max-width: 500px) {
    body {
        padding: 12px 12px 30px;
    }

    .container {
        padding: 20px 16px;
    }

    #charInput {
        font-size: 1.4rem;
        padding: 10px 0;
    }

    button {
        padding: 10px 20px;
    }
}
