@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=JetBrains+Mono&display=swap');
* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: #0a0a0a; color: #d4d4d4; font-family: 'Inter', sans-serif; line-height: 1.6; padding: 1.5rem; max-width: 1400px; margin: 0 auto; }
h1, h2, h3, h4, h5 { color: #fafafa; margin-bottom: 1rem; font-weight: 600; }

.navbar, .card { background: #171717; border-radius: 12px; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.5); }
.navbar { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; padding: 1rem 1.5rem; margin-bottom: 2.5rem; }
.card { padding: 1.5rem; border: 1px solid #262626; margin-bottom: 1.5rem; }

.navbar a { color: #a3a3a3; text-decoration: none; font-weight: 500; transition: 0.2s; }
.navbar a:hover { color: #fafafa; }
.navbar b { color: #fafafa; font-size: 1.2rem; margin-right: 1rem; }

.card-title, .section-title { padding-bottom: 0.8rem; }
.card-title { border-bottom: 1px dashed #262626; margin-bottom: 0; }
.section-title { margin-top: 3.5rem; color: #a3a3a3; font-weight: 500; font-size: 1rem; border-bottom: 1px solid #262626; text-transform: uppercase; }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); gap: 1.5rem; }
.grid-1 { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.flex-col { display: flex; flex-direction: column; gap: 1.5rem; }
.header-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }

label { display: block; margin-bottom: 0.5rem; color: #a3a3a3; font-size: 0.9rem; font-weight: 500; }
input, select, pre, .raw-box { background: #0a0a0a; border: 1px solid #262626; }
input, select { width: 100%; color: #fafafa; border-radius: 6px; padding: 0.6rem 1rem; font-family: inherit; }
input:focus, select:focus { outline: none; border-color: #737373; }
input[type=number]::-webkit-outer-spin-button, input[type=number]::-webkit-inner-spin-button { appearance: none; margin: 0; }
input[type=number] { appearance: textfield; }

button { background: #ededed; color: #0a0a0a; border: none; border-radius: 6px; padding: 0.6rem 1.2rem; font-weight: 600; cursor: pointer; transition: 0.2s; }
button:hover { background: #fff; }
.btn-sec { background: #262626; color: #fafafa; border: 1px solid #404040; }
.btn-sec:hover { background: #404040; }

table { width: 100%; border-collapse: collapse; }
th, td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid #262626; }
tr:last-child td { border-bottom: none; }
.td-label { color: #a3a3a3; font-weight: 500; width: 35%; }
.td-desc { color: #737373; font-size: 0.85rem; width: 35%; }
.td-value { font-weight: 600; font-family: 'JetBrains Mono', monospace; color: #fafafa; } 
.unit { color: #737373; font-size: 0.9em; }

.text-red { color: #ef4444; transition: 0.2s; }
a.text-red:hover { color: #fca5a5; }
.err { background: #450a0a; color: #fca5a5; padding: 1rem; border-radius: 8px; margin-bottom: 1.5rem; font-weight: 500; }
.raw-box { margin-top: 1.5rem; padding: 1.2rem; border-radius: 8px; border-style: dashed; }
pre { padding: 1rem; border-radius: 8px; overflow-x: auto; font-family: 'JetBrains Mono', monospace; font-size: 0.9rem; color: #d4d4d4; }
.canvas-wrap { height: 350px; width: 100%; position: relative; }

#loading-overlay { display: none; position: fixed; inset: 0; background: rgba(10, 10, 10, 0.85); backdrop-filter: blur(4px); z-index: 9999; flex-direction: column; justify-content: center; align-items: center; }
.spinner { width: 60px; height: 60px; border: 5px solid #262626; border-top-color: #ededed; border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 600px) {
    body { padding: 0.5rem; }
    .card { padding: 1rem; }
    .navbar { padding: 1rem; gap: 1rem; }
    .td-desc { display: none; }
    .td-label { width: 50%; }
    th, td { padding: 0.5rem 0.25rem; font-size: 0.85rem; }
    .canvas-wrap { height: 250px; }
}
