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

.hidden { display: none !important; }

.e-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;
}
.e-neo-wrapper * { box-sizing: border-box; }

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

.section-title { font-size: 1.5rem; 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: 40px 0; border-radius: 2px; }

/* TÌM KIẾM AUTOCOMPLETE */
.autocomplete-wrapper { position: relative; margin-bottom: 30px; }
.e-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;
}
.e-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; color: #333; display: flex; justify-content: space-between; }
.autocomplete-dropdown li:hover { background: #b5ead7; color: #000; }
.dropdown-sym { font-family: monospace; color: #ff595e; font-weight: 900; }

/* BỐ CỤC CHÍNH */
.e-main-grid { display: grid; grid-template-columns: 350px 1fr; gap: 30px; animation: eFade 0.3s ease-out; }
@keyframes eFade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.e-col-title { margin: 0 0 15px 0; font-size: 1.2rem; font-weight: 900; text-transform: uppercase; border-bottom: 3px dashed #000; padding-bottom: 10px; text-align: center;}

/* MÔ HÌNH BOHR BẰNG CSS */
.e-bohr-col { background: #fdfd96; border: 3px solid #000; border-radius: 12px; padding: 20px; box-shadow: 5px 5px 0px #000; display: flex; flex-direction: column; align-items: center; overflow: hidden;}
.bohr-container { position: relative; width: 300px; height: 300px; display: flex; justify-content: center; align-items: center; margin-top: 10px; }
.bohr-nucleus { width: 50px; height: 50px; background: #ff595e; border: 3px solid #000; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-weight: 900; font-size: 1.2rem; color: #fff; z-index: 10; font-family: monospace; box-shadow: inset -4px -4px 0px rgba(0,0,0,0.2); }
.bohr-shell { position: absolute; border: 2px dashed #000; border-radius: 50%; opacity: 0.4; }
.bohr-electron { position: absolute; width: 12px; height: 12px; background: #000; border-radius: 50%; top: 50%; left: 50%; margin-top: -6px; margin-left: -6px; box-shadow: 0 0 5px rgba(0,0,0,0.5); }
.bohr-shell-animate { animation: spin linear infinite; }
@keyframes spin { 100% { transform: translate(-50%, -50%) rotate(360deg); } }

/* CỘT CẤU HÌNH & ION */
.e-config-col { display: flex; flex-direction: column; gap: 20px; }
.e-title-bar { display: flex; justify-content: space-between; align-items: center; border-bottom: 3px solid #000; padding-bottom: 10px; }
.e-title-bar h3 { margin: 0; font-size: 2.2rem; font-weight: 900; }
.e-badge { background: #000; color: #fff; padding: 5px 12px; border-radius: 20px; font-weight: 900; font-size: 1.1rem; }

.ion-controls { display: flex; align-items: center; gap: 10px; background: #eee; padding: 10px; border: 3px solid #000; border-radius: 8px; box-shadow: 3px 3px 0px #000; }
.e-btn-ion { cursor: pointer; font-size: 1.1rem; font-weight: 900; padding: 8px 15px; border: 2px solid #000; border-radius: 6px; box-shadow: 2px 2px 0px #000; transition: 0.1s; display: flex; justify-content: center; align-items: center;}
.e-btn-ion:active { transform: translate(2px, 2px); box-shadow: 0px 0px 0px #000; }
.btn-minus { background: #ffb7b2; color: #000; }
.btn-plus { background: #b5ead7; color: #000; }
.btn-reset { background: #fff; margin-left: auto; }
.ion-state-label { font-weight: 900; font-size: 1.1rem; flex-grow: 1; text-align: center; color: #333; }
.ion-state-label.active-ion { color: #ff595e; font-size: 1.3rem;}

.e-config-text-box { background: #fff; border: 3px solid #000; border-radius: 8px; padding: 20px; box-shadow: 4px 4px 0px #000; }
.e-config-label { font-weight: 900; font-size: 1.1rem; color: #555; text-transform: uppercase; display: block; margin-bottom: 10px; }
.e-config-string { font-family: monospace; font-size: 1.8rem; font-weight: 900; color: #ff595e; word-wrap: break-word;}
.e-config-string sup { font-size: 1.2rem; }

/* SƠ ĐỒ ORBITAL (HUND) */
.e-orbital-section { background: #fff; border: 3px solid #000; border-radius: 8px; padding: 20px; box-shadow: 4px 4px 0px #000; overflow-x: auto; }
.orbital-container { display: flex; flex-wrap: wrap; gap: 15px; }
.subshell-group { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.subshell-label { font-weight: 900; font-family: monospace; font-size: 1.1rem; color: #333; }
.boxes-wrapper { display: flex; gap: 2px; }
.orbital-box { width: 30px; height: 35px; border: 2px solid #000; display: flex; justify-content: center; align-items: center; font-size: 1.2rem; font-weight: 900; background: #fafafa; }
.arrow-up, .arrow-down { color: #000; line-height: 1; display: inline-block;}
.arrow-down { margin-left: -5px; }

.e-warning { background: #ffdac1; padding: 10px; border: 2px dashed #000; border-radius: 6px; font-weight: 800; font-size: 0.95rem;}

/* ===================================== */
/* BẢNG TĨNH (STATIC DATA AREA)          */
/* ===================================== */
.static-config-area { display: flex; flex-direction: column; gap: 30px; }
.e-group-box { border: 3px solid #000; border-radius: 12px; overflow: hidden; box-shadow: 5px 5px 0px #000; background: #fff; }
.e-group-header { padding: 12px 20px; font-size: 1.2rem; font-weight: 900; text-transform: uppercase; border-bottom: 3px solid #000; display: flex; justify-content: space-between; align-items: center;}
.e-group-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 15px; padding: 20px; background: #f9f9f9; }

.e-mini-card { 
    background: #fff; border: 2px solid #000; padding: 12px; border-radius: 6px; 
    box-shadow: 3px 3px 0px #000; cursor: pointer; transition: 0.1s; 
    display: flex; align-items: center; gap: 12px;
}
.e-mini-card:hover { transform: translateY(-3px) scale(1.02); box-shadow: 4px 4px 0px #ff595e; border-color: #ff595e; }
.e-mini-sym { font-family: monospace; font-size: 1.6rem; font-weight: 900; color: #ff595e; width: 45px; text-align: center; }
.e-mini-info { display: flex; flex-direction: column; flex-grow: 1; overflow: hidden;}
.e-mini-name { font-size: 0.85rem; font-weight: 900; color: #555; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;}
.e-mini-conf { font-family: monospace; font-size: 1.1rem; font-weight: 900; color: #000; margin-top: 2px;}

@media (max-width: 800px) {
    .e-main-grid { grid-template-columns: 1fr; }
    .ion-controls { flex-wrap: wrap; }
    .btn-reset { margin-left: 0; width: 100%; }
}