.tool-container {
    max-width: 600px;
}

.input-section {
    display: flex;
    justify-content: center;
    margin-bottom: var(--spacing-xl);
}

#char-input {
    width: 150px;
    height: 150px;
    font-size: 5rem;
    text-align: center;
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    border-radius: var(--radius-lg);
    color: var(--text-color);
    font-family: 'Noto Sans KR', sans-serif;
    transition: all 0.2s;
}

#char-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.result-container {
    animation: slideUp 0.3s ease;
}

.char-display {
    display: none;
    /* Already shown in input, maybe redundant or use for confirmation */
}

.breakdown-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.breakdown-item {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.breakdown-item .label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-xs);
}

.breakdown-item .value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: var(--spacing-xs);
    font-family: 'Noto Sans KR', sans-serif;
}

.breakdown-item .code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: var(--primary-color);
    background: rgba(59, 130, 246, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.code-result {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
}

.code-result h3 {
    text-align: center;
    margin: 0 0 var(--spacing-md) 0;
    font-size: 1.1rem;
}

.code-display {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.code-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: var(--radius-md);
}

.code-label {
    color: var(--text-muted);
    font-weight: 500;
}

.code-value {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    color: var(--text-color);
}

.code-value.binary {
    letter-spacing: 1px;
}

.code-value.hex {
    color: var(--accent-color);
}

.bit-explanation {
    display: flex;
    height: 30px;
    border-radius: 15px;
    overflow: hidden;
    font-size: 0.75rem;
    color: white;
    font-weight: 600;
    text-align: center;
    line-height: 30px;
}

.bit-block {
    display: inline-block;
}

.bit-block.msb {
    width: 6.25%;
    /* 1/16 */
    background: #94a3b8;
}

.bit-block.cho {
    width: 31.25%;
    /* 5/16 */
    background: var(--primary-color);
}

.bit-block.jung {
    width: 31.25%;
    /* 5/16 */
    background: var(--success-color);
}

.bit-block.jong {
    width: 31.25%;
    /* 5/16 */
    background: var(--danger-color);
}

.message {
    text-align: center;
    color: var(--danger-color);
    margin-top: var(--spacing-md);
}

.hidden {
    display: none;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}