/* 진법 변환기 (Base Converter) */

/* 변환기 컨테이너 */
.base-converter {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 각 진법 입력 그룹 */
.base-group {
    background: #ffffff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.base-group:focus-within {
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.base-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.base-label {
    font-weight: 600;
    color: #2d2a26;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.base-badge {
    background: #f5f3f0;
    color: #5f5a56;
    font-size: 12px;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 4px;
}

.base-group.active .base-badge {
    background: #d4af37;
    color: #fff;
}

/* 입력 필드 */
.base-input-wrapper {
    position: relative;
}

.base-input {
    width: 100%;
    padding: 14px 50px 14px 14px;
    font-size: 18px;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    background: #faf9f7;
    color: #2d2a26;
    transition: border-color 0.2s ease, background-color 0.2s ease;
    letter-spacing: 1px;
}

.base-input:focus {
    outline: none;
    border-color: #d4af37;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.base-input::placeholder {
    color: #a39e96;
    font-size: 14px;
    letter-spacing: normal;
}

.base-input:read-only {
    background: #f5f3f0;
    cursor: default;
}

/* 복사 버튼 */
.base-copy-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #8c8579;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: background-color 0.2s ease, color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.base-copy-btn:hover {
    background: #e8e4dc;
    color: #2d2a26;
}

.base-copy-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.base-copy-btn.copied {
    color: #22c55e;
}

/* 에러 상태 */
.base-group.error .base-input {
    border-color: #ef4444;
    background: #fef2f2;
}

.base-error-message {
    color: #ef4444;
    font-size: 13px;
    margin-top: 8px;
    display: none;
}

.base-group.error .base-error-message {
    display: block;
}

/* 액션 버튼 영역 */
.base-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 8px;
}

/* 도움말 영역 */
.base-help {
    background: #f5f3f0;
    border-radius: 12px;
    padding: 16px;
    margin-top: 20px;
}

.base-help-title {
    font-weight: 600;
    color: #2d2a26;
    font-size: 14px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.base-help-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.base-help-item {
    font-size: 13px;
    color: #5f5a56;
    display: flex;
    align-items: center;
    gap: 8px;
}

.base-help-item code {
    background: #ffffff;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 12px;
    color: #d4af37;
    border: 1px solid #e8e4dc;
}

/* 반응형 */
@media (max-width: 768px) {
    .base-group {
        padding: 14px;
    }

    .base-input {
        font-size: 16px;
        padding: 12px 45px 12px 12px;
    }

    .base-help-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .base-label {
        font-size: 14px;
    }

    .base-badge {
        font-size: 11px;
        padding: 2px 6px;
    }

    .base-input {
        font-size: 15px;
    }
}
