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

.hidden { display: none !important; }

.litmus-neo-wrapper {
    font-family: system-ui, -apple-system, sans-serif; max-width: 1100px; margin: 20px auto;
    border: 3px solid #000; border-radius: 12px; box-shadow: 8px 8px 0px #000;
    padding: 25px; background: #fff; color: #000; box-sizing: border-box;
}
.litmus-neo-wrapper * { box-sizing: border-box; }

.litmus-header {
    background: #e0bbe4; padding: 15px 20px; border-radius: 12px;
    border: 3px solid #000; box-shadow: 4px 4px 0px #000; margin-bottom: 30px; text-align: center;
}
.litmus-header h2 { margin: 0 0 5px 0; font-size: 1.8rem; font-weight: 900; text-transform: uppercase; }
.litmus-header p { margin: 0; font-weight: 800; font-size: 0.95rem; }

.section-title { font-size: 1.4rem; font-weight: 900; text-transform: uppercase; margin: 0 0 10px 0; border-left: 6px solid #ff595e; padding-left: 10px; }
.neo-divider { border: 0; height: 4px; background: #000; margin: 35px 0; border-radius: 2px; }

/* TRA CỨU ĐỘNG */
.tool-desc { font-weight: 700; color: #444; margin-bottom: 15px;}
.autocomplete-wrapper { position: relative; margin-bottom: 25px; }
.litmus-neo-input {
    width: 100%; padding: 18px 20px; font-size: 1.2rem; font-weight: 900; font-family: monospace;
    border-radius: 8px; border: 3px solid #000; background: #f4f4f4; color: #000;
    outline: none; box-shadow: inset 3px 3px 0px rgba(0,0,0,0.05); transition: 0.1s;
}
.litmus-neo-input:focus { border-color: #ff595e; background: #fff; }

.autocomplete-dropdown {
    position: absolute; top: 100%; left: 0; right: 0; z-index: 1000;
    background: #fff; border: 3px solid #000; border-radius: 8px; box-shadow: 5px 5px 0px #000;
    margin-top: 5px; padding: 0; list-style: none; max-height: 250px; overflow-y: auto;
}
.autocomplete-dropdown li { padding: 12px 15px; border-bottom: 2px dashed #ccc; font-weight: 800; font-size: 1.05rem; cursor: pointer; display: flex; justify-content: space-between; }
.autocomplete-dropdown li:hover { background: #b5ead7; }
.li-form { font-family: monospace; color: #ff595e; font-weight: 900; }

/* KẾT QUẢ MÔ PHỎNG */
.litmus-result { display: flex; gap: 25px; background: #fdfd96; border: 3px solid #000; border-radius: 12px; padding: 20px; box-shadow: 5px 5px 0px #000; animation: fadeUp 0.3s ease-out; align-items: center;}
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.litmus-paper-container { flex-shrink: 0; width: 120px; height: 160px; background: #fff; border: 3px dashed #000; border-radius: 8px; display: flex; justify-content: center; align-items: flex-end; padding-bottom: 10px; position: relative; overflow: hidden; }
.litmus-paper-container::before { content: 'Dung dịch'; position: absolute; top: 10px; font-weight: 900; font-size: 0.8rem; color: #888; text-transform: uppercase; letter-spacing: 1px;}
.paper-strip { width: 40px; height: 120px; background: #dcd0ff; border: 2px solid #000; border-radius: 4px; box-shadow: 3px 3px 0px rgba(0,0,0,0.2); display: flex; justify-content: center; align-items: center; transition: background-color 0.5s ease; position: relative; }
.paper-text { transform: rotate(-90deg); font-family: 'Bungee', cursive; font-size: 1rem; color: #fff; text-shadow: 1px 1px 0 #000; letter-spacing: 2px; }

/* Trạng thái màu quỳ */
.paper-red { background: #ff595e !important; }
.paper-blue { background: #3a86ff !important; }
.paper-purple { background: #cbaacb !important; }

.litmus-info-box { flex-grow: 1; display: flex; flex-direction: column; justify-content: center;}
.litmus-info-box h4 { margin: 0; font-family: monospace; font-size: 2.2rem; font-weight: 900; color: #ff595e; }
.res-name { font-size: 1.2rem; font-weight: 900; margin: 5px 0 10px 0; text-transform: uppercase; }
.res-type { font-size: 1rem; font-weight: 700; margin: 0 0 10px 0; }
.res-type b { background: #000; color: #fff; padding: 3px 10px; border-radius: 20px; }
.res-explanation { background: #fff; border: 2px solid #000; padding: 12px; border-radius: 6px; font-weight: 600; line-height: 1.5; box-shadow: inset 2px 2px 0px rgba(0,0,0,0.05); }

/* BẢNG LÝ THUYẾT TĨNH */
.theory-box { background: #f4f4f4; border: 3px solid #000; border-radius: 8px; padding: 20px; font-weight: 600; line-height: 1.6; font-size: 1.05rem; box-shadow: 4px 4px 0px #000; }
.theory-list { margin: 15px 0 0 0; padding-left: 20px; }
.theory-list li { margin-bottom: 8px; }

.static-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-top: 15px; }
.static-col { border: 3px solid #000; border-radius: 12px; overflow: hidden; box-shadow: 5px 5px 0px #000; background: #fff; display: flex; flex-direction: column;}
.col-header { padding: 12px; font-size: 1.2rem; font-weight: 900; text-align: center; border-bottom: 3px solid #000; color: #000; }
.col-acid .col-header { background: #ffb7b2; }
.col-base .col-header { background: #b5ead7; }
.col-salt .col-header { background: #e0bbe4; }
.col-content { padding: 15px; font-weight: 600; font-size: 0.95rem; line-height: 1.5; flex-grow: 1;}

.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tag-list span { font-family: monospace; font-weight: 900; font-size: 1.1rem; padding: 5px 10px; border: 2px solid #000; border-radius: 6px; background: #f9f9f9; box-shadow: 2px 2px 0px #000;}

.salt-rules { padding-left: 15px; margin: 10px 0 0 0; }
.salt-rules li { margin-bottom: 10px; }
.salt-rules b { color: #ff595e; }

@media (max-width: 700px) {
    .litmus-result { flex-direction: column; text-align: center; }
    .litmus-info-box { align-items: center; text-align: center; }
}