.keyc-soft-wrapper {
    /* Biến cục bộ, cách ly CSS */
    --neo-border: 3px solid #111111;
    --neo-shadow: 5px 5px 0px #111111;
    
    --bg-main: #fcfcfc;
    --clr-yellow: #f9c22e;
    --clr-cyan: #43bccd;
    --clr-pink: #f05d5e;
    --clr-green: #53bf9d;
    --clr-white: #ffffff;
    --clr-text: #111111;

    max-width: 950px; 
    margin: 0 auto;
    font-family: system-ui, -apple-system, sans-serif;
    color: var(--clr-text);
    background: var(--bg-main);
    padding: 20px;
    border: var(--neo-border);
    border-radius: 16px;
    box-shadow: 6px 6px 0px #111111;
}

.keyc-soft-wrapper * { box-sizing: border-box; }

.keyc-soft-header {
    background: #111; padding: 20px; color: #fff;
    border: var(--neo-border); border-radius: 12px;
    text-align: center; margin-bottom: 20px; box-shadow: var(--neo-shadow);
}
.keyc-soft-header h2 { margin: 0 0 10px 0; font-size: 1.8rem; font-weight: 900; color: var(--clr-cyan); text-transform: uppercase;}
.keyc-soft-header p { margin: 0; font-weight: 600; font-size: 0.95rem; color: #ccc;}

/* TOOLBAR & TOGGLE */
.keyc-toolbar { margin-bottom: 20px; background: var(--clr-yellow); padding: 12px 15px; border: 2px solid #111; border-radius: 8px; box-shadow: 3px 3px 0px #111; }
.keyc-toggle-row { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.keyc-toggle-text { font-weight: 800; font-size: 0.95rem; }

.keyc-switch-wrapper { position: relative; width: 46px; height: 26px; }
.keyc-checkbox { opacity: 0; width: 0; height: 0; position: absolute; }
.keyc-switch { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: #fff; border: 2px solid #111; border-radius: 20px; transition: 0.2s; }
.keyc-switch:before { position: absolute; content: ""; height: 16px; width: 16px; left: 3px; bottom: 3px; background: #111; border-radius: 50%; transition: 0.2s; }
.keyc-checkbox:checked + .keyc-switch { background: var(--clr-green); }
.keyc-checkbox:checked + .keyc-switch:before { transform: translateX(20px); background: #fff; border-color: #fff; }

/* BỐ CỤC 2 CỘT */
.keyc-main-layout { display: flex; flex-direction: column; gap: 20px; }
.keyc-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
@media (min-width: 768px) { .keyc-main-layout { flex-direction: row; align-items: stretch; } }

/* CARDS */
.keyc-card {
    background: var(--clr-white); padding: 20px; border: var(--neo-border); 
    border-radius: 12px; box-shadow: var(--neo-shadow); display: flex; flex-direction: column;
}
.keyc-card-title { margin: 0 0 15px 0; font-size: 1.15rem; font-weight: 900; border-bottom: 2px dashed #111; padding-bottom: 10px; }

/* MAIN DISPLAY (HERO) */
.keyc-hero-card { background: var(--clr-cyan); text-align: center; justify-content: center; min-height: 220px; }
.keyc-initial-msg { font-size: 1.5rem; font-weight: 900; color: #111; }
.keyc-pulse { animation: keycPulse 1.5s infinite; }
@keyframes keycPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

.keyc-giant-number { font-size: 5rem; font-weight: 900; color: #111; line-height: 1; text-shadow: 4px 4px 0px #fff; }
.keyc-giant-key { font-size: 1.5rem; font-weight: 800; margin-top: 10px; background: #111; color: var(--clr-cyan); display: inline-block; padding: 5px 15px; border-radius: 8px; border: 2px solid #fff; }

/* PROPS GRID */
.keyc-props-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.keyc-prop-box { background: #fff; padding: 15px; border: 2px solid #111; border-radius: 10px; box-shadow: 3px 3px 0px #111; text-align: center; }
.keyc-prop-label { display: block; font-size: 0.85rem; font-weight: 800; color: #555; margin-bottom: 5px; }
.keyc-prop-val { font-family: monospace; font-size: 1.2rem; font-weight: 900; color: #111; word-break: break-all; }

/* MODIFIERS */
.keyc-modifiers-list { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 10px; }
.keyc-mod-badge {
    padding: 8px 15px; background: #eee; border: 2px solid #111; border-radius: 8px; 
    font-weight: 800; color: #777; transition: 0.2s;
}
.keyc-mod-badge.active { background: var(--clr-pink); color: #fff; box-shadow: 3px 3px 0px #111; border-color: #111; transform: translateY(-2px); }

/* HISTORY */
.keyc-history-card { flex: 1; display: flex; flex-direction: column; max-height: 400px; }
.keyc-history-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px dashed #111; padding-bottom: 10px; margin-bottom: 15px; }
.keyc-btn-clear {
    background: #fff; border: 2px solid #111; border-radius: 6px; padding: 4px 10px; font-weight: 800; cursor: pointer; box-shadow: 2px 2px 0px #111; transition: 0.1s;
}
.keyc-btn-clear:active { transform: translate(2px, 2px); box-shadow: 0px 0px 0px #111; }

.keyc-history-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding-right: 5px; }
.keyc-empty-history { text-align: center; font-weight: 600; color: #888; font-style: italic; margin-top: 20px; }
.keyc-hist-item {
    display: flex; justify-content: space-between; background: #f8f9fa; border: 2px solid #111; 
    border-radius: 6px; padding: 8px 12px; font-weight: 800; font-size: 0.95rem; align-items: center;
}
.keyc-hist-code { background: #111; color: var(--clr-yellow); padding: 2px 8px; border-radius: 4px; font-family: monospace; }

/* Custom Scrollbar for history */
.keyc-history-list::-webkit-scrollbar { width: 6px; }
.keyc-history-list::-webkit-scrollbar-track { background: #eee; border-radius: 10px; }
.keyc-history-list::-webkit-scrollbar-thumb { background: #111; border-radius: 10px; }