/* --- RESET & BASE --- */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
body { background-color: #5c89f1; color: #ffffff; padding: 40px 20px; display: flex; justify-content: center; }

/* --- CARD UTAMA --- */
.container { width: 100%; max-width: 800px; background-color: #0f172a; padding: 50px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.08); }
h1 { text-align: center; margin-bottom: 40px; color: #ffffff; font-size: 28px; font-weight: 800; }

/* --- FORM STYLING --- */
.input-group { margin-bottom: 30px; }
.input-group label { display: block; margin-bottom: 10px; font-size: 14px; font-weight: 600; color: #ffffff; }
.input-group input[type="text"] { width: 100%; padding: 10px 0; border: none; border-bottom: 2px solid #ddd; font-size: 18px; letter-spacing: 2px; transition: 0.3s; }
.input-group input[type="text"]:focus { outline: none; border-bottom: 2px solid #00bcd4; }
.radio-group { display: flex; gap: 20px; align-items: center; }
.radio-group input[type="radio"] { accent-color: #00bcd4; transform: scale(1.2); cursor: pointer; }

/* --- TOMBOL --- */
.button-group { display: flex; justify-content: center; gap: 20px; margin-top: 40px; padding-bottom: 30px; border-bottom: 2px solid #eee; }
button { padding: 12px 40px; border: none; border-radius: 50px; cursor: pointer; font-size: 14px; font-weight: bold; transition: 0.3s; }
.btn-submit { background-color: #00bcd4; color: white; }
.btn-submit:hover { background-color: #0097a7; transform: translateY(-2px); box-shadow: 0 4px 15px rgba(0, 188, 212, 0.4); }
.btn-reset { background-color: #d50000; color: white; }
.btn-reset:hover { background-color: #b30000; transform: translateY(-2px); box-shadow: 0 4px 15px rgba(213, 0, 0, 0.4); }

.btn-toggle { background-color: #fff; color: #00bcd4; border: 2px solid #00bcd4; width: 100%; margin-top: 20px; padding: 15px; font-size: 16px;}
.btn-toggle:hover { background-color: #00bcd4; color: white; }
.hidden { display: none !important; }

/* --- AREA SOLUSI (DARK MODE BLOCK-BASED UI) --- */
#solutionArea { background-color: #0f172a; padding: 30px; border-radius: 12px; color: #cbd5e1; margin-top: 20px; animation: fadeIn 0.5s ease; }
#solutionArea h3 { color: #f8fafc; border-bottom: 1px solid #334155; padding-bottom: 15px; margin-bottom: 25px; font-size: 20px; text-align: left;}

.step-item { margin-bottom: 40px; }
.tahap-title { font-size: 14px; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 20px; display: inline-block; padding: 6px 14px; border-radius: 4px; font-weight: bold; }
.tahap-title.purple { color: #a855f7; background: rgba(168, 85, 247, 0.1); }
.tahap-title.cyan { color: #06b6d4; background: rgba(6, 182, 212, 0.1); }
.tahap-title.green { color: #10b981; background: rgba(16, 185, 129, 0.1); }
.tahap-title.yellow { color: #f59e0b; background: rgba(245, 158, 11, 0.1); }

/* Tata Letak Flebox untuk Baris Perhitungan */
.calc-row { display: flex; align-items: center; margin-bottom: 12px; font-family: monospace; }
.calc-label { width: 280px; font-size: 14px; color: #ffffff; }
.calc-bits { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.bit-col { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.bit-index { font-size: 10px; color: #64748b; font-family: sans-serif;}

/* Desain Kotak Bit */
.calc-bit-box { width: 32px; height: 32px; display: flex; justify-content: center; align-items: center; border-radius: 6px; font-weight: bold; font-size: 16px; color: #ffffff; font-family: 'Segoe UI', sans-serif;}

/* Tema Warna Kotak Bit */
.theme-purple .calc-bit-box { background-color: #8b5cf6; box-shadow: 0 4px 10px rgba(139, 92, 246, 0.2); }
.theme-cyan .calc-bit-box { background-color: #06b6d4; box-shadow: 0 4px 10px rgba(6, 182, 212, 0.2); }
.theme-green .calc-bit-box { background-color: #10b981; box-shadow: 0 4px 10px rgba(16, 185, 129, 0.2); }
.theme-yellow .calc-bit-box { background-color: #f59e0b; box-shadow: 0 4px 10px rgba(245, 158, 11, 0.3); }

/* Detail S-Box */
.sbox-detail { display: flex; align-items: center; gap: 15px; padding: 10px 0; margin-bottom: 10px; border-left: 2px dashed #475569; padding-left: 20px; margin-left: 140px; }
.sbox-text { font-size: 13px; color: #cbd5e1; background: #1e293b; padding: 6px 12px; border-radius: 4px; font-family: monospace;}

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