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

:root {
  /* Bảng màu Retro 20 màu */
  --color-1: #E27D60;  /* Cam gạch */
  --color-2: #85DCBA;  /* Xanh bạc hà */
  --color-3: #E8A87C;  /* Cam đào */
  --color-4: #C38D9E;  /* Hồng tro */
  --color-5: #41B3A3;  /* Xanh mòng két */
  --color-6: #E9C46A;  /* Vàng mù tạt */
  --color-7: #F4A261;  /* Cam đất trầm */
  --color-8: #E76F51;  /* Đỏ gạch nung */
  --color-9: #D4A373;  /* Nâu bò */
  --color-10: #FAEDCB; /* Vàng kem */
  --color-11: #A8DADC; /* Xanh ngọc lam */
  --color-12: #457B9D; /* Xanh lam trầm */
  --color-13: #1D3557; /* Xanh Navy */
  --color-14: #2A9D8F; /* Xanh ngọc lục bảo */
  --color-15: #264653; /* Xanh cổ vịt đậm */
  --color-16: #C9E4DE; /* Xanh rêu phấn */
  --color-17: #A3B18A; /* Xanh lính nhạt */
  --color-18: #588157; /* Xanh lá xỉn */
  --color-19: #A5A58D; /* Xám rêu */
  --color-20: #F4F1DE; /* Trắng ngà (Eggshell) */
}

.hidden { display: none !important; }

/* WRAPPER (NỀN TRẮNG CHUẨN LUẬT) */
.rpe-neo-wrapper {
    font-family: system-ui, -apple-system, sans-serif;
    max-width: 800px; margin: 30px auto; background: #fff;
    border: 3px solid #000; border-radius: 16px; box-shadow: 10px 10px 0px #000;
    padding: 25px; box-sizing: border-box; color: #000;
}
.rpe-neo-wrapper * { box-sizing: border-box; }

.rpe-header {
    background: var(--color-20); padding: 20px; border-radius: 12px;
    border: 3px solid #000; box-shadow: 4px 4px 0px #000; margin-bottom: 25px; text-align: center;
}
.rpe-header h2 { margin: 0 0 10px 0; font-size: 1.8rem; font-weight: 900; text-transform: uppercase; color: #111;}
.rpe-header p { margin: 0; font-weight: 700; font-size: 1rem; color: #333; }

/* BỐ CỤC CARD & MÀU RETRO */
.rpe-card { border: 3px solid #000; padding: 20px; border-radius: 12px; box-shadow: 4px 4px 0px #000;}
.card-title { margin: 0 0 15px 0; font-size: 1.25rem; font-weight: 900; text-transform: uppercase; border-bottom: 2px dashed #000; padding-bottom: 10px;}

.bg-mint { background: var(--color-2); }
.bg-mustard { background: var(--color-6); }
.bg-powder { background: var(--color-11); }
.bg-eggshell { background: var(--color-20); }

/* MASTER RULE: NHÃN ĐEN TUYỀN, IN ĐẬM, CHỮ HOA */
.rpe-neo-wrapper label { display: block; color: #000 !important; font-weight: 900; font-size: 1.05rem; margin-bottom: 8px; text-transform: uppercase;}

/* INPUT STYLES */
.rpe-group { margin-bottom: 15px; }
.rpe-grid-2 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 15px; }

.rpe-input {
    width: 100%; padding: 12px 15px; font-size: 1.2rem; font-weight: 900; font-family: 'Courier New', monospace;
    border: 3px dashed #000; border-radius: 8px; outline: none; background: #fff; transition: 0.1s;
}
.rpe-input:focus { border-style: solid; border-color: var(--color-13); box-shadow: 4px 4px 0px var(--color-13); transform: translateY(-2px); }

.rpe-suffix {
    position: absolute; right: 15px; top: 50%; transform: translateY(-50%);
    font-weight: 900; font-size: 1rem; color: #555; pointer-events: none;
}

.rpe-live-text { color: var(--color-12); font-weight: 800; font-size: 0.95rem; margin-top: 6px; min-height: 16px; font-style: italic;}
.hint-text { font-weight: 700; font-size: 0.9rem; color: #444; margin-top: 10px; display: block;}

/* CHECKBOX / TOGGLE NEO BRUTALISM */
.toggle-group { margin-top: 20px; border-top: 2px dashed #000; padding-top: 15px; }
.toggle-label { display: flex !important; align-items: center; gap: 10px; cursor: pointer; text-transform: none !important; font-size: 1.1rem !important;}
.neo-checkbox { display: none; }
.neo-checkbox-custom { width: 24px; height: 24px; border: 3px solid #000; border-radius: 4px; background: #fff; position: relative; transition: 0.1s; box-shadow: 2px 2px 0px #000;}
.neo-checkbox:checked + .neo-checkbox-custom { background: var(--color-15); }
.neo-checkbox:checked + .neo-checkbox-custom::after { content: '✔'; position: absolute; color: #fff; font-weight: 900; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 14px;}

.part-time-box { margin-top: 15px; border: 3px solid #000; border-radius: 8px; padding: 15px; box-shadow: inset 3px 3px 0px rgba(0,0,0,0.05);}

/* NÚT BẤM CHÍNH & LỖI */
.rpe-btn-calc {
    width: 100%; padding: 18px; font-size: 1.4rem; font-weight: 900; text-transform: uppercase; margin-top: 20px;
    background: var(--color-15); color: #fff; border: 3px solid #000; border-radius: 12px;
    box-shadow: 6px 6px 0px #000; cursor: pointer; transition: 0.1s; letter-spacing: 1px;
}
.rpe-btn-calc:active { transform: translate(4px, 4px); box-shadow: 2px 2px 0px #000; }

.rpe-error-box {
    margin-top: 20px; background: var(--color-8); color: #fff; border: 3px solid #000;
    padding: 15px; border-radius: 8px; font-weight: 900; font-size: 1.1rem;
    box-shadow: 4px 4px 0px #000; text-align: center; animation: shake 0.4s ease-in-out;
}
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

/* KẾT QUẢ */
.rpe-result-section { margin-top: 30px; border-top: 4px dashed #000; padding-top: 30px; animation: fadeUp 0.4s ease-out forwards;}

.res-main-card { text-align: center; border: 4px solid #000; border-radius: 12px; padding: 30px 20px; box-shadow: 8px 8px 0px #000; margin-bottom: 25px;}
.res-label { font-size: 1.3rem; font-weight: 900; text-transform: uppercase; margin-bottom: 10px; color: #000;}
.res-value { font-family: 'Bungee', cursive; font-size: 4rem; line-height: 1; text-shadow: 3px 3px 0px rgba(0,0,0,0.1); margin-bottom: 15px; word-break: break-word;}
.res-desc { margin: 0; font-size: 1.05rem; font-weight: 700; color: #222;}
.text-navy { color: var(--color-13); }

.res-sub-card { border: 3px dashed #000; border-radius: 8px; padding: 15px; text-align: center; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px;}
.sub-label { font-size: 1.1rem; font-weight: 900; text-transform: uppercase;}
.sub-value { font-family: 'Courier New', monospace; font-size: 1.8rem; font-weight: 900; color: var(--color-8); background: #fff; padding: 2px 10px; border: 2px solid #000; border-radius: 6px;}
.sub-unit { font-size: 1.1rem; font-weight: 700;}

@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 650px) {
    .rpe-grid-2 { grid-template-columns: 1fr; }
    .res-value { font-size: 3rem; }
}