/* GIAO DIỆN SOFT BRUTALISM & NAMESPACED - PERCENTAGE CALCULATOR */
.percentcalc-container {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    max-width: 900px; margin: 20px auto;
    border: 3px solid #111111; border-radius: 12px;
    box-shadow: 6px 6px 0px #111111; padding: 30px;
    background: #ffffff; color: #111111; box-sizing: border-box;
}

.percentcalc-container * { box-sizing: border-box; }

.percentcalc-title {
    font-family: 'Montserrat', sans-serif; font-size: 2rem; text-align: center;
    text-transform: uppercase; margin-top: 0; margin-bottom: 10px; font-weight: 900;
}

.percentcalc-desc { text-align: center; color: #444; font-weight: 600; margin-bottom: 30px; line-height: 1.5; }

.percentcalc-grid { display: flex; flex-direction: column; gap: 25px; margin-bottom: 30px; }

/* Thẻ Card chức năng */
.percentcalc-card {
    border: 3px solid #111; border-radius: 10px; padding: 25px;
    box-shadow: 4px 4px 0px #111; position: relative; transition: transform 0.2s;
}
.percentcalc-card:focus-within { transform: translateY(-3px); box-shadow: 6px 6px 0px #111; }

.bg-yellow { background-color: #fdfd96; }
.bg-green { background-color: #e2f0cb; }
.bg-blue { background-color: #e6f7ff; }

.percentcalc-card-header {
    font-family: 'Montserrat', sans-serif; font-size: 1.2rem; font-weight: 900;
    margin: 0 0 15px 0; border-bottom: 3px dashed #111; padding-bottom: 10px; text-transform: uppercase;
}

/* Khu vực câu hỏi & nhập liệu */
.percentcalc-question {
    display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 20px;
}

.percentcalc-text { font-weight: 800; font-size: 1.1rem; color: #111; }

.percentcalc-input {
    padding: 12px 15px; font-size: 1.2rem; font-weight: 900; font-family: 'Courier New', Courier, monospace;
    border: 3px solid #111; border-radius: 6px; outline: none; background-color: #fff; box-shadow: inset 2px 2px 0px rgba(0,0,0,0.05);
}
.percentcalc-input:focus { border-color: #2d7bb5; }

.input-short { width: 100px; }
.input-long { width: 160px; }

/* Khu vực Kết quả */
.percentcalc-result-box {
    background-color: #fff; border: 3px solid #111; border-radius: 8px; padding: 15px 20px;
    display: flex; align-items: center; gap: 15px; box-shadow: 3px 3px 0px #111;
}

.percentcalc-res-label { font-weight: 800; font-size: 1.1rem; color: #555; }
.percentcalc-res-val {
    flex: 1; font-family: 'Montserrat', monospace; font-size: 1.8rem; font-weight: 900; color: #e05a47; word-break: break-all;
}

.text-green { color: #5FB376 !important; } /* Tăng */
.text-red { color: #e05a47 !important; }   /* Giảm */

.percentcalc-btn-copy {
    background-color: #f4f4f4; border: 3px solid #111; border-radius: 6px; padding: 10px 15px;
    font-size: 1.2rem; cursor: pointer; box-shadow: 2px 2px 0px #111; transition: transform 0.1s;
}
.percentcalc-btn-copy:active { transform: translate(2px, 2px); box-shadow: 0px 0px 0px #111; }

/* Tips */
.percentcalc-tips {
    background-color: #f9f9f9; border: 3px dashed #111; border-radius: 10px; padding: 20px;
}
.percentcalc-tips h4 { margin: 0 0 10px 0; font-family: 'Montserrat', sans-serif; font-size: 1.1rem; }
.percentcalc-tips p { margin: 5px 0; line-height: 1.6; font-size: 0.95rem; }

/* Toast */
#percentcalcToast {
    visibility: hidden; min-width: 200px; background-color: #111111; color: #ffffff;
    text-align: center; border-radius: 8px; padding: 12px; position: fixed;
    z-index: 9999; bottom: 30px; left: 50%; transform: translateX(-50%);
    font-weight: bold; opacity: 0; transition: opacity 0.3s, bottom 0.3s;
}
#percentcalcToast.show { visibility: visible; opacity: 1; bottom: 50px; }

@media (max-width: 700px) {
    .percentcalc-input { flex: 1; width: auto; }
    .percentcalc-result-box { flex-direction: column; align-items: stretch; text-align: center; }
}