/* ===== Global ===== */
body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #3B2A1A; /* 深褐色背景 */
    color: #EFE6D8; /* 羊皮纸文字 */
    padding: 16px;
    margin: 0;
    max-width: 700px;
    margin-inline: auto;
}

h1 {
    text-align: center;
    margin-bottom: 20px;
    color: #F5EBDD;
}

/* ===== Search ===== */
input {
    width: 100%;
    padding: 14px;
    font-size: 18px;
    border-radius: 12px;
    border: none;
    margin-bottom: 20px;
    background: #4A3623; /* 木质褐 */
    color: #EFE6D8;
}

    input::placeholder {
        color: #C8B9A6;
    }

/* ===== Filter ===== */
#filter {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

    #filter select,
    #filter button {
        padding: 8px 12px;
        border-radius: 10px;
        border: none;
        background: #4A3623;
        color: #EFE6D8;
        cursor: pointer;
        font-size: 15px;
        transition: background 0.2s;
    }

        #filter button:hover,
        #filter select:hover {
            background: #6B4A2D; /* 高亮褐 */
        }

/* ===== Card ===== */
.card {
    position: relative;
    background: #4A3623;
    padding: 18px;
    border-radius: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: transform 0.15s, background 0.15s;
}

    .card:hover {
        transform: translateY(-2px);
        background: #5A4028;
    }

    .card h2 {
        font-size: 22px;
        margin-bottom: 6px;
        color: #F3E6D2;
    }

/* ===== Tag ===== */
.tags {
    margin-top: 6px;
}

.tag {
    display: inline-block;
    padding: 6px 10px;
    margin-right: 6px;
    margin-top: 6px;
    font-size: 13px;
    border-radius: 999px;
    cursor: pointer;
    background: #7A5230; /* 标签褐 */
    color: #FFF5E6;
    user-select: none;
}

    .tag:hover {
        opacity: 0.85;
    }

/* ===== Mark Button ===== */
.markBtn {
    position: absolute;
    top: 10px;
    right: 12px;
    background: transparent;
    color: #D6A24C; /* 金色点缀 */
    font-size: 22px;
    border: none;
    cursor: pointer;
    transition: transform 0.15s;
}

    .markBtn:hover {
        transform: scale(1.25);
    }

/* ===== Detail ===== */
#detail,
#about {
    margin-top: 20px;
}

    #detail h2 {
        font-size: 28px;
        margin-bottom: 6px;
        color: #F5EBDD;
    }

    #detail p {
        line-height: 1.6;
    }

/* ===== Button ===== */
#backBtn,
#aboutBackBtn,
#reportBtn,
#submitReport,
#cancelReport,
#markDetailBtn,
#confirmSubmitWord,
#cancelSubmitWord {
    padding: 8px 14px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    color: #FFF5E6;
    font-size: 14px;
    margin-top: 10px;
    background: #7A5230;
    transition: background 0.2s, transform 0.1s;
}

    #backBtn:hover,
    #aboutBackBtn:hover,
    #reportBtn:hover,
    #submitReport:hover,
    #cancelReport:hover,
    #markDetailBtn:hover,
    #confirmSubmitWord:hover,
    #cancelSubmitWord:hover {
        background: #8C6239;
    }

    #backBtn:active,
    #aboutBackBtn:active,
    #reportBtn:active,
    #submitReport:active,
    #cancelReport:active,
    #markDetailBtn:active,
    #confirmSubmitWord:active,
    #cancelSubmitWord:active {
        transform: scale(0.96);
    }

/* ===== Error Report & Submit Form ===== */
#reportForm textarea,
#submitWordForm textarea,
#submitWordForm input,
#submitWordForm select {
    width: 100%;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #6B4A2D;
    background: #4A3623;
    color: #EFE6D8;
    font-size: 14px;
    margin-bottom: 8px;
    resize: vertical;
    box-sizing: border-box;
}

#submitWordForm {
    border: 1px solid #6B4A2D;
    padding: 20px;
    margin: 20px 0;
    border-radius: 12px;
    background-color: #4A3623; /* Same as Card bg */
}

#submitWordForm h3 {
    margin-top: 0;
    color: #F5EBDD;
}

#submitWordForm label {
    display: block;
    margin-top: 10px;
    margin-bottom: 4px;
    color: #C8B9A6;
    font-size: 14px;
    font-weight: bold;
}

/* ===== Website Info ===== */
.about-section {
    margin-top: 20px;
}

    .about-section h3 {
        margin-bottom: 8px;
    }

    .about-section ul {
        padding-left: 20px;
    }

    .about-section li {
        margin-bottom: 6px;
    }

/* ===== Tooltip Icon ===== */
.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-left: 6px;
    border-radius: 50%;
    border: 1px solid #C8B9A6;
    color: #C8B9A6;
    font-size: 12px;
    cursor: pointer;
    user-select: none;
}

    .info-icon:hover {
        background: #5A4028;
    }

/* ===== Tooltip ===== */
.info-tooltip {
    display: none;
    margin-top: 8px;
    padding: 10px 12px;
    background: #4A3623;
    border: 1px solid #6B4A2D;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.5;
    pointer-events: none;
}

/* ===== Footer ===== */
footer {
    text-align: center;
    margin-top: 40px;
    padding: 16px 0;
    color: #C8B9A6;
}

#aboutLink {
    cursor: pointer;
    text-decoration: underline;
}

    #aboutLink:hover {
        color: #F5EBDD;
    }

/* ===== Scrollbar Hidden ===== */
::-webkit-scrollbar {
    width: 0px;
    height: 0px;
}

html {
    scrollbar-width: none;
}

body {
    -ms-overflow-style: none;
}

/* ===== Sort Control ===== */
#sortSelect {
    padding: 8px 12px;
    border-radius: 10px;
    border: none;
    background: #4A3623;
    color: #EFE6D8;
    cursor: pointer;
    font-size: 15px;
}

    #sortSelect:hover {
        background: #6B4A2D;
    }

/* ===== Detail Updated Time ===== */
.detail-updated {
    margin-top: 18px;
    padding-top: 10px;
    border-top: 1px dashed #6B4A2D;
    font-size: 13px;
    color: #C8B9A6;
}

.belongs-text {
    font-size: 13px;
    color: #C8B9A6;
    margin: 4px 0 6px;
}

#pronounceBtn {
    margin-left: 8px;
    padding: 2px 6px;
    font-size: 16px;
    border: none;
    border-radius: 6px;
    background: rgba(255, 245, 230, 0.12);
    color: #FFF5E6;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}

    #pronounceBtn:hover {
        background: rgba(255, 245, 230, 0.22);
    }

    #pronounceBtn:active {
        transform: scale(0.92);
    }
